Hugging Face OpenRouter Routing: Pricing and Failover

Hugging Face and OpenRouter · ax-trend issue #4008 · Announced November 16, 2026

Title card: OpenRouter routes Hugging Face, 80+ providers, live choice and retry on failure

Hugging Face has replaced the custom router behind Inference Providers with OpenRouter, in a partnership announced on November 16, 2026. Language model requests now go through OpenRouter, which picks a provider for each call from more than 80 providers based on live price, speed and reliability, and retries on the next provider if the first one fails. Your code and your Hugging Face token stay the same.

The scope is the chat models OpenRouter already serves that have a page on the Hub: 160 models from 38 labs. That includes DeepSeek V4.1 Flash, MoonshotAI Kimi K3.1 Pro and Kimi K3, Z.ai GLM 5.3, Qwen3.8 27B, MiniMax M3.1 Flash and OpenAI gpt-oss-120b. Image, video and audio generation are not part of the switch and keep using the existing Inference Providers path.

Models covered160 models, 38 labs
Provider pool80+ providers, 600+ models on OpenRouter
OpenRouter scale800 trillion tokens a month, 10M+ users
PricingProvider price, no markup
Hugging Face Inference Providers settings page listing providers such as WaveSpeed, Replicate, fal, Baseten and DeepInfra, each with a toggle to enable or disable routing to it
The Inference Providers settings page lists each provider with a toggle, so an account or organization can block routing to providers it does not want. (Photo: Hugging Face)

How the new routing decides

Before this change, Inference Providers picked one provider for a request and returned that provider's error if it failed. The failure handling was therefore the caller's problem. OpenRouter rebuilt its own provider routing in October to stop ranking only on list price, and that rebuilt engine is what Hugging Face now uses. When a provider slows down or starts failing, traffic moves away from it until it recovers, and a failed try is retried on the next best provider inside the same call.

OpenRouter reports the effect from a live experiment on the rebuilt routing: 46 percent fewer requests hitting a capacity error, 16.9 percent faster time to first token and 16.3 percent higher throughput, for 6.0 percent higher cost per request. That last figure is worth keeping in the picture. The default policy buys reliability and speed, and OpenRouter's own numbers say it is not free. Both companies present the first three numbers prominently, and the cost increase only appears in OpenRouter's version of the announcement.

Developers can still steer the choice with a suffix on the model ID:

zai-org/GLM-5.3            # default: best mix of price, speed and reliability
zai-org/GLM-5.3:fastest    # highest throughput
zai-org/GLM-5.3:cheapest   # lowest price
zai-org/GLM-5.3:novita     # only Novita

Routing is also cache aware. A conversation stays on the provider that holds its prompt cache, and sending a stable UUID per conversation in the X-HF-Session-Id header makes that pin explicit. The supported interfaces are OpenAI's Chat Completions and Responses APIs and Anthropic's Messages API, for every chat model regardless of the provider behind it. Hugging Face also ships setup guides for Claude Code, Codex, OpenCode, Pi and Hermes Agent.

Diagram: a request arrives with the same code and token, the router measures providers, the first provider serves, a failure triggers a retry, and the result is checked in the Providers and Metrics tabs
How a Hugging Face request is routed now, in five steps. (Diagram: enghyu, based on the Hugging Face announcement)

Pricing, credits and provider controls

Pricing does not change in structure. You pay the provider's price on your Hugging Face bill, and Hugging Face adds no markup. PRO includes $2 of credits every month, and Team and Enterprise organizations get $2 per seat. Those credits also cover compute and inference more broadly, since the same token reaches Storage Buckets, Jobs and Inference Endpoints.

Visibility improves alongside the routing. Model pages gain a Providers tab listing every provider OpenRouter can route a model to, with input and output price, speed and uptime over the last 24 hours, and a Metrics tab showing the best price, throughput, time to first token, context length and uptime among them. The usage overview breaks spend down by the provider each request actually went to, and settings let an account or an organization turn off any provider entirely.

