Every provider. One API contract.
One OpenAI-compatible surface — plus an Anthropic-compatible /messages endpoint and a Responses API — in front of 206+ models across 17 providers. Model ids are just provider/model. Swap models without changing a line of client code.
APIs we support
Six surfaces, one key
Every endpoint below is live today — same base URL, same API key, same model catalog behind all of them.
POST /api/v1/chat/completionsDrop-in replacement for OpenAI's chat completions endpoint.
POST /api/v1/messagesPoint Claude Code or the anthropic-ai/sdk at AnyRouter, same protocol.
POST /api/v1/responsesStateful, typed-output lifecycle for tool-calling turns.
POST /api/v1/embeddingsVectors for search, clustering, and classification.
POST /api/v1/decisionsTypeSafe decision models: typed noul / choice / score answers, not chat. /systemone is the same handler.
POST /api/v1/ocr/extractExtract text from images and documents as Markdown.
How it routes
One request, automatic failover
Your SDK, CLI, and agents call one base URL. AnyRouter picks an upstream, and if that upstream rate-limits or errors, it retries the next one automatically — your client still sees a single 200.
Under the hood
One gateway, every provider
Clients authenticate once, the gateway fans a single request out to whichever provider serves the model, and every call is logged and cached alongside it.
Everything in one gatewayMọi thứ trong một gateway一个网关里的全部能力
One key. Every capability you'd otherwise wire up yourself.Một key. Mọi khả năng bạn phải tự nối trước đây.一把 Key。否则你得自己拼的所有能力。
No add-ons, no tiers gating the basics. Every capability below ships on the same base URL and the same API key.Không add-on, không tier khóa tính năng cơ bản. Mọi khả năng dưới đây dùng chung base URL và API key.没有插件,基础能力不按套餐上锁。下面每项都走同一个 base URL 和同一把 API Key。自带 Key、捐 Key、anyr CLI。
API & compatibilityAPI & tương thíchAPI 与兼容
- OpenAI-compatible APIAPI tương thích OpenAIOpenAI 兼容 APIKeep your SDK — swap the base URLGiữ SDK — chỉ đổi base URL继续用你的 SDK — 只换 base URL
- Anthropic-compatible APIAPI tương thích AnthropicAnthropic 兼容 APIServe /messages from any providerPhục vụ /messages từ mọi provider从任意供应商提供 /messages
- Responses APIResponses APIResponses APIStateful, tool-calling turnsLượt gọi tool có state带状态的工具调用回合
- Embeddings & OCREmbeddings & OCREmbeddings 与 OCRVectors and document text extractionVector và trích xuất văn bản từ tài liệu向量与文档文字提取
- Tool use & structured outputTool use & structured output工具调用与结构化输出Normalized across providersChuẩn hóa qua mọi provider跨供应商标准化
Routing & reliabilityĐịnh tuyến & độ tin cậy路由与可靠性
- Smart routingĐịnh tuyến thông minh智能路由By price, latency or your orderTheo giá, latency hoặc thứ tự bạn đặt按价格、延迟或你指定的顺序
- Automatic failoverFailover tự động自动故障转移Retries the instant one errorsThử lại ngay khi một upstream lỗi上游一出错立刻重试
- Key balancingCân bằng keyKey 负载均衡Quarantines burned keys for youTự cách ly key bị burn自动隔离烧坏的 Key
- PresetsPreset预设Bundle models behind one @presetGom model sau một @preset用一个 @preset 打包模型
- Prompt cachingPrompt cachingPrompt 缓存Cut repeat token cost and TTFTGiảm chi phí token lặp và TTFT降低重复 token 成本和首字时间
Models & catalogModel & catalog模型与目录
- One growing catalogMột catalog luôn mới一份持续增长的目录Every model as provider/modelMọi model dạng provider/model每个模型都写作 provider/model
- A real free tierFree tier thật真正的免费档anyrouter/free — $0 per tokenanyrouter/free — $0 mỗi tokenanyrouter/free — 每 token $0
- PlaygroundPlaygroundPlaygroundTry any model in the browserThử mọi model trên trình duyệt在浏览器里试用任意模型
- Compare modelsSo sánh model对比模型Price, context and capabilitiesGiá, context và khả năng价格、上下文与能力
- Leaderboards & benchmarksXếp hạng & benchmark排行榜与基准Ranked by real usageXếp hạng theo lượng dùng thực按真实用量排名
Keys & costKey & chi phí密钥与成本
- BYOK — $0 markupBYOK — $0 markupBYOK — 不抽成Your accounts, at list priceTài khoản của bạn, đúng giá list用你自己的账号,原价直通
- Shared key pool — donate a key, ride freePool key chung — góp key, dùng miễn phí共享 Key 池 — 捐一把 Key,免费用Borrow the community's headroomDùng headroom của cộng đồng借用社区余量
- Credits & pricingCredit & bảng giá额度与价格At cost, or $2/mo. No seatsĐúng giá gốc, hoặc $2/tháng按成本,或 $2/月。没有席位费
- Rate limits & budgetsRate limit & ngân sách速率限制与预算Per-key caps you set yourselfGiới hạn theo từng key你自己给每把 Key 设上限
Agents & toolingAgent & công cụAgent 与工具
- One-command agentsAgent một lệnh一条命令启动 Agentcurl | bash → anyr claude · Codex · Grokcurl | bash → anyr claude · Codex · Grokcurl | bash → anyr claude · Codex · Grok
- Unify MCP serversHợp nhất MCP server统一 MCP 服务One URL for every tool you connectMột URL cho mọi tool bạn nối你接的每个工具共用一个 URL
- Prompts hubHub promptPrompt 中心Browse, fork and publish promptsDuyệt, fork và xuất bản prompt浏览、fork 并发布 Prompt
- Skills hubHub skillSkills 中心Skills that sync to every machineSkill sync tới mọi máy同步到每台机器的 Skills
- TypeScript SDKSDK TypeScriptTypeScript SDK@anyr/sdk + Vercel AI SDK provider@anyr/sdk + provider Vercel AI SDK@anyr/sdk + Vercel AI SDK provider
Observability & controlQuan sát & kiểm soát可观测与控制
- Per-request logsLog từng request按请求记日志Every hop, token and costMọi hop, token và chi phí每一次跳转、token 与费用
- Usage explorerKhám phá usage用量探索Slice spend by key, model or appCắt chi tiêu theo key, model, app按 Key、模型或应用切分花费
- API & management keysAPI key & management keyAPI 与管理密钥Scoped keys, revocable any timeKey có scope, thu hồi bất cứ lúc nào带范围的 Key,随时可撤销
- OrganizationsTổ chức组织Shared workspaces and creditsWorkspace và credit dùng chung共享工作区与额度
- Privacy controlsKiểm soát riêng tư隐私控制Choose who may see your promptsChọn ai được thấy prompt của bạn选择谁能看到你的 Prompt
- App attributionGhi nhận app应用归因Tag traffic, get listed publiclyGắn nhãn traffic, lên bảng công khai给流量打标签,公开上榜
Try it
Same contract, every client
OpenAI SDK, Python, the AI SDK, MCP, the CLI, or plain cURL — pick a tab and copy the real request.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://anyrouter.dev/api/v1",
api_key=os.environ["ANYROUTER_API_KEY"],
)
resp = client.chat.completions.create(
model="anthropic/claude-sonnet-4.6",
messages=[{"role": "user", "content": "Hi"}],
)ANYROUTER_API_KEYget keylấy key领取 KeyAlready have keys?
Bring them all
One sk-ar key fronts every provider key you already pay for — with load balancing, automatic failover, zero markup, and a per-key budget cap. Collect the whole drawer behind a single endpoint.
One key, one URL
A single sk-ar key fronts OpenAI, Anthropic, Groq, and 60+ more — your app holds one credential, not a drawer full.
Balancing & failover
Spreads load across your keys and retries the next provider the instant one errors or rate-limits.
$0 markup
Requests bill straight to your own provider accounts — AnyRouter never takes a per-token cut.
Per-key budgets
Cap monthly spend on each connected key so a runaway job can't blow past a limit.
Start routing through one API
Free to start. Add credits, connect your own provider keys, or subscribe for higher limits whenever you need them.