If you're building agents, Copilot alternatives, or your own LLM gateway, you'll almost certainly run into OpenRouter: one API key, one model parameter, and you can switch between Claude, GPT, Gemini, and 300+ other models. But how does the bill actually add up? And how far off are you from calling Anthropic, OpenAI, or Google directly? Using public pricing from July 2026, this guide walks through the billing formula, hidden costs, and the real per-call API cost across the three major providers.
OpenRouter billing: the formula in one minute
OpenRouter runs on prepaid credits and per-token billing — there is no monthly flat-rate plan. Inference cost per API call is:
Inference cost per call
Cost = (input tokens ÷ 1,000,000 × input price) + (output tokens ÷ 1,000,000 × output price)
Prices are quoted in USD per million tokens and appear in the OpenRouter model catalog and on each model's detail page. Input and output are billed separately; output is usually more expensive.
What counts as an input token? Your prompt, system prompt, chat history, tool returns (function calling) written into context, and on some models reasoning tokens on the input side.
What counts as an output token? Text generated by the model (and, where applicable, separately billed reasoning output).
Example: a model at $3/M input and $15/M output, one request with 10,000 input and 2,000 output tokens:
- Input: 10,000 ÷ 1,000,000 × $3 = $0.03
- Output: 2,000 ÷ 1,000,000 × $15 = $0.03
- Total inference: $0.06 (before top-up fee)
The OpenRouter API is OpenAI Chat Completions–compatible; responses typically include usage.prompt_tokens and usage.completion_tokens — ideal for live cost tracking in your app.
Hidden costs that are easy to miss
Token prices in the catalog are only the baseline. Per OpenRouter Pricing, additional layers apply:
| Cost layer | Rate / rule | When it applies |
|---|---|---|
| Inference (tokens) | Provider price passed through 1:1 | Every API call |
| Credit-card platform fee | 5.5% (minimum fee) | Every card top-up |
| Crypto top-up | ~5% | Crypto payment |
| BYOK overage | 5% of OpenRouter equivalent | Your own key, > free monthly quota (standard ~1M requests/month) |
| Volume discount | up to ~7% off | Gold / Platinum (thresholds ~$1K / $5K/month) |
Small teams should budget 5–7% overhead on top of inference. On a $100 top-up, after the 5.5% platform fee you have roughly $94.50 for inference — then tokens are deducted at the model rate.
Important: OpenRouter does not mark up mainstream model token prices (same as the provider). The extra cost is mostly top-up friction and multi-model convenience — not a hidden per-token surcharge.
2026 price table: Claude vs. GPT-5 vs. Gemini
As of July 2026 on OpenRouter (USD / M tokens). Prices change — check live pricing before you ship.
Anthropic Claude
| Model (OpenRouter ID) | Input / M | Output / M | Use case |
|---|---|---|---|
Claude Opus 5 anthropic/claude-opus-5 |
$5.00 | $25.00 | Flagship reasoning, complex agents, long coding sessions |
Claude Sonnet 4.6 anthropic/claude-sonnet-4.6 |
$3.00 | $15.00 | Daily coding & production workhorse |
Claude Haiku 4.5 anthropic/claude-haiku-4.5 |
$1.00 | $5.00 | Classification, routing, light completions |
Claude on OpenRouter supports Prompt Caching: repeated large contexts (system prompts, long docs) can cut effective input cost significantly; "Effective Pricing" on the model page can be 60–80% below list price for some usage patterns.
OpenAI GPT-5
| Model (OpenRouter ID) | Input / M | Output / M | Use case |
|---|---|---|---|
GPT-5.5 openai/gpt-5.5 |
$5.00 | $30.00 | Flagship multimodal & heavy tasks |
GPT-5.4 openai/gpt-5.4 |
$2.50 | ~$10–15 | Balance of performance and cost |
GPT-5.4 Mini openai/gpt-5.4-mini |
~$0.15–0.40 | ~$0.60–1.60 | High concurrency, simple tasks |
GPT-5 on OpenRouter often has higher output pricing than comparable Claude models (e.g. GPT-5.5 output $30 vs. Opus 5 output $25). For long outputs (long-form text, lots of code), OpenAI flagship can cost more overall.
Google Gemini
| Model (OpenRouter ID) | Input / M | Output / M | Use case |
|---|---|---|---|
Gemini 3.1 Pro google/gemini-3.1-pro-preview |
$2.00 | $12.00 | Long context, multimodal Pro |
Gemini 3.5 Flash google/gemini-3.5-flash |
~$0.10–0.35 | ~$0.40–1.40 | Low latency, high volume |
Gemini 3 Flash google/gemini-3-flash-preview |
~$0.10–0.25 | ~$0.40–1.00 | Light dialogue & tool calls |
In the flagship Pro tier, Gemini 3.1 Pro is roughly 40% of Claude Opus 5 input price and 48% of output price — cheapest on paper. Whether quality is enough depends on the use case, not price alone.
Four real-world cost scenarios
Estimate per single inference call (excluding 5.5% top-up). Comparison models: Claude Sonnet 4.6, GPT-5.4, Gemini 3.1 Pro.
Scenario A: Short dialogue (support / Q&A)
~2,000 input + 500 output tokens.
| Model | Input | Output | Total |
|---|---|---|---|
| Sonnet 4.6 ($3 / $15) | $0.006 | $0.0075 | $0.0135 |
| GPT-5.4 ($2.5 / $12) | $0.005 | $0.006 | $0.011 |
| Gemini 3.1 Pro ($2 / $12) | $0.004 | $0.006 | $0.010 |
For short dialogues the gap is small; even at 10,000 calls/day the amounts stay low.
Scenario B: Code review (medium context)
~50,000 input (diff + relevant files) + 2,000 output (review comments).
| Model | Total |
|---|---|
| Sonnet 4.6 | $0.18 ($0.15 + $0.03) |
| GPT-5.4 | $0.149 |
| Gemini 3.1 Pro | $0.124 |
Scenario C: Terminal agent, one session (repo-heavy)
~200,000 input + 10,000 output — close to a deep Claude Code / Cursor agent round.
| Model | Total |
|---|---|
| Sonnet 4.6 | $0.75 |
| GPT-5.4 | $0.62 |
| Gemini 3.1 Pro | $0.52 |
| Claude Opus 5 ($5 / $25) | $1.25 |
| GPT-5.5 ($5 / $30) | $1.30 |
For agents, input tokens drive the bill. Twenty such sessions/day on Sonnet 4.6 ≈ $15/day ≈ $450/month inference only — one reason many teams start with a subscription (e.g. Claude Code Max) until API usage is cheaper.
Scenario D: Batch summarization (100 × 8K input + 300 output)
Total 800,000 input + 30,000 output tokens.
- Sonnet 4.6: ~$2.85
- GPT-5.4: ~$2.36
- Gemini 3.1 Pro: ~$1.96
- With Gemini 3.5 Flash: often an order of magnitude cheaper — for pipelines with lower quality requirements
Monthly usage: who is cheapest?
Assumption: 50M input + 5M output tokens/month (typical for a mid-size agent product):
| Model | Monthly inference (estimate) |
|---|---|
| Claude Opus 5 | $50×5 + $25×5 = $375 |
| Claude Sonnet 4.6 | $3×50 + $15×5 = $225 |
| GPT-5.5 | $5×50 + $30×5 = $400 |
| GPT-5.4 | $2.5×50 + $12×5 = $185 |
| Gemini 3.1 Pro | $2×50 + $12×5 = $160 |
With 5.5% top-up: Gemini 3.1 Pro ≈ $169/month, Sonnet 4.6 ≈ $237/month, GPT-5.5 ≈ $422/month. On paper Gemini Pro or Flash often wins; for coding agents Sonnet remains the quality anchor for many teams.
Compared to subscription products
Claude Pro (~$20/month) or Max 5x ($100/month) includes Claude Code and a web usage pool — that is not the same as API token billing. If your API bill is consistently above $100–200 and you don't need Claude Code, OpenRouter plus free model choice is often more flexible; heavy terminal-agent users may do better on a subscription.
OpenRouter vs. direct API
| Dimension | OpenRouter | Direct Anthropic / OpenAI / Google |
|---|---|---|
| Token price (mainstream) | Usually same as provider | List price; enterprise discounts possible |
| Extra platform fee | 5.5% top-up, etc. | None (or invoicing) |
| Multi-model switching | Change model |
Multiple SDKs, keys, billing accounts |
| Failover / routing | Built in | Build it yourself |
| Compliance & data residency | Traffic via OpenRouter — review DPA | Region & compliance packages available |
Rule of thumb: One model, > $5K/month, enterprise discount negotiable → direct API. Prototype, multi-model A/B, small team with one gateway → OpenRouter time savings often outweigh the 5% fee.
Cutting costs: caching, batch & routing
- Prompt Caching: Repeated long system prompts on Claude — OpenRouter passes through cache discounts.
- Model Routing: Haiku / Flash for intent & drafts, Sonnet / Pro only for heavy steps — average price often >50% lower.
- Compress context: Fewer files per agent round, summarize history — often more effective than switching models.
- Batch API: Non-real-time jobs via provider batch (sometimes routed through OpenRouter) — significant discounts.
- Monitor usage: Log
prompt_tokens/completion_tokensper feature — avoids "nobody knows who's burning credits."
If your agent also runs xcodebuild, signing, and TestFlight on a Mac, add runtime costs on top. See Cloud Mac & iOS toolchain — plan build environment and API budget separately.
FAQ
Can I use OpenRouter free models in production?
Free models and quotas exist with rate limits (RPM, daily caps, depending on balance). Fine for testing; production needs paid models and a credits budget.
Why doesn't my bill match the calculator?
Common causes: reasoning tokens not counted, tool returns in context, special pricing for image/audio, cache hit/miss. The usage field in the API response is authoritative.
Does BYOK (bring your own key) save money?
~1M BYOK requests/month are free; beyond that, 5% of the OpenRouter equivalent. With an existing enterprise discount at the provider you avoid double OpenRouter credits — routing fee still applies.
Claude, GPT-5, or Gemini in 2026?
No one-size answer: coding & agent quality → Sonnet / Opus or GPT-5.4 as benchmark; long context + cost-conscious → Gemini 3.1 Pro; high concurrency, light tasks → Flash / Mini. Two weeks of parallel A/B on OpenRouter beats any price table.
TL;DR
- Billing: input + output billed separately; agents are often input-heavy
- Platform: top-up adds ~+5.5% — budget beyond list model price
- Flagship: Gemini 3.1 Pro usually cheapest list price; GPT-5.5 output most expensive
- Choice: multi-model / fast iteration → OpenRouter; one model, high volume → direct + enterprise
API for models, Cloud Mac for builds
OpenRouter solves "which LLM"; iOS/macOS pipelines still need Xcode. Zilmac Cloud Mac fits agent workflows — signing, notarization, TestFlight.
No physical Mac required for a stable Apple toolchain. — View Cloud Mac offers