OpenRouter

One API key and one bill for 458 AI models from 63 labs, with automatic fallbacks when a provider fails. Model prices pass through, and OpenRouter takes 5.5% on credit purchases.

OpenRouter is a single API in front of almost every AI model. Instead of opening accounts with Anthropic, OpenAI, Google, Mistral, DeepSeek and the rest, you get 1 key, 1 bill and 1 endpoint. Switching from Claude to Gemini is a change of 1 word in the request.

It's the model equivalent of what treg does for agent tools (see treg - OpenRouter for agent tools ).

26 Sep 2026 from the live models API:

Models 458, from 63 labs. OpenAI (100), Qwen (54), Google (41) and Anthropic (27) have the most
Providers 110 hosting companies that serve those models
Free models 17, capped at 50 requests a day
Formats Text, images, video, speech-to-text and text-to-speech
API Compatible with the OpenAI SDK

For business people

The problem: every AI lab has its own account, key, billing, rate limits and outages. Testing 5 models means 5 contracts. And when your only provider goes down, your product goes down with it.

What OpenRouter gives you:

  • 1 key, 1 invoice for hundreds of models.
  • Model choice in code, not in contracts. Compare models on the same prompt, and switch without new sign-ups.
  • Automatic fallbacks. If a provider has an outage or hits a rate limit, the request goes to another provider of the same model.
  • Cost tracking across all providers in 1 place.
  • Public usage rankings that show which models developers actually use, a useful market signal.

What it costs

Model prices are the providers' list prices. OpenRouter earns a fee when you buy credits.

Plan Fee on credit purchases Bring your own provider keys
Standard 5.5% Free up to $25,000 of usage a month, then 5%
Business 8% Same as Standard
Enterprise Discounts on request Free up to $200,000 a month, then 5%

Examples of list prices on 26th September 2026, per million tokens:

Model Input Output Context
Claude Opus 5.5 $4.00 $20.00 1M tokens
Claude Sonnet 5 $2.00 $10.00 1M tokens
Gemini 3.8 Flash $0.75 $3.75 1M tokens

Limits and risks

  • A middleman. Your prompts pass through OpenRouter and then a provider. The account settings can block providers that train on your data, and a request can demand zero-data-retention endpoints only. Keeping data inside the EU is an Enterprise option.
  • 5.5% on everything adds up at volume. Past a certain spend, a direct contract with 1 lab is cheaper.
  • Provider quality varies. The same open model can run slower, or with a different quantisation, at 1 host than at another. Routing hides that unless you pin providers.

When to choose it: prototypes, model comparisons, apps that need several labs, and anything that must survive a provider outage. For heavy use of 1 model, go direct.

For technical people

Quick start

The API mirrors OpenAI's, so the OpenAI SDK works with a different base URL:

from openai import OpenAI

client = OpenAI(
    base_url="https://openrouter.ai/api/v1",
    api_key="<OPENROUTER_API_KEY>",
)

reply = client.chat.completions.create(
    model="anthropic/claude-sonnet-5",
    messages=[{"role": "user", "content": "Summarise this contract in 3 bullets."}],
)
print(reply.choices[0].message.content)

Models are named lab/model. The full catalogue, with prices and context sizes, is public at https://openrouter.ai/api/v1/models, no key needed.

Routing controls

By default, OpenRouter spreads requests across the providers of a model, favouring low prices and skipping providers with recent outages. A provider object in the request overrides that:

Parameter Effect
order Try these providers first, in this order
only / ignore Allow or exclude specific providers
allow_fallbacks Set to false to fail instead of switching provider
sort Rank by price, throughput or latency instead of load balancing
data_collection Set to "deny" to skip providers that store your data
zdr Set to true for zero-data-retention endpoints only
max_price Cap the price per token

2 shortcuts on the model name: :nitro for the fastest providers, and :floor for the cheapest. A models array instead of model gives a fallback chain across different models, for example Claude first, then Gemini.

reply = client.chat.completions.create(
    model="anthropic/claude-sonnet-5",
    messages=[{"role": "user", "content": "..."}],
    extra_body={"provider": {"zdr": True, "data_collection": "deny"}},
)

⚠️ WARNING: the free models are rate-limited to 50 requests a day, and some providers behind free endpoints may log or train on prompts. The account settings control this separately for free and paid models. Don't send anything private to a :free model.

Value

OpenRouter is the fastest way to try a new model the day it launches, and the simplest way to add a fallback to anything in production. For my own setup, most work runs through Claude Code on a subscription, and the local model runs on my own machine (see Fine-tuning your own model ), so OpenRouter isn't a daily tool. It earns its place for side-by-side model tests and for scripts that need a second lab as backup, with zdr switched on for anything that touches client material.

Further Reading

NicAI
Written by NicAI, Nic's AI assistant, for his personal knowledge base. Researched and drafted by the model, not hand-written by Nic. Verify anything you plan to act on.