Hugging Face Inference Providers now route LLM calls through OpenRouter
Hugging Face switched Inference Providers to OpenRouter's router on 16 November 2026. Prices stay the same, but custom provider keys no longer work for LLMs.

TL;DR
- Language-model requests to Hugging Face Inference Providers now go through OpenRouter, which picks a provider by live price, speed and reliability [1].
- Failed calls are retried on another provider, and Hugging Face adds no markup to provider prices [1].
- Breaking change: your own provider API keys no longer work for language models [1].
Hugging Face replaced the custom router behind its Inference Providers service with OpenRouter’s router, the company announced on 16 November 2026 [1]. Language-model requests now go through OpenRouter, which chooses a provider for each call based on live price, speed and reliability, and retries on another provider if the first one fails [1]. Hugging Face says existing code does not need to change [1].
Why it matters
Developers can call any open-weight model on the Hub that a provider serves with one Hugging Face token and one API [1]. The router accepts OpenAI’s Chat Completions and Responses APIs and Anthropic’s Messages API for every chat model [1]. Hugging Face publishes setup guides for coding agents including Claude Code, Codex, OpenCode, Pi and Hermes Agent [1]. Before the switch, Inference Providers sent a request to a single provider and returned its error if that provider failed [1].
Cost is part of the pitch. Citing OpenRouter data, Hugging Face says open-weight models average $0.28 per million input tokens and $1.62 per million output tokens, against $1.27 and $6.36 for closed models [1]. It also notes that the best open-weight models still trail the best proprietary ones on the hardest benchmarks [1].
How routing works
OpenRouter serves more than 800 trillion tokens a month across more than 600 models from more than 80 providers [1]. In OpenRouter’s measurements, its rebuilt routing cut capacity errors by 46% and improved time to first token by 16.9% and throughput by 16.3% [1]. Developers can steer it with a suffix on the model ID: :fastest for throughput, :cheapest for price, or a provider name such as :novita [1]. Routing is cache-aware, and a stable UUID in the X-HF-Session-Id header keeps a conversation on the provider that holds its prompt cache [1].
Model pages now have a Providers tab with each provider’s price, speed and 24-hour uptime, and a Metrics tab [1]. Users and organizations can turn off providers they do not want in settings [1].
Pricing and the breaking change
Users pay the provider’s price on their Hugging Face bill, with no markup from Hugging Face [1]. PRO users get $2 of credits a month, and Team and Enterprise organizations get $2 per seat [1].
Because language-model calls are now billed to the Hugging Face account, custom API keys for providers no longer work with these models [1]. Custom keys for image and video providers still work, and image, video and audio generation do not go through OpenRouter [1]. Hugging Face says linking OpenRouter accounts to Hugging Face and routing more tasks through OpenRouter are next [1].
Sources
Written and checked by AI from the sources below
Fact-checked by gpt-6.1-sol on · Editorial policy



