Install the latest SDK
The SDK is a thin header-injector;
openai is the only peer you need
(Orbitrage speaks OpenAI format).Initialize with your key — and a user id
Call
init() once, at the top of your program. Always pass a
user_id so every call is attributed to the end-user who triggered it —
this is what powers per-user cost, usage, and analytics in the dashboard.Get your
orb_ key from app.orbitrage.ai →
API Keys. The SDK points your client at https://api.orbitrage.ai/v1
and injects the key for you — even if you already have OPENAI_API_KEY set.Make a call — pick a model, or let Orbitrage route
Use the OpenAI client exactly as you always have. Name a direct model
(recommended while you build — predictable behavior), or use
model="auto"
to let Orbitrage route to the cheapest capable model.See it in the dashboard
Open app.orbitrage.ai/workflows — your
call appears with the model, provider, tokens, cost, latency, and (for
multi-step agents) the full run graph, all attributed to 
customer_42.
Picking a model
| You write | What happens |
|---|---|
model="claude-sonnet-4-6" | Pinned — always Claude Sonnet 4.6. Predictable; great for tools + quality. |
model="grok-4-fast" | Pinned — fast and cheap. A great default for high volume. |
model="gpt-4o-mini" | Pinned — small, cheap, reliable tool-calling. |
model="auto" | Auto routing — Orbitrage scores the prompt and picks the cheapest capable model. See Routing. |
Attributing every call to a user
user_id is the single most useful thing to get right — it unlocks per-user
analytics. Set it once for a script, or switch it per request in a server.
Already using a framework?
LangChain, LangGraph, CrewAI, Agno, LlamaIndex, and the Vercel AI SDK all use an OpenAI-compatible client under the hood — point them at the gateway and you get the same routing + tracing. Copy-paste setups:LangChain
CrewAI
Agno
LlamaIndex
Vercel AI SDK
OpenAI / Anthropic SDK
Next steps
Tool calling
Client tools + hosted managed tools (web search, scrape, calculator) — no keys to wire.
Streaming
Token-by-token streaming, fully traced.
Routing
How
auto scores prompts and picks models.Models
The full catalog of direct model names.