Quickstart
Zyloo speaks the OpenAI API verbatim. If your code talks to api.openai.com, redirect it at our base URL and you're done.
# 1. Install the official SDK (any language)
npm install openai
# 2. Get your key from https://zyloo.io/dashboard
export ZYLOO_KEY=sk-zy-...
# 3. Make your first call
curl https://api.zyloo.io/v1/chat/completions \
-H "Authorization: Bearer $ZYLOO_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "zyloo/claude-opus-4-7",
"messages": [{"role": "user", "content": "Hello"}]
}'Authentication
Every request must include a bearer token in the Authorization header. Keys are scoped per project and can be revoked instantly from the dashboard.
Authorization: Bearer sk-zy-9f3a0e5b...For local development we recommend storing the key in a .env file and loading it through your runtime — never commit keys to source control.
Models
Reference any model by its canonical Zyloo id. Every id is namespaced under zyloo/... so it's unambiguous across providers. The full list of 18models lives on the Models page.
# A few examples — see /dashboard/models for the full list
zyloo/claude-opus-4-7-thinking
zyloo/claude-opus-4-7
zyloo/gpt-5.5
zyloo/gemini-3.5-flash
zyloo/deepseek-v4-pro
zyloo/grok-4.3curl https://api.zyloo.io/v1/models \
-H "Authorization: Bearer $ZYLOO_KEY"Models with extended reasoning end in -thinking — for example zyloo/claude-opus-4-7-thinking or zyloo/gpt-5.5-xhigh.
Chat completions
The same JSON shape as OpenAI's /v1/chat/completions. Tools, JSON mode, vision and structured outputs are supported on every compatible model.
import OpenAI from "openai";
const zyloo = new OpenAI({
apiKey: process.env.ZYLOO_KEY,
baseURL: "https://api.zyloo.io/v1",
});
const res = await zyloo.chat.completions.create({
model: "zyloo/gemini-3.5-flash",
messages: [
{ role: "system", content: "You are concise." },
{ role: "user", content: "Summarize this PR..." },
],
temperature: 0.2,
max_tokens: 512,
});
console.log(res.choices[0].message.content);Streaming
Pass stream: true to receive Server-Sent Events with the same delta format as OpenAI.
const stream = await zyloo.chat.completions.create({
model: "zyloo/claude-opus-4-7",
stream: true,
messages: [{ role: "user", content: "Tell me a story" }],
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}Errors
Zyloo returns OpenAI-compatible error objects. Common codes:
| Code | Meaning | Action |
|---|---|---|
| 401 | Invalid key | Rotate from dashboard |
| 402 | Insufficient credit | Top up wallet |
| 429 | Rate limited | Backoff, we route to a sibling provider |
| 5xx | Upstream failure | Auto-retry with idempotency-key |