API compatibility - 2 documented limits
OpenRouter API compatibility
OpenRouter documents an OpenAI-compatible API at https://openrouter.ai/api/v1 (chat/completions, responses and models). Its Anthropic-compatible base URL, the value for ANTHROPIC_BASE_URL, is https://openrouter.ai/api. The docs list 2 limitations: 2 for the Anthropic-compatible layer.
Verified against OpenRouter's own documentation. Not documented means the docs read that day do not say; it never means No.
Compare every provider in the API compatibility matrix.
OpenAI-compatible API
Supportedhttps://openrouter.ai/api/v1- Endpoints
- chat/completions
- responses
- models
- Auth
- Authorization: Bearer <OPENROUTER_API_KEY>
- Regional and alternate URLs
- Default
https:// openrouter. ai/ api/ v1 - EU In Region
https:// eu. openrouter. ai/ api/ v1
- Default
- Notes
- Optional HTTP-Referer and X-OpenRouter-Title headers for app attribution. EU in-region routing (eu.openrouter.ai) is for Business or Enterprise with EU-eligible models. OpenRouter now steers new code to its own SDKs (@openrouter/sdk, openrouter) but documents the OpenAI SDK as a drop-in replacement. The Responses API is referenced on the Claude Code guide (service_tier reporting) rather than the quickstart.
From the docs
You can also use the OpenAI SDK pointed at OpenRouter as a drop-in replacement.
Anthropic-compatible API
Supportedhttps://openrouter.ai/api- Auth
- ANTHROPIC_AUTH_TOKEN (sent as Authorization: Bearer); ANTHROPIC_API_KEY must be explicitly empty
- Notes
- Called the 'Anthropic Skin'. Claude Code via OpenRouter is only guaranteed to work with the Anthropic first-party provider; other models may not work correctly.
From the docs
OpenRouter exposes an input that is compatible with the Anthropic Messages API. ... When you setANTHROPIC_BASE_URLtohttps://openrouter.ai/api, Claude Code speaks its native protocol directly to OpenRouter.
Documented limitations
Parameters, content types and features OpenRouter's docs say its compatibility layers ignore, reject or change, each with the line it comes from. A layer with nothing listed may still differ in ways the docs do not spell out.
OpenAI-compatible layer0
No limitations listed in the docs read.
Anthropic-compatible layer2
Claude Code only guaranteed with the Anthropic first-party provider
Claude Code with OpenRouter is only guaranteed to work with the Anthropic first-party provider.
openrouter.ai/docs/cookbook/coding-agents/claude-code-integration.md non-Anthropic models may not work correctly in Claude Code
Claude Code is optimized for Anthropic models and may not work correctly with other providers.
openrouter.ai/docs/cookbook/coding-agents/claude-code-integration.md
Example from OpenRouter's docs
Copied verbatim from the provider's documentation, placeholders included.
from openai import OpenAI
client = OpenAI(
base_url="https://openrouter.ai/api/v1",
api_key="<OPENROUTER_API_KEY>",
)
completion = client.chat.completions.create(
model="~openai/gpt-sol-latest",
messages=[
{
"role": "user",
"content": "What is the meaning of life?"
}
]
)More on OpenRouter
Newsletter
Know when a provider changes its API
One email per week. New models, new endpoints and the compatibility changes that break a base URL, and what they mean for your stack.