Create each key on its own page, paste it below, then copy the finished lines into your project's .env file. Your keys stay in this tab. They are never sent to Wirestack or saved; we only count that the panel was used.
Make a fine-grained token with the "Make calls to Inference Providers" permission.
What changed
On November 16, 2026 Hugging Face announced that Inference Providers now sends language model requests through OpenRouter's router instead of its own. For each call the router picks a provider serving the model on live price, speed and reliability, and retries on another provider if the first one fails. Your code and your Hugging Face token stay the same. The changelog entry followed on November 17.
What breaks: you can no longer use your own API key for a provider with language models. Those requests are billed to your Hugging Face account or organization, at the provider's price with no Hugging Face markup. Custom provider keys still work for image and video providers. Image, video and audio generation go straight through Inference Providers as before, not through OpenRouter.
You can now steer routing with a suffix on the model ID:
Text
zai-org/GLM-5.3 # default: best mix of price, speed and reliabilityzai-org/GLM-5.3:fastest # highest throughputzai-org/GLM-5.3:cheapest # lowest pricezai-org/GLM-5.3:novita # only Novita
A pinned provider (:novita) is never replaced on failure. Pinning a provider that doesn't serve the model, or one you turned off in settings, returns an error.
Routing is cache-aware. To keep a conversation on the provider that holds its prompt cache, send a stable UUID per conversation in the X-HF-Session-Id header. The router supports OpenAI's Chat Completions and Responses APIs and Anthropic's Messages API for every chat model.
PRO accounts get $2 of monthly credits; Team and Enterprise organizations get $2 per seat.
Prerequisites
An app that calls language models through Hugging Face Inference Providers
A Hugging Face token in HF_TOKEN, fine-grained with the "Make calls to Inference Providers" permission
Steps
If you set a custom provider key for a language model provider in your Hugging Face settings, expect those calls to be billed to your Hugging Face account now. Check you have credits or pay-as-you-go billing in place, and stop relying on the provider's own bill to track that spend.
Keep any custom keys for image and video providers; they still work.
To bill an organization, keep sending the X-HF-Bill-To header. The organization's enabled and disabled providers then apply instead of yours.
In your Inference Providers settings, turn off any provider you don't want; the router never sends your requests there.
If you need a fixed provider or the lowest price, add a provider name such as :novita, or :cheapest or :fastest, to the model ID.
For multi-turn chats, send one stable UUID per conversation in X-HF-Session-Id.
Test it
Run this sample from the docs and check you get an answer. Then open your usage at huggingface.co/settings/inference-providers/overview to see which provider served it and that it was billed to Hugging Face: