Hugging Face moves inference routing to OpenRouter, no markup

Hugging Face announced on November 16 that language-model requests in Inference Providers are now routed by OpenRouter from that day, replacing the router Hugging Face wrote itself. User code does not need to change, and usage is still billed through Hugging Face. Image, video and audio generation are unaffected and continue to connect directly to the individual inference providers.

OpenRouter picks an inference provider for each call based on real-time price, speed and reliability. The pricing principle stated on the official blog is that providers' list prices are passed through, and Hugging Face adds no markup.

What changes

The most direct change is failover. Previously, when a provider returned an error, users saw that provider's error; now the request is automatically retried on another provider.

Routing suffixes on model IDs still work. Taking GLM-5.3 as an example, no suffix gives the default best overall choice, :fastest picks the highest throughput, :cheapest picks the lowest price, and a form such as :novita pins the request to a single provider.

Routing also takes prompt caching into account. If users send a fixed UUID for each conversation in the X-HF-Session-Id request header, that conversation is pinned to the provider holding its cache. Users and organizations can also switch off certain providers in their settings, and the router will no longer send requests there.

On the API side, every chat model can be called through OpenAI's Chat Completions and Responses interfaces and Anthropic's Messages interface, regardless of which provider sits behind it. Model pages gain two new tabs, Providers and Metrics, which list each provider's price, speed and 24-hour availability.

One change is not backward compatible: language models can no longer use a user's own API key from a given provider, and every request is billed to the Hugging Face account or organization. Custom keys for image and video providers can still be used.

Illustration: rail switches route carts around a blocked track like OpenRouter; a separate line preserves direct access

Doing the math

Hugging Face's blog gives average prices. Open-weight models average $0.28 per million input tokens and $1.62 per million output tokens; closed models average $1.27 and $6.36 respectively. A rough calculation puts closed models at about 4.5 times the input price and about 3.9 times the output price.

Then there is the free allowance. PRO users get $2 a month, and Team and Enterprise organizations get $2 a month per seat. At the average output price of open models, $2 buys roughly 1.2 million output tokens; spent entirely on closed models, it covers only about 300,000. That allowance suits trials and small experiments, and production use still has to be paid for separately.

“No markup” saves users the middleman layer, provided the providers' list prices are themselves acceptable. With bring-your-own-key switched off, teams that have negotiated discounts or hold prepaid credit with a particular provider can no longer apply those terms when calling through Hugging Face, and would have to go back to that provider's own API.

Where OpenRouter fits

According to figures cited in the Hugging Face blog, OpenRouter handles more than 800 trillion tokens a month, has more than 10 million users, and connects more than 600 models from over 80 providers. OpenRouter's own measurements show that after rewriting its routing, capacity-related errors fell by 46%, time to first token improved by 16.9% and throughput rose by 16.3%; these are OpenRouter's own figures and have not been independently verified.

OpenRouter announced in August this year that it is joining Stripe. Hugging Face is the world's largest host of open models, and by handing the entry point for language-model inference to a routing service now under a payments company, it means calls to open models on the Hub will also pass through OpenRouter's ledger.

The blog lists two follow-up plans: support for linking an OpenRouter account to Hugging Face, and routing more types of tasks through OpenRouter. Neither comes with a timeline.

Sources: CocoLoop, Hugging Face official blog, OpenRouter public materials; average prices for open and closed models and the free allowance follow the Hugging Face blog, and routing performance figures are OpenRouter's own measurements.