To start, OpenRouter's guide gives three steps: create a token with the Make calls to Inference Providers permission, open a supported model's page and chat with it there or copy the setup steps for your code or coding agent, then choose in settings which providers may serve your requests. No separate OpenRouter account is needed for this path, which is the point of the integration. The next step the two companies name, connecting an OpenRouter account to Hugging Face, has no date yet.

Why open-weight volume makes this matter

The timing follows where the traffic already went. On OpenRouter, open-weight models rose from 26.8 percent of tokens served in October 2025 to 71.7 percent at the end of September 2026, after peaking at 77.5 percent in July. Weekly open-weight volume grew more than 60 fold over the same period, against almost tenfold for closed models. This week the most used model on OpenRouter is an open-weight one, DeepSeek V4.1 Flash 1017, at 59.2 trillion tokens.

Bar chart: open-weight share of OpenRouter tokens was 26.8 percent in October 2025 and 71.7 percent in September 2026
Open-weight share of tokens served on OpenRouter. (Chart: enghyu, data from Hugging Face and OpenRouter)

Price explains a large part of that shift. Open-weight models cost about four times less on average, at $0.28 per million input tokens and $1.62 per million output tokens, against $1.27 and $6.36 for closed models. The quality gap has not closed. On the Artificial Analysis Intelligence Index, Kimi K3.1 Pro, the best open-weight model named in the post, scores 46 against 65 for Claude Fable 5.2, at about a seventh of the cost per task, $3.68 against $26.54. For many workloads that trade is rational, and it is exactly the kind of workload where provider reliability decides whether a cheap model is usable in production. Routing the largest open model hub through the largest open model router is a direct response to that.

The integration also runs in the other direction. OpenRouter can now send a trace of each request to a Hugging Face Storage Bucket the user owns, as a beta Broadcast destination. Each file holds the input messages, the model output, token counts and cost, with images and other media left out. That turns live traffic into material for an evaluation set or a fine-tuning run, stored next to the models and datasets on the Hub. It is a small feature in the announcement and a strategically large one, because it gives Hugging Face a path from hosted inference back into its core asset, data.

The breaking change and the limits

One change will break existing setups. Because language model requests are now billed to a Hugging Face account or organization, a custom API key for a third party provider no longer works with chat models. Teams that plugged their own provider keys into Hugging Face need to rework billing and key configuration before they rely on the new path. Custom keys for image and video providers keep working, and a provider can still be forced with a model ID suffix or removed in settings.

The performance claims also need their source kept attached. The 46 percent, 16.9 percent and 16.3 percent figures are OpenRouter's own measurements of its rebuilt routing, not an independent benchmark, and Hugging Face repeats them without separate validation. No schedule has been announced for connecting OpenRouter and Hugging Face accounts, or for routing more tasks through OpenRouter beyond language models. Those are stated as next steps only.

Related articles

FAQ

What changed in Hugging Face Inference Providers?

On November 16, 2026, Hugging Face replaced its own router for language models with OpenRouter. Each request is now assigned dynamically among more than 80 providers based on live price, speed and reliability, and a failed attempt is retried on another provider inside the same call.

Does the price change when requests go through OpenRouter?

No. Hugging Face says you pay the provider price on your Hugging Face bill with no markup added. PRO includes $2 of monthly credits, and Team and Enterprise organizations get $2 per seat.

Can I still use my own provider API key?

Not for chat models. Because language model requests are now billed to your Hugging Face account or organization, custom provider keys no longer work for those models. Custom keys for image and video providers keep working.

How do I force the cheapest, fastest or a specific provider?

Add a suffix to the model ID. The default uses the best mix of price, speed and reliability, :fastest picks the highest throughput, :cheapest picks the lowest price, and a provider suffix such as :novita restricts the request to that provider.

Are the 46 percent and 16.9 percent gains independently verified?

No. The 46 percent drop in capacity errors and the 16.9 percent improvement in time to first token come from OpenRouter's own measurement of its rebuilt routing. No independent measurement has been published yet.