Quickstart
One key, two dialects: OpenAI-compatible at /v1/chat/completions and Anthropic-compatible at /v1/messages. Sign in for a free key, create one on the API keys page, and paste it where the snippets say sk-infero-....
First request
curl https://api.infero.xyz/v1/chat/completions \
-H "Authorization: Bearer sk-infero-..." \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"messages": [{"role": "user", "content": "Hello!"}]
}'from openai import OpenAI
client = OpenAI(base_url="https://api.infero.xyz/v1", api_key="sk-infero-...")
r = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "Hello!"}],
)
print(r.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.infero.xyz/v1", apiKey: "sk-infero-..." });
const r = await client.chat.completions.create({
model: "deepseek-v4-flash",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(r.choices[0].message.content);import anthropic
client = anthropic.Anthropic(base_url="https://api.infero.xyz", api_key="sk-infero-...")
r = client.messages.create(
model="kimi-k2.6",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}],
)
print(r.content[0].text)Coding agents
export ANTHROPIC_BASE_URL=https://api.infero.xyz
export ANTHROPIC_API_KEY=sk-infero-...
export ANTHROPIC_MODEL=qwen3-coder-480b
export ANTHROPIC_SMALL_FAST_MODEL=deepseek-v4-flash
claudemodel = "qwen3-coder-480b"
model_provider = "infero"
[model_providers.infero]
name = "infero"
base_url = "https://api.infero.xyz/v1"
env_key = "INFERO_API_KEY"
wire_api = "chat" # infero serves chat completions, not the Responses API{
"provider": {
"infero": {
"npm": "@ai-sdk/openai-compatible",
"options": { "baseURL": "https://api.infero.xyz/v1", "apiKey": "sk-infero-..." },
"models": { "qwen3-coder-480b": {}, "kimi-k3": {}, "glm-5": {} }
}
}
}Good to know
x-infero-provider on every response tells you which upstream actually served the request.
Pin a provider or disable failover per request: "provider": {"only": ["deepinfra"], "allow_fallbacks": false}
Send an Idempotency-Key header to make retries billing-safe.
Tracker pricing: sticker = cheapest provider floor × 1.06, downward only. Provider price cuts pass through automatically and re-rate your current month. Audit the history at /v1/pricing/history.
Verified serving: every endpoint is canaried (tool-call conformance, code, unicode); scores are public at /v1/quality, and requests with tools never route to a failing endpoint.
Manage child keys, budgets, and allowlists via /v1/keys; live prices at /pricing and measured uptime at /status.
