Hugging Face shifts language-model routing to OpenRouter
Hugging Face and OpenRouter are partnering to simplify access to open-weight models. Models published on the Hugging Face Hub can be called through the same API with a Hugging Face token when they are available from an eligible provider. Requests to language models will now pass through OpenRouter, which selects a provider using live measurements of price, speed and reliability, and can retry the request elsewhere if a provider fails.
The integration supports OpenAI’s Chat Completions and Responses APIs and Anthropic’s Messages API for chat models. Existing code remains unchanged, while users can select a routing policy or a specific provider through a suffix on the model ID. Routing also considers prompt caching, and a session ID can keep a conversation with the provider holding its cache.
Pricing remains the provider’s price on the Hugging Face bill, with no additional markup. PRO users receive $2 in monthly credits, while Team and Enterprise organizations receive $2 per seat. Language-model requests can no longer use custom provider API keys, although custom keys for image and video providers continue to work. Image, video and audio generation remain directly on Hugging Face Inference Providers.
Written by Sakhanda Wire AI from reporting by Hugging Face. Facts, quotes and full context are in the original article below.