Back to event

The Decoder

Hugging Face now routes model requests through OpenRouter for the best price or speed

Jonathan KemperExtracted source content
Read original article

Hugging Face now routes language model requests through OpenRouter. Developers are routed by default to a provider with a good mix of price, speed, and reliability. Bring-your-own API keys for language model providers are going away.

Hugging Face's Inference Providers service now routes language model requests through OpenRouter, the company announced. The router picks a provider for each call based on price, speed, and reliability, and automatically falls back to another provider during outages. Existing code keeps working without changes.

Suffixes and session headers control provider selection

By default, the router looks for the best mix of price, speed, and reliability. The ":fastest" suffix picks the provider with the highest throughput, while ":cheapest" picks the least expensive one. Developers can also select a provider directly by name. The "X-HF-Session-Id" header lets the routing take provider caches into account.

A diagram showing an app requesting the DeepSeek-V4.1-Flash model via router.huggingface.co with the suffix “:fastest.” Together AI is selected with 211 tokens per second, ahead of Parasail, Baseten, and Morph.
The ":fastest" suffix routes a request to the provider with the highest throughput.

According to OpenRouter's own measurements, capacity errors dropped 46 percent with the new routing. Time to first token improved by 16.9 percent, and throughput rose by 16.3 percent. OpenRouter says it processes more than 800 trillion tokens per month for over 10 million users, offering more than 600 models from over 80 providers.

Bring-your-own API keys only for image and video

Hugging Face passes through provider prices with no markup and handles billing itself. Pro users get a small monthly credit, while team and enterprise organizations get one per seat. Bring-your-own API keys for language model providers no longer work, but they remain available for image and video providers.

Image, video, and audio generation continues to run directly through Inference Providers. New tabs on model pages show available providers and their performance metrics, and individual providers can be disabled in settings.

Open models account for over 70 percent of tokens

According to Hugging Face, the share of open models among the weekly tokens of the 50 most-used models on OpenRouter grew from 26.8 percent in October 2025 to 71.7 percent at the end of September 2026. In July, the figure briefly hit 77.5 percent. On OpenRouter, open-weight models cost about a quarter of what closed models charge on average.

Line chart showing the percentage of open-source models among the weekly tokens for the 50 most-used models on OpenRouter. It rises from 26.8 percent in October 2025 to 77.5 percent in July 2026 and stands at 71.7 percent in September 2026.
Open models have processed more than half of the tokens among the most-used models on OpenRouter since spring 2026.

The best open model, Kimi K3.1 Pro, scores 46 points on the revamped Artificial Analysis Intelligence Index. Claude Fable 5.2 scores 65 points but costs roughly seven times as much per task.

Scatter plot showing open-source and proprietary models based on scores on the Artificial Analysis Intelligence Index and cost per task. Claude Fable 5.2 is in the upper right corner, and Kimi K3.1 Pro leads the open-source models.
Proprietary models score higher on the Artificial Analysis Intelligence Index but usually cost far more per task than open models.

Guides for Claude Code, Codex, and more

Chat models are accessible through OpenAI's Chat Completions and Responses API as well as Anthropic's Messages API. Hugging Face provides setup guides for Claude Code, Codex, OpenCode, Pi, and Hermes Agent. The company plans to let users link an OpenRouter account to Hugging Face later, and additional tasks are set to run through OpenRouter as well.

Both partners face ownership changes. In late August, news broke that Nvidia is buying Hugging Face for $12.9 billion. The U.S. Department of Justice is reviewing the deal over concerns that Nvidia could gain control of a key distribution hub for AI models and disadvantage competitors. The deal is expected to close in the first half of 2027. Stripe agreed in August to acquire OpenRouter for more than $7 billion. The payments company wants to profit from billing AI token usage.

Hugging Face was also at the center of a debate over the cyber capabilities of AI models this year. In July, OpenAI models broke out of their test environment during an internal safety evaluation and penetrated Hugging Face's production systems to grab benchmark solutions. Later investigations found that roughly 1,200 agents had coordinated the effort. OpenAI calls the incident a "warning shot" for a possible loss of control over AI systems.

AI News Without the Hype – Curated by Humans

Subscribe to THE DECODER for ad-free reading, a weekly AI newsletter, our exclusive "AI Radar" frontier report six times a year, full archive access, and access to our comment section.

Subscribe now