Since November 16, 2026, every language model request that goes through Hugging Face Inference Providers is routed by OpenRouter: more than 80 providers and more than 600 models behind the same Hugging Face token. Existing code keeps working, but something is gone: for language models you can no longer bring your own provider key.
If you were already calling open models through Hugging Face, you gain automatic failover and smarter routing. If you had set up your own Together, Groq or Novita keys to pay those providers directly, it's time to look at your billing.
What changes
Until now Hugging Face picked the provider with its own router. For language models, OpenRouter now makes that call on every request, weighing effective price (with the real cache hit rate and the model's usual mix of input and output tokens), speed (throughput and time to first token) and reliability (errors, malformed tool calls or requests turned away for lack of capacity). If a provider fails, the request is retried on another one serving the same model.
What stays and what goes:
- Stays: the
https://router.huggingface.co/v1endpoint, your Hugging Face token and billing on your Hugging Face account, at the provider's price with no markup. - Expands: on top of OpenAI Chat Completions, the OpenAI Responses API and Anthropic's Messages API now work for every chat model.
- Goes: your own provider keys for language models. They still work for image and video providers.
- Not routed through OpenRouter: image, video and audio generation, which still goes straight to Hugging Face's providers with the same token and API.
What it costs
Hugging Face adds no margin: you pay the provider's price. PRO accounts get $2 of credits a month, and Team and Enterprise organisations $2 per seat. The announcement also gives a handy benchmark: open models average $0.28 per million input tokens and $1.62 per million output tokens, versus $1.27 and $6.36 for closed models.
For an agent that burns through 100 million input tokens and 20 million output tokens a month, that works out at roughly $60 with open models ($28 + $32.40) against roughly $254 with closed ones ($127 + $127.20), using those averages. Your actual bill depends on the model and on which provider wins each request.
Hugging Face or OpenRouter directly
If OpenRouter does the routing, the obvious question is why go through Hugging Face at all. The difference comes down to billing and keys:
| Hugging Face Inference Providers | OpenRouter directly | |
|---|---|---|
| Markup on provider price | None | None on inference, but 5.5% ($0.80 minimum) when you buy credits |
| Your own provider keys (LLMs) | No | Yes; on pay-as-you-go, no fee up to $25,000 of monthly usage |
| Included credits | $2/month on PRO, $2 per seat on Team and Enterprise | No |
| Providers and models | OpenRouter's: 80+ and 600+ | 80+ and 600+ |
For a team already paying Hugging Face, skipping the 5.5% credit fee and getting one bill alongside storage, Jobs and Inference Endpoints is reason enough. If you have negotiated pricing with a provider and need to use your own key, going to OpenRouter directly is now the only option of the two.
How to pick the provider
Routing is controlled with a suffix on the model id, so it works even in tools that only let you set a model name:
- No suffix: the default balance of price, speed and reliability.
:fastest: highest throughput.:cheapest: lowest price.:novita(or any other provider's name): that provider only, or an error if it doesn't serve the model. A pinned provider is never swapped out on failover.
With the OpenAI SDK, you just change the base URL:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://router.huggingface.co/v1",
api_key=os.environ["HF_TOKEN"],
)
completion = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4.1-Flash:cheapest",
messages=[{"role": "user", "content": "Hello!"}],
)
print(completion.choices[0].message.content)To make use of prompt caching, send the X-HF-Session-Id header with a stable UUID per conversation, so that conversation's requests stay on the provider holding its cache.
curl https://router.huggingface.co/v1/chat/completions \
-H "Authorization: Bearer $HF_TOKEN" \
-H "Content-Type: application/json" \
-H "X-HF-Session-Id: $SESSION_ID" \
-d '{
"model": "deepseek-ai/DeepSeek-V4.1-Flash:fastest",
"messages": [{"role": "user", "content": "Hello!"}]
}'In your Inference Providers settings you can switch off individual providers: the router won't send them anything, and pinning one with a suffix returns an error. When a request is billed to an organisation, the organisation's settings apply, not yours.
What to check
The catch is failover: if compliance or data residency limits you to certain providers, the automatic retry can send a request to one you never vetted. Switch off unapproved providers in your organisation settings, or pin the provider with its suffix and accept that you lose failover.
Sources
- Hugging Face and OpenRouter join forces to make open-weight models easy to run, Hugging Face, November 16, 2026.
- Routing and Providers, Hugging Face docs.
- Inference Providers, Hugging Face docs.
- FAQ, OpenRouter docs.