Skip to content

Commit d7d2e88

Browse files
committed
attempt to improve key explanation
1 parent 5d37dc6 commit d7d2e88

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

docs/inference-providers/pricing.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,22 @@ You can track your spending anytime on your [billing page](https://huggingface.c
5858

5959
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:
6060

61-
- **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.
61+
- **Hugging Face Routed Requests**: 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.
6262

63-
- **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.
63+
- **Custom Provider Key**: You can bring your own provider key to use with the Inference Providers. This is useful if you already have an account with a provider and you want to use it with the Inference Providers. Hugging Face won't charge you for the call.
6464

6565
Here is a table that sums up what we've seen so far:
6666

6767
| | HF routing | Billed by | Free-tier included | Pay-as-you-go | Integration |
6868
| ---------------------------------- | ---------- | ------------ | ------------------ | ----------------------------------------------- | ----------------------------------------- |
69-
| **Routed request** | Yes | Hugging Face | Yes | Only for PRO users and for integrated providers | SDKs, Playground, widgets, Data AI Studio |
70-
| **Routed request with custom key** | Yes | Provider | No | Yes | SDKs, Playground, widgets, Data AI Studio |
69+
| **Routed Requests** | Yes | Hugging Face | Yes | Only for PRO users and for integrated providers | SDKs, Playground, widgets, Data AI Studio |
70+
| **Custom Provider Key** | Yes | Provider | No | Yes | SDKs, Playground, widgets, Data AI Studio |
71+
72+
<Tip>
73+
74+
You can set your custom provider key in the [settings page](https://huggingface.co/settings/inference-providers) on the Hub, or in the `InferenceClient` when using the JavaScript or Python SDKs. When making a routed request with a custom key, your code remains unchanged—you can still pass your Hugging Face User Access Token. Hugging Face will automatically swap the authentication when routing the request.
75+
76+
</Tip>
7177

7278
## HF-Inference cost
7379

0 commit comments

Comments
 (0)