Reference

Documentation.

Everything you need to ship with Zyloo — from your first request to production-grade routing and observability.

Step 1

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.

bash
# 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"}]
  }'
Security

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.

http
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.

Catalog

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.

bash
# 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.3
bash
curl https://api.zyloo.io/v1/models \
  -H "Authorization: Bearer $ZYLOO_KEY"
Tip

Models with extended reasoning end in -thinking — for example zyloo/claude-opus-4-7-thinking or zyloo/gpt-5.5-xhigh.

Endpoint

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.

ts
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);
Realtime

Streaming

Pass stream: true to receive Server-Sent Events with the same delta format as OpenAI.

ts
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 ?? "");
}
Reliability

Errors

Zyloo returns OpenAI-compatible error objects. Common codes:

CodeMeaningAction
401Invalid keyRotate from dashboard
402Insufficient creditTop up wallet
429Rate limitedBackoff, we route to a sibling provider
5xxUpstream failureAuto-retry with idempotency-key

Ready to ship?

Grab a key and start sending traffic in under a minute.

Get an API key