Skip to content

Tools

Hugging Face moves LLM calls to OpenRouter, ending provider-key billing

Edited and reviewed by AI Ping Editorial Team

3-line summary

  1. Hugging Face moved language-model requests on Inference Providers to OpenRouter on November 16.
  2. Existing Hugging Face tokens still work. If a provider fails, the router can retry the same model with another provider.
  3. The service dropped custom provider keys for language-model calls and bills those requests through Hugging Face.
PracticalDevelopers
Yellow and gray network leads connect to a switch on a dark olive bench
AI-generated conceptual image: A fictional network switch with yellow and gray leads illustrates the new route for language-model requests. · AI Ping

Hugging Face switched its Inference Providers service to OpenRouter for language-model requests on November 16. Developers already calling the service with a Hugging Face token can keep the same token and endpoint. If a provider fails, OpenRouter can retry the call with a different host serving the same model.

The change ends a separate way to pay for language models. Developers could previously register a key supplied by a model host and have that host handle the bill. These calls now go on a Hugging Face personal or organization account. Asking a chat model to describe an uploaded photo is part of the switch. Generating images, video or audio uses the existing route, and custom keys still work for image and video providers.

Hugging Face opened Inference Providers in January 2025 with four hosting partners. Developers could pick a model on the Hub and run it on a partner’s servers. At the November launch, OpenRouter said the integration covered 160 models from 38 labs. The list of hosts varies from model to model.

A second provider can pick up a failed request

Under the old Hugging Face routing, one provider received the call and its error went back to the app. OpenRouter now weighs what providers charge, how fast they reply and how often they fail. When one host turns away a request because it has run out of capacity, the router can send it to another host during the same API call.

Developers can give preference to low prices or high throughput by adding a suffix to the model name. Naming one provider restricts the call to that company. A pinned provider’s failure returns an error. In an ongoing conversation, reusing the provider that cached the earlier prompt can save work when the next turn sends much of the same text.

OpenRouter tested its routing changes on more than 24 million requests over one week in October. It alternated the old and new systems on its own service. The share of calls that hit a capacity error fell from 7.1% to 3.8%. The median wait for an answer to start fell 16.9%, while cost per request rose 6.0%. Those figures come from OpenRouter’s test before the Hugging Face migration.

Amber and green lights glow on two black server modules on separate shelves
AI-generated conceptual image: Two server modules with different indicator lights illustrate what happens when a call is retried with another host. · AI Ping

The inference bill comes from Hugging Face

Hugging Face says it passes through the price charged by the provider. Hosts may charge different rates for the input and output of the same model. The default routing weighs speed and reliability alongside price, so the cheapest listed host may lose a request to another provider. Model pages show provider prices and speed, along with uptime over the previous 24 hours. The usage dashboard breaks down spending by model and provider.

Paid PRO accounts get $2 in compute credits each month. Team and Enterprise accounts get $2 per seat, pooled at the organization level. The same credits can pay for other Hugging Face compute services. Free accounts can purchase credits to use Inference Providers.

When a request names an organization for billing, the developer still authenticates with a personal token. The organization decides which hosts can receive that request. A host blocked by an administrator stays out of the pool even when a team member has enabled it in their own settings. Administrators can also cap the organization’s spending.

A blank invoice on a teal clipboard beside a brass key
AI-generated conceptual image: A blank invoice beside a key illustrates the change from provider-issued keys to billing through Hugging Face. · AI Ping

Checking which companies can handle a request

Hugging Face’s security documentation says it does not store the request body or response as it routes calls. The companies that actually run the models have separate policies. Hugging Face links to those policies in its provider directory, and individual model pages identify the hosts that serve each model.

Hugging Face has announced plans to let users connect an OpenRouter account and to route more tasks through OpenRouter. Its announcement gives no rollout date for either change.

Sources