Inference APIs
Reference/Errors/Hugging Face

Hugging Face Inference Providers now route language models through OpenRouter: custom provider keys stop working

Hugging Face's announcement is short: Today, we are switching Inference Providers from our own custom router to OpenRouter's. Requests made to language models now go through OpenRouter. For most users nothing breaks. For two groups it does: anyone who had configured their own provider key (a Together, Fireworks or Groq key attached to their HF account) to be billed directly by that provider, and anyone whose code assumed one fixed provider per request.

Last verified November 20, 2026 against HF blog: Inference Providers now routed by OpenRouter (16 Nov 2026), HF Inference Providers docs · 4 min read

ProviderHugging Face
What changedLanguage-model requests to router.huggingface.co are forwarded through OpenRouter since 16 November 2026
Breaking changeYou can no longer use your own API key for a provider with these models (custom keys still work for image and video providers)
New behaviourA failed request is retried on another provider; :fastest, :cheapest and :<provider> suffixes choose the route
PricingProvider rates with no markup; PRO gets $2 of credit a month, Team and Enterprise $2 per seat
Short answer
  • Custom keys: language-model requests ignore them now. Either pay through HF credits, or call the provider directly with its own SDK and base URL.
  • Routing: requests may land on a different host than before, with retry on failure. Use model:provider to pin one.
  • Billing: provider list price, no HF markup; $2 a month of credit on PRO.

What changed on 16 November 2026

Before the switch, Hugging Face's router picked one provider per request and returned that provider's error if it failed. Now the request goes to OpenRouter, which retries on another provider when one fails and offers :fastest, :cheapest and :<provider> suffixes on the model id, plus a session header for cache-aware routing. Hugging Face reports fewer capacity errors as the reason. Pricing is unchanged: you pay the provider's rate through your HF account with no markup.

The one breaking change is custom provider keys: you can no longer use your own API key for a provider with these models. Image, video and audio generation did not move and still accept custom keys.

If you relied on a custom provider key

Two reasons people attached their own key: to be billed by the provider directly (its credits, its invoices, its discounts), and to be sure which host served the request. Both are gone for language models. The options:

  1. Pay through Hugging Face. Same provider rates, billed to the HF account. Simplest if you have no provider-specific commitment.
  2. Call the provider directly. Every provider in the list has an OpenAI-compatible endpoint; change the base URL and keep the request.
  3. Call a fixed-price host directly. If what you wanted was a known price and a known host for an open model, use one that publishes both and is not a router at all.
Python
from openai import OpenAI
import os

# direct to one host instead of through the HF router
client = OpenAI(base_url="https://api.inferenceapis.com/v1", api_key=os.environ["INFERENCEAPIS_API_KEY"])
resp = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-V4.1-Flash",   # published price, one host, no routing
    messages=[{"role": "user", "content": "Hello"}],
)

If your code assumed one provider

Routing can now move a request between hosts, and hosts differ in context length, tool-calling support and reasoning output. Pin a provider with the suffix when that matters, and read the x-inference-provider response header to see where a request landed.

Python
resp = client.chat.completions.create(
    model="Qwen/Qwen3-235B-A22B-Instruct-2507:together",   # pinned; ":fastest" / ":cheapest" let the router choose
    messages=[{"role": "user", "content": "Hello"}],
)

Frequently asked questions

Did prices go up?

No. Hugging Face states that pricing does not change and it adds no markup; you pay the provider rate. What changed is who can be billed: your own provider key is no longer honoured for language models.

Do I need an OpenRouter account?

No. The routing is internal; you still authenticate with your HF token.

Are image and audio models affected?

No. Image, video and audio generation stay on the previous system and still accept custom provider keys.

Where Inference APIs fits

If you were using your own provider key through Hugging Face to control which host served you and at what price, Inference APIs is the direct alternative for the open models it serves: one key, a published price per model, no routing between hosts.

Something changed or wrong? Tell us and we will re-verify the entry.