One API for
every model.
OpenAI, Anthropic, Google, local — all through one endpoint with the OpenAI chat-completions wire format. One key, one bill, no provider lock-in.
Routes to
How does Switchboard help?
OpenAI-compatible — drop in
Already use OpenAI's SDK? Swap the base URL and the model id. Chat completions, tool calling, streaming, multimodal content — all map. No new wire format to learn.
Read the quickstartBring your own keys, or use ours
Use your own OpenAI / Anthropic / Google keys for direct billing, or let Switchboard manage the provider keys and bill you one invoice. Per-customer key minting via admin APIs.
Manage keysCache + reasoning attribution
Anthropic prompt cache writes and reads, OpenAI o-series reasoning tokens — surfaced as separate fields on every response's usage payload, so your cost model stays accurate as you mix providers.
See the response shapePer-end-user attribution
Pass `user: "your_user_id"` on any request — Switchboard tags the usage row so multi-tenant SaaS apps get per-end-user analytics for free. Up to 256 characters; opaque to providers.
See attributionDrop-in
OpenAI-compatible.
Pick a model. Ship.
Change the provider by changing the model id. Switchboard handles the wire-format translation server-side — your code stays exactly the same whether you're calling Claude, GPT, or Gemini.
Full quickstart →import Switchboard
let client = Switchboard.Client(
apiKey: ProcessInfo.processInfo.environment["SWB_API_KEY"]!
)
let response = try await client.chatCompletions(.init(
model: "anthropic/claude-sonnet-4-5",
messages: [.user("Hello")],
user: "your_user_id",
))
print(response.content ?? "") curl https://switchboard.valni.app/v1/chat/completions \
-H "Authorization: Bearer $SWB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-4-5",
"messages": [{"role": "user", "content": "Hello"}],
"user": "your_user_id"
}' Switchboard FAQs
How is Switchboard different from OpenRouter or LiteLLM?
OpenRouter and LiteLLM are gateways — they unify the API. Switchboard does that and owns the billing relationship: per-customer key minting, per-end-user attribution, and a single invoice covering every provider. Built for SaaS products that need to resell inference, not just route it.
Is the OpenAI wire format really 100% compatible?
Yes — chat completions, tool calling, streaming, multimodal content (text + images). Provider-specific divergences (Anthropic's /v1/messages, Gemini-native) are translated server-side. Your code never sees them.
Can I use my own provider keys?
Yes. For each customer, Switchboard supports either Valni-minted provider keys (we handle billing) or your own keys (you pay providers directly). Per-provider rollout gate; no estimated-cost fallbacks.
Which models can I route to?
Every model in Linecard is routable through Switchboard. The registry tracks pricing, capabilities, and provenance per model — so you can pick by feature (tool calling, vision, caching) and not just by name.
What powers the routing
See pricing, capabilities, and provenance for every model
Linecard is the model registry behind Switchboard — track what each model can do, what it costs per token, and where it actually ran.
Start with Switchboard
Get an API key, drop in your model id, ship.