Unify the contract, not just the routing
Routing many models behind one endpoint solves half the fragmentation problem. The other half is dialect: OpenAI's SDK expects /chat/completions, Anthropic's SDK expects /messages, and OpenAI's newer Responses API expects /responses. A unified AI API implements all three request shapes on one surface, so whichever SDK your codebase already speaks keeps working unchanged.
| Dialect | Endpoint | For |
|---|---|---|
| OpenAI chat | /api/v1/chat/completions | Drop-in for OpenAI's chat SDK |
| Anthropic messages | /api/v1/messages | Drop-in for Claude clients |
| OpenAI Responses | /api/v1/responses | The newer OpenAI Responses surface |
| Embeddings | /api/v1/embeddings | OpenAI-style vector embeddings |
The same model, two dialects
Because the contract is the standard API, you keep the client library you have and just point it at AnyRouter. An OpenAI client:
from openai import OpenAI
client = OpenAI(base_url="https://anyrouter.dev/api/v1", api_key="sk-ar-v1-...")
resp = client.chat.completions.create(
model="anthropic/claude-opus-4-8",
messages=[{"role": "user", "content": "Hello"}],
)…or an Anthropic client, against the same account and key:
from anthropic import Anthropic
client = Anthropic(base_url="https://anyrouter.dev/api", api_key="sk-ar-v1-...")
msg = client.messages.create(
model="anthropic/claude-opus-4-8",
max_tokens=256,
messages=[{"role": "user", "content": "Hello"}],
)No SDK lock-in
A unifying layer is only safe if leaving it is easy. Every surface here is a public standard, not a proprietary protocol — the same code points straight back at OpenAI or Anthropic if you ever move on. Model ids become provider/model strings, so choosing a model is a config value, and you get one key, one bill, and one audit log across every dialect.
This is the contract side of the story. For the routing side — automatic failover and provider preferences across 170+ models — see /blog/one-api-every-llm.
One endpoint that speaks OpenAI chat, Anthropic /messages, and the Responses API.
See the unified APIRoute your first request in 2 minutes
Start free with your own keys, or top up and pay per token. Get $4/mo in credits and free models on Go — $2/mo, or free when you donate a provider key.
Start free