Skip to main content
Watch: I Built an AI App Without Leaving Databricks

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

Supported
Base URL
https://openrouter.ai/api/v1
Endpoints
  • chat/completions
  • responses
  • models
Auth
Authorization: Bearer <OPENROUTER_API_KEY>
Regional and alternate URLs
  • Defaulthttps://openrouter.ai/api/v1
  • EU In Regionhttps://eu.openrouter.ai/api/v1
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.
openrouter.ai/docs/quickstart.md

Anthropic-compatible API

Supported
ANTHROPIC_BASE_URL
https://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 set ANTHROPIC_BASE_URL to https://openrouter.ai/api, Claude Code speaks its native protocol directly to OpenRouter.
openrouter.ai/docs/cookbook/coding-agents/claude-code-integration.md

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

Example from OpenRouter's docs

Copied verbatim from the provider's documentation, placeholders included.

Provider example
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.