Hugging Face routes LLM calls via OpenRouter, drops BYOK
Hugging Face Inference Providers now sends language-model requests through OpenRouter's router, adding failover but ending custom provider keys for chat models.
On Nov 16, 2026, Hugging Face announced that its Inference Providers service has replaced its own custom router with OpenRouter's. Language-model requests made with a Hugging Face token now go through OpenRouter, which picks a provider per call on live price, speed and reliability, and retries on another provider if the first fails. Before, Hugging Face returned the chosen provider's error. Your code and token stay the same, but there is one breaking change: you can no longer use your own API key for a provider with these models. Requests are billed to your Hugging Face account, at the provider's price with no markup, according to Hugging Face. Image, video and audio generation stay on Hugging Face's existing path, and custom keys for image and video providers keep working.
The router accepts OpenAI's Chat Completions and Responses APIs and Anthropic's Messages API, so coding agents can point at it. You steer routing with a model-ID suffix: zai-org/GLM-5.3:fastest, :cheapest, or a provider name such as :novita. Kingy AI's migration guide flags the trade-off: pinning a provider means it is not replaced during failover. Kingy also notes that for organization-billed requests, the organization's provider settings override a member's, so a personal test can pass while production is blocked.
Read the performance numbers carefully. The 46% drop in capacity errors comes from OpenRouter's October routing experiment, which also raised cost per request by 6%, as OpenRouter and The New Stack both state; it is not a measurement of the Hugging Face migration. Kingy's own checks used a newly created token, one attempt per case, and did not test failover, organization billing, rejection of a real provider key, retention, or tokens issued before the migration. No source gives a cutover time or grace period for custom keys, and it's unclear what OpenRouter logs or retains on the Hugging Face route.
If you relied on a provider contract or credits attached to your own key, your options per Kingy include going to the provider directly or using OpenRouter directly with bring-your-own-key (BYOK), which is a separate account and billing relationship. In India, India Today reports that Sarvam's Token Factory offers an OpenAI-compatible API on GPUs hosted in India, billed in rupees.
Try it: before your next deploy, ask your agent something like this (our example): "Find every call to router.huggingface.co in this repo and list the model ID, any routing suffix, the billing target, and whether it depended on a custom provider key." Then move the model ID and suffix into config so you can switch policies without a code change.
Sources
- Hugging Face and OpenRouter join forces to make open-weight models easy to run · Hugging Face
- Hugging Face OpenRouter migration: Code, keys and billing · Kingy AI
- OpenRouter Now Powers Inference on Hugging Face · OpenRouter
- “Collaboration over competition”: Hugging Face hands model inference traffic to OpenRouter · The New Stack
- Sarvam opens AI token factory, India’s answer to OpenRouter and Hugging Face · India Today