Skip to content

Commit 1cfa117

Browse files
committed
remove mention of 'direct calls'
1 parent a8c080f commit 1cfa117

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

docs/inference-providers/pricing.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,19 @@ Your monthly credits automatically apply when you route requests through Hugging
2222

2323
Inference Providers offers flexibility in how you're billed. Understanding these options upfront helps you choose the best approach for your needs:
2424

25-
| Feature | **Routed by Hugging Face** | **Custom Provider Key** | **Direct Calls** |
26-
| :--- | :--- | :--- | :--- |
27-
| **How it Works** | Your request routes through HF to the provider | You set a custom provider key in HF settings | You provide the provider key directly in your code |
28-
| **Billing** | Pay-as-you-go on your HF account | Billed directly by the provider | Billed directly by the provider |
29-
| **Monthly Credits** | **✅ Yes** - Credits apply to eligible providers | **❌ No** - Credits don't apply | **❌ No** - Credits don't apply |
30-
| **Provider Account Needed** | **❌ No** - We handle everything | **✅ Yes** - You need provider accounts | **✅ Yes** - You need provider accounts |
31-
| **Best For** | Simplicity, experimentation, consolidated billing | More billing control, using non-integrated providers | Full control, bypassing HF routing |
32-
| **Integration** | SDKs, Playground, widgets, Data AI Studio | SDKs, Playground, widgets, Data AI Studio | SDKs only |
25+
| Feature | **Routed by Hugging Face** | **Custom Provider Key** |
26+
| :--- | :--- | :--- |
27+
| **How it Works** | Your request routes through HF to the provider | You set a custom provider key in HF settings |
28+
| **Billing** | Pay-as-you-go on your HF account | Billed directly by the provider |
29+
| **Monthly Credits** | **✅ Yes** - Credits apply to eligible providers | **❌ No** - Credits don't apply |
30+
| **Provider Account Needed** | **❌ No** - We handle everything | **✅ Yes** - You need provider accounts |
31+
| **Best For** | Simplicity, experimentation, consolidated billing | More billing control, using non-integrated providers |
32+
| **Integration** | SDKs, Playground, widgets, Data AI Studio | SDKs, Playground, widgets, Data AI Studio |
3333

3434
### Which Option Should I Choose?
3535

3636
- **Start with Routed by Hugging Face** if you want simplicity and to use your monthly credits
3737
- **Use Custom Provider Key** if you need specific provider features or you're consistently using the same provider
38-
- **Use Direct Calls** if you want to bypass Hugging Face routing entirely
3938

4039
## Pay-as-you-Go Details
4140

@@ -56,23 +55,20 @@ Hugging Face charges you the same rates as the provider, with no additional fees
5655

5756
You can track your spending anytime on your [billing page](https://huggingface.co/settings/billing).
5857

59-
## Routed Requests vs Direct Calls (Detailed Comparison)
58+
## Hugging Face Billing vs Custom Provider Key (Detailed Comparison)
6059

6160
The documentation above assumes you are making routed requests to external providers. In practice, there are 3 different ways to run inference, each with unique billing implications:
6261

6362
- **Routed Request**: This is the default method for using Inference Providers. Simply use the JavaScript or Python `InferenceClient`, or make raw HTTP requests with your Hugging Face User Access Token. Your request is automatically routed through Hugging Face to the provider's platform. No separate provider account is required, and billing is managed directly by Hugging Face. This approach lets you seamlessly switch between providers without additional setup.
6463

6564
- **Routed Request with Custom Key**: In your [settings page](https://huggingface.co/settings/inference-providers) on the Hub, you can configure a custom key for each provider. To use this option, you'll need to create an account on the provider's platform, and billing will be handled directly by that provider. Hugging Face won't charge you for the call. This method gives you more control over billing when experimenting with models on the Hub. When making a routed request with a custom key, your code remains unchanged—you'll still pass your Hugging Face User Access Token. Hugging Face will automatically swap the authentication when routing the request.
6665

67-
- **Direct Calls**: If you provide a custom key when using the JavaScript or Python `InferenceClient`, the call will be made directly to the provider's platform. Billing is managed by the provider, and Hugging Face is not notified of the request. This option is ideal if you want to use the unified `InferenceClient` interface without routing through Hugging Face.
68-
6966
Here is a table that sums up what we've seen so far:
7067

7168
| | HF routing | Billed by | Free-tier included | Pay-as-you-go | Integration |
7269
| ---------------------------------- | ---------- | ------------ | ------------------ | ----------------------------------------------- | ----------------------------------------- |
7370
| **Routed request** | Yes | Hugging Face | Yes | Only for PRO users and for integrated providers | SDKs, Playground, widgets, Data AI Studio |
7471
| **Routed request with custom key** | Yes | Provider | No | Yes | SDKs, Playground, widgets, Data AI Studio |
75-
| **Direct call** | No | Provider | No | Yes | SDKs only |
7672

7773
## HF-Inference cost
7874

@@ -82,7 +78,7 @@ For instance, a request to [black-forest-labs/FLUX.1-dev](https://huggingface.co
8278

8379
The `"hf-inference"` provider is currently the default provider when working with the JavaScript and Python SDKs. Note that this default might change in the future.
8480

85-
## Billing forEnterprise Hub organizations
81+
## Billing for Enterprise Hub organizations
8682

8783
For Enterprise Hub organizations, it is possible to centralize billing for all of your users. Each user still uses their own User Access Token but the requests are billed to your organization. This can be done by passing `"X-HF-Bill-To: my-org-name"` as a header in your HTTP requests.
8884

0 commit comments

Comments
 (0)