Send a Claude, GPT, Gemini or Grok request through OpenRouter or through AIHubMix and you pay the same per-token price on both: the vendor's list price. Both are one-key gateways to more than 500 models. So the sticker price is a tie, and what's left to compare is engineering: what you pay on top of the tokens, and what happens to a request after it leaves your code.
Four things actually differ:
- The fee on top. OpenRouter charges 5.5% when you buy credits by card on its Standard plan (5% for crypto, 8% on Business). AIHubMix adds no fee when you buy credits.
- Where an open-weight request lands. OpenRouter spreads an open-weight model across many hosts and, by default, weights the pick by price. AIHubMix has one price per model ID and no provider parameter.
- Which wire protocols one key speaks. Both serve OpenAI Chat Completions, OpenAI Responses and Anthropic Messages. AIHubMix adds Google's native Gemini API.
- Where fallback rules live. On OpenRouter, in the request or a preset. On AIHubMix, on the API key.
Moving OpenRouter code to AIHubMix is usually three changes (base URL, API key, model IDs), plus three gotchas covered below. And for some workloads OpenRouter is the better pick: bring-your-own-key traffic, jobs that can wait, prompts that must stay in Europe, and procurement that needs SAML SSO and a contractual SLA. That's the last section.
The comparison at a glance
The baseline is shared. On either gateway you get one API key and one balance for 500+ models from OpenAI, Anthropic, Google and the open-weight labs; prepaid credits; automatic fallback to another model when a call errors, plus an auto router; free models for testing; image, video, text-to-speech and speech-to-text models on the same key; per-key spending caps; and card, Alipay and crypto top-ups.
Where they part ways, with figures from each company's pricing pages, docs and public model APIs, checked on October 26, 2026:
| OpenRouter | AIHubMix | |
|---|---|---|
| Fee on credit purchases | 5.5% (8% on Business) | None |
| Claude, GPT, Gemini, Grok | Vendor list price | Vendor list price |
| Wire protocols | Chat, Responses, Messages | Same three + Gemini native |
| Open-weight models | Billed at the serving host's price | One price per model ID |
| Fallback is set in | The request or a preset | The API key |
| Your own provider keys | No fee to $25K/mo, then 5% | Not available |
| Batch and flex pricing | About half price | Not available |
| Free models | 25+, 1,000/day after $10 | 67, 100/day after $1 |
| Zero data retention | Available on every plan | On by default |
| In-region routing | EU or US, on Business | None (Google Cloud, US) |
| Top-up methods | Card, Alipay, USDC | Card, Alipay, crypto |
Two rows need a footnote.
- Free tiers. OpenRouter caps free models at 50 requests a day until an account has bought $10 of credits (API Credit & Rate Limits). AIHubMix allows 10 requests on its free models before the first top-up; its limits are published as live JSON and its ops team changes them.
- Data retention. Neither gateway logs prompts by default. OpenRouter's ZDR option goes further and routes only to provider endpoints that don't retain prompts. AIHubMix's ZDR covers its own gateway, and its terms note that upstream providers may keep their own retention policies.
The request path: three places the gateways diverge
1. Open-weight models: one ID, many hosts
Closed models such as Claude are served only through their vendor or the vendor's licensed partners. Open-weight models can be hosted by anyone, and on OpenRouter that changes both the price you pay and what you get.
Take GLM-5.3. On October 26, 2026, OpenRouter listed 47 endpoints for it:
- Input prices ran from $0.07 to $2.80 per million tokens.
- 30 of the endpoints were tagged as fp4, nvfp4 or fp8 quantizations.
- Z.AI's own endpoint, itself tagged fp8, charged $1.40 / $4.40.
- The headline price on OpenRouter's models API, $0.07 input, is the cheapest of those endpoints, not Z.AI's.
The routing rule is why that matters. By default, OpenRouter load-balances by price: among providers with no significant outage in the last 30 seconds, it picks one weighted by the inverse square of its price. A request for z-ai/glm-5.3 is therefore most likely to go to a cheap host, and OpenRouter's own docs warn that quantized models "may exhibit degraded performance for certain prompts".
To take control, set the provider object in the request body:
{
"model": "z-ai/glm-5.3",
"provider": { "order": ["z-ai"], "allow_fallbacks": false },
"messages": [{ "role": "user", "content": "Review this diff for race conditions." }]
}
This asks for Z.AI and turns fallbacks off, which has a cost: with fallbacks off, the request fails when that provider is down. The quantizations field is the softer option. It filters by precision and still lets OpenRouter balance across the hosts that remain.
On AIHubMix a model ID has one listed price, and there's no provider parameter to set. GLM-5.3's input and output prices there, $1.13 / $3.94, are below Z.AI's own endpoint. The trade-off is choice versus bookkeeping: if you want the widest choice of hosts and the lowest possible price for an open-weight model, OpenRouter's marketplace gives you more of both. If you'd rather not manage provider preferences in every request, one price per ID is simpler.
2. Fallback: in the request, or on the key
Both platforms retry on another model when the first one fails. The difference is where the rule is written, and that decides whether your client has to know about it.
On OpenRouter you pass a models list in the request, or save a preset and send @preset/<name> as the model. Either way, the client has to send something OpenRouter-specific.
On AIHubMix, model mapping and fallback are set on the API key in the console. The client keeps sending whatever model name it already uses, and the key rewrites it to a real model, with an ordered list of backups when the call errors. Billing follows the model that finally answered. That helps in two cases:
- Tools that only accept certain model names, such as clients that insist on Claude-style IDs.
- Apps you can't redeploy just to change a fallback order.
Both gateways also have an auto router. OpenRouter's is openrouter/auto. On AIHubMix you send model: "auto", which picks by cost by default, or auto:quality_first, auto:balanced or auto:latency_critical. Neither adds a fee for routing.
3. Protocols: three shared, one extra
Both gateways serve OpenAI Chat Completions, the OpenAI Responses API and Anthropic Messages. So Claude Code, which speaks Anthropic Messages, and Codex, which speaks the Responses API, can run on either one.
AIHubMix adds a fourth protocol: Google's native Gemini API at /gemini/v1beta/models/{model}:generateContent. Code written with Google's SDK, and tools that only speak the Gemini format, can point at https://aihubmix.com/gemini and keep their request shape. OpenRouter's documentation lists no Gemini-native endpoint, so Gemini-shaped clients have to be ported to one of the other formats first.
For Claude Code, the AIHubMix setup is three environment variables: ANTHROPIC_BASE_URL=https://aihubmix.com, ANTHROPIC_AUTH_TOKEN set to your AIHubMix key, and ANTHROPIC_MODEL set to a model such as claude-sonnet-5-5. Protocol support still varies by model, so check the model's page in the AIHubMix model catalog before you rely on an endpoint.
The bill: same tokens, different top-up
OpenRouter's pricing page is explicit that it doesn't mark up inference: every plan pays the provider's list price. The fee is charged when you buy credits:
- Standard plan: 5.5% for card payments (minimum $0.80) and 5% for crypto.
- Business plan: 8%.
- The fee is non-refundable.
AIHubMix adds no fee when you buy credits. Card and crypto top-ups go through Stripe, and AIHubMix covers Stripe's processing fee on any top-up of $15 or more, which is also the minimum top-up. Alipay top-ups carry no fee either.
Per million tokens (input / output), once each platform's top-up terms are counted:
| Model | Vendor list price | AIHubMix | OpenRouter with fee |
|---|---|---|---|
| Claude Opus 5.5 | $4 / $20 | $4 / $20 | $4.22 / $21.10 |
| Claude Sonnet 5.5 | $2 / $10 | $2 / $10 | $2.11 / $10.55 |
| GPT-6.1 Sol | $2 / $10 | $2 / $10 | $2.11 / $10.55 |
| Gemini 3.8 Flash | $0.75 / $3.75 | $0.75 / $3.75 | $0.79 / $3.96 |
| Grok 4.7 | $2 / $6 | $2 / $6 | $2.11 / $6.33 |
| GLM-5.3 | $1.40 / $4.40 | $1.13 / $3.94 | $1.48 / $4.64 |
| Qwen3.8 Max | $2 / $6 | $1.69 / $5.07 | $2.11 / $6.33 |
How the columns were built:
- Vendor list price is the vendor's own endpoint as listed on OpenRouter (Z.AI for GLM-5.3, Alibaba for Qwen3.8 Max).
- The OpenRouter column is that price × 1.055, the Standard-plan card fee.
- AIHubMix prices are from its model catalog.
- Google's $0.75 / $3.75 for Gemini 3.8 Flash applies through December 31, 2026; its pricing page lists $1.50 / $7.50 from January 1, 2027.
- All were checked on October 26, 2026. Prices differ by model and change, so check the model page before you commit a workload.
A worked bill. Say a team spends $1,000 a month at list price on Claude Sonnet 5.5 and Gemini 3.8 Flash. On OpenRouter Standard, buying $1,000 of credits costs $1,055, so the year comes to $12,660 against $12,000 on AIHubMix: $660 more for the same tokens. Teams on OpenRouter Business, the self-serve plan with in-region routing, pay 8%: $1,080 a month.
The fee isn't the whole cost story, though. Bring-your-own-key, batch and flex pricing can make OpenRouter cheaper; they're in the last section.
Migrating from OpenRouter
- Create a key in the AIHubMix console, following the quick start, and add credits. The minimum top-up is $15, or start on the free models.
-
Change the base URL and key for the SDK you use:
- OpenAI SDKs:
https://aihubmix.com/v1 - Anthropic SDKs:
https://aihubmix.com - Google's SDK:
https://aihubmix.com/gemini
- OpenAI SDKs:
-
Rename the models. AIHubMix drops the
vendor/prefix, and Claude versions use hyphens.
| OpenRouter ID | AIHubMix ID |
|---|---|
| anthropic/claude-sonnet-5.5 | claude-sonnet-5-5 |
| anthropic/claude-opus-5.5 | claude-opus-5-5 |
| openai/gpt-6.1-sol | gpt-6.1-sol |
| google/gemini-3.8-flash | gemini-3.8-flash |
| z-ai/glm-5.3 | glm-5.3 |
With the OpenAI SDK, the switch looks like this:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://aihubmix.com/v1", # was https://openrouter.ai/api/v1
api_key=os.environ["AIHUBMIX_API_KEY"], # was your OpenRouter key
)
resp = client.chat.completions.create(
model="claude-sonnet-5-5", # was anthropic/claude-sonnet-5.5
max_tokens=8000,
messages=[{"role": "user", "content": "Summarize this changelog in three bullets."}],
)
print(resp.choices[0].message.content)
The commented lines are the ones that change. The explicit max_tokens=8000 is there on purpose; the first failure mode below explains why.
Failure modes after the switch
Long Claude answers stop early
Cause: On Chat Completions, AIHubMix defaults max_tokens to 4,096 for Claude, so long answers stop early if you leave it out.
Fix: Set max_tokens on every Claude call over Chat Completions, as the sample above does.
A call to Claude Opus is rejected before it runs
Cause: Before a call to a high-cost model such as Claude Opus, AIHubMix checks that your balance covers the output price × max tokens, and may reject the request if it doesn't.
Fix: Keep enough balance for expensive models. A realistic max_tokens keeps that check from blocking you, so this fix and the first one go together: set max_tokens, and set it to a realistic value.
OpenRouter routing fields don't carry over
Cause: Fields such as provider, models and @preset/... model names have no AIHubMix equivalent in the request body. The provider block from the GLM-5.3 example above is one of them.
Fix: Move that routing to the key. Set fallbacks on the AIHubMix key in the console instead of in the request.
Where OpenRouter is the better choice
The top-up fee stops mattering, or something else outweighs it, in these cases:
- You hold your own provider contracts. On OpenRouter, requests served with your own provider keys carry no OpenRouter fee up to $25,000 of list-price inference a month, and a fee of 5% of list price after that. If you already pay Anthropic or OpenAI directly, the 5.5% doesn't apply to that traffic. AIHubMix has no BYOK; it bills all usage from your credit balance.
- Your workload can wait. OpenRouter's Batch API runs at about half the sync price, with results within 24 hours; AIHubMix has no batch endpoint. Some vendors also expose cheaper, lower-priority flex endpoints through OpenRouter: GPT-6.1 Sol's flex endpoint lists at $1 / $5, half its standard price. Cutting the token bill roughly in half saves far more than a 5.5% fee costs.
-
Your prompts must stay in Europe. OpenRouter Business sends requests made to
eu.openrouter.aionly to provider endpoints in the EU/EEA, the UK and Switzerland. The hosted AIHubMix gateway runs on Google Cloud in the US; AIHubMix's enterprise plan offers private deployment, which is worth asking about if you have residency requirements. - Procurement needs SSO and an SLA. OpenRouter's Enterprise plan lists SAML SSO, SCIM and contractual SLAs. AIHubMix's enterprise page offers private deployment and custom volume pricing.
- You want the cheapest host for an open-weight model and accept quantized endpoints.
If none of those describe your workload and most of your spend goes through prepaid credits, AIHubMix charges no fee on top-ups, adds Google's native Gemini API next to the OpenAI and Anthropic formats on one key, and attaches fallbacks to the API key, so clients you can't edit keep working. Either way, every figure here was checked on October 26, 2026, and prices change: check the model page before you commit a workload.
Sources
- OpenRouter Pricing (OpenRouter)
- Provider Routing (OpenRouter docs)
- API Credit & Rate Limits (OpenRouter docs)
- AI Models & Pricing (AIHubMix)
- Model Mapping and Fallback (AIHubMix docs)
Top comments (0)