Hugging Face and OpenRouter Partner on Open-Weight Inference Routing

Hugging Face and OpenRouter are partnering on inference routing. Every major open-weight release is published on the Hugging Face Hub, and OpenRouter serves those models at scale across 80+ providers. With the integration, any open-weight model on the Hub that a provider serves can be called using a Hugging Face token through the same API, with OpenRouter selecting the best provider for each request. As of today, Hugging Face Inference Providers has switched from its own custom router to OpenRouter‘s router for language model requests. The router picks the best provider based on live price, speed, and reliability, and retries on another provider if the first attempt fails. Existing code remains unchanged, and the router supports OpenAI’s Chat Completions and Responses APIs as well as Anthropic’s Messages API for every chat model, regardless of the underlying provider. Setup guides are available for Claude Code, Codex, OpenCode, Pi, and Hermes Agent.

The article includes several statistics about open-weight model usage and cost. On OpenRouter, open-weight models grew from 26.8% of tokens served in October 2025 to 71.7% at the end of September 2026, after peaking at 77.5% in July. Weekly open-weight volume grew more than 60-fold over the period, compared with almost tenfold for closed models. The most used model on OpenRouter this week is DeepSeek V4.1 Flash 1017, an open-weight model, with 59.2 trillion tokens. Open-weight models cost about four times less on average: $0.28 per million input tokens and $1.62 per million output tokens, versus $1.27 and $6.36 for closed models. The best open-weight models still trail the best proprietary ones on the hardest benchmarks: Kimi K3.1 Pro, the best open-weight model, scores 46 on the Artificial Analysis Intelligence Index against 65 for Claude Fable 5.2, at about a seventh of the cost per task ($3.68 versus $26.54). For many workloads, the article notes, that trade-off is worth it.

OpenRouter currently serves more than 800 trillion tokens per month to over 10 million users, across 600+ models from 80+ providers. Its routing is based on live measurements of every provider across that traffic. OpenRouter recently rebuilt its provider routing: instead of only looking at the lowest list price, it sends each request to the provider with the best mix of price, speed, and reliability. 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. In OpenRouter‘s measurements, the new routing cut capacity errors by 46%, improved time to first token by 16.9%, and improved throughput by 16.3%. Users can still force a policy or provider with a suffix on the model id, such as :fastest, :cheapest, or a specific provider name like :novita. Routing is also cache-aware: a conversation stays on the provider that holds its prompt cache, and a stable UUID can be passed per conversation in the X-HF-Session-Id header.

Pricing does not change: users pay the provider’s price on their Hugging Face bill, and Hugging Face adds no markup. PRO users get $2 of credits every month, and Team and Enterprise organizations get $2 per seat. Image, video, and audio generation continue to work exactly as before, directly through Hugging Face Inference Providers without going through OpenRouter, using the same token and API, with access to tens of thousands of LoRAs. On model pages, two new tabs show provider details: Providers lists every provider OpenRouter can route the model to with input and output price, speed, and uptime over the last 24 hours; Metrics shows the best price, throughput, time to first token, context length, and uptime among them. Users can turn off any provider in settings, and the router will never send requests there; organizations have the same settings applied to every request billed to the organization.

There is a breaking change: because language model requests now go through OpenRouter and are billed to the Hugging Face account or organization, custom provider API keys can no longer be used with these models. Custom keys for image and video providers keep working, and provider selection via suffix or provider toggling still works with the same code. This is the first step of the partnership. Next steps include connecting an OpenRouter account to Hugging Face and routing more tasks through OpenRouter.

Hugging Face and OpenRouter join forces to make open-weight models easy to run

View Original