1M tokens in, 100K out.
A long agent run on Claude Sonnet 5, billed to the cent.
$1.20 saved40% less than list for the same tokens.
| Input | 1M × $1.20 / 1M | $1.20 |
|---|---|---|
| Output | 100K × $6.00 / 1M | $0.60 |
| Billed | rounded up to the cent | $1.80 |
Anthropic's Claude Sonnet 5 through one OpenAI- and Anthropic-compatible API: $1.20 per million input tokens and $6.00 per million output.
Ours rounded up, list rounded down; each saving is worked out from the exact prices and rounded down. Paid from a prepaid balance, with no monthly fee.
A long agent run on Claude Sonnet 5, billed to the cent.
$1.20 saved40% less than list for the same tokens.
| Input | 1M × $1.20 / 1M | $1.20 |
|---|---|---|
| Output | 100K × $6.00 / 1M | $0.60 |
| Billed | rounded up to the cent | $1.80 |
Checked every 15 minutes. When it's unavailable, requests return 503 and aren't charged.
Checked –
Pick your client. The line with claude-sonnet-5 is marked; set ROUTING_API_KEY and run it.
import osfrom openai import OpenAIclient = OpenAI( base_url="https://api.routing.run/v1", api_key=os.environ["ROUTING_API_KEY"],)client.chat.completions.create( model="claude-sonnet-5", messages=[{"role": "user", "content": "Hi"}],)Change two arguments and keep the rest. In TypeScript the option is baseURL.OpenAI SDK guide
import osfrom anthropic import Anthropicclient = Anthropic( base_url="https://api.routing.run", api_key=os.environ["ROUTING_API_KEY"],)client.messages.create( model="claude-sonnet-5", max_tokens=1024, messages=[{"role": "user", "content": "Hi"}],)The SDK adds /v1/messages itself, so its base URL has no /v1.Anthropic SDK guide
curl https://api.routing.run/v1/chat/completions \ -H "Authorization: Bearer $ROUTING_API_KEY" \ --json '{ "model": "claude-sonnet-5", "messages": [{"role": "user", "content": "Hi"}] }'Add "stream": true to get the answer as it is written.curl guide
export ANTHROPIC_BASE_URL=https://api.routing.runexport ANTHROPIC_AUTH_TOKEN=$ROUTING_API_KEYexport ANTHROPIC_MODEL=claude-sonnet-5claudeIn your shell. Claude Code reads these three variables.Claude Code guide
model_provider = "routing"model = "claude-sonnet-5" [model_providers.routing]name = "routing.run"base_url = "https://api.routing.run/v1"env_key = "ROUTING_API_KEY"wire_api = "responses"In ~/.codex/config.toml, as a model provider. Then run codex as usual.Codex guide
OpenAI API Key your routing.run keyOverride OpenAI Base URL https://api.routing.run/v1Model claude-sonnet-5In Settings, Models: turn on Override OpenAI Base URL, add the model by its id and pick it in the chat.Cursor guide
{ "provider": { "routing": { "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "https://api.routing.run/v1", "apiKey": "{env:ROUTING_API_KEY}" }, "models": { "claude-sonnet-5": {} } } }}In opencode.json. The key comes from your environment.OpenCode guide
API Provider OpenAI CompatibleBase URL https://api.routing.run/v1API Key your routing.run keyModel ID claude-sonnet-5In Cline's settings, under API Provider.Cline guide
{ "language_models": { "openai_compatible": { "routing": { "api_url": "https://api.routing.run/v1", "available_models": [ { "name": "claude-sonnet-5", "max_tokens": 1000000 } ] } } }}In settings.json. Zed reads the key from ROUTING_API_KEY.Zed guide
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";import { generateText } from "ai";const routing = createOpenAICompatible({ name: "routing", baseURL: "https://api.routing.run/v1", apiKey: process.env.ROUTING_API_KEY,});const { text } = await generateText({ model: routing("claude-sonnet-5"), prompt: "Hi",});With @ai-sdk/openai-compatible. The key comes from your environment.Vercel AI SDK guide
import osfrom langchain_openai import ChatOpenAI llm = ChatOpenAI( model="claude-sonnet-5", base_url="https://api.routing.run/v1", api_key=os.environ["ROUTING_API_KEY"],)print(llm.invoke("Hi").content)ChatOpenAI takes the base URL and key directly.LangChain guide
claude-fable-5.2$5.60 in, $28.00 out30% under listclaude-opus-5.5$2.80 in, $14.00 out30% under listclaude-sonnet-5.5$1.80 in, $9.00 out10% under listclaude-haiku-5.5$0.07 in, $0.35 out30% under listclaude-opus-5$2.00 in, $10.00 out60% under list29 models from 12 labs, all on one balance.
Sign in with GitHub, Google, Discord, Apple or an email link, add $5 and create a key. Each request is charged from your balance at the table's price.