# Inference API Rate Limits

**URL:** <https://discuss.huggingface.co/t/inference-api-rate-limits/155420>\
**Category:** Inference Endpoints on the Hub\
**Created:** [May 15, 2025, 7:25pm UTC](https://discuss.huggingface.co/t/inference-api-rate-limits/155420 "2025-05-15T19:25:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rooster-rooster](https://avatars.discourse-cdn.com/v4/letter/r/8e8cbc/32.png) [@rooster-rooster](https://discuss.huggingface.co/u/rooster-rooster)\
**Post date:** [May 15, 2025, 7:25pm UTC](https://discuss.huggingface.co/t/inference-api-rate-limits/155420/1 "2025-05-15T19:25:19Z")

</div>

Hello!

I’ve been reading the documentation and a few articles on the Inference API, and I’d like to confirm if my understanding is correct — and also clarify a few remaining points.

### ✅ My understanding so far:

1. To use the Inference API with a **pay-as-you-go** model, I first need to subscribe to the **Pro plan ($9/month)**. This includes **$2 of usage credits**.

2. After exceeding the $2 monthly credit, **each request is billed** according to usage time × machine cost per second.

3. For example, as stated in the docs:

I’ve been testing the sentiment analysis model `cardiffnlp/twitter-xlm-roberta-base-sentiment`, and here’s what I observed:

- Sending **200 comments as a batch** takes ~3 seconds
- Sending **1000 comments as a batch** takes ~13.2 seconds
- Since batching is possible, a single request containing an array of texts counts as **one request** , which is great!

Based on the $0.00012/sec GPU rate:

```auto
Cost per comment = (0.00012 × 13.2) / 1000 = ~$0.00000158
1 million comments = ~$1.58
To hit the $2 credit limit → ~1.26 million comments

```

Can you please confirm if this interpretation is correct?

* * *

### ❓Additional questions:

1. **Rate limits**  
I couldn’t find specific information on rate limits for the Inference API.

2. **Machine cost per second**

Thanks a lot in advance! Let me know if any part of my understanding needs correction.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [May 16, 2025, 1:56am UTC](https://discuss.huggingface.co/t/inference-api-rate-limits/155420/2 "2025-05-16T01:56:35Z")

</div>

> understanding 1, 2, 3

Maybe true.

> batching

Great! I didn’t know it…

> Rate limits

This seems to change depending on the current situation, so there is no clear information, but my personal impression is that it is relatively strict for the Free Plan. Even with the Pro Plan, it does not seem to be unlimited.

If you want unlimited usage, you will probably have to consider a Dedicated Endpoint.

> [@How to get around rate limits?](https://discuss.huggingface.co/t/how-to-get-around-rate-limits/151947):
>
> I’m trying to upload my first dataset. It’s only ~75,000 files and about 1GB but I was immediately I got 429 errors.

> [@Getting 429 Error for sentence-transformers/all-mpnet-base-v2](https://discuss.huggingface.co/t/getting-429-error-for-sentence-transformers-all-mpnet-base-v2/107670):
>
> Hi Everyone, I faced this rate limit error for the first time for sentence-transformers. 429 Client Error: Too Many Requests for url: [https://api-inference.huggingface.co/pipeline/feature-extraction/sentence-transformers/all-mpnet-base-v2](https://api-inference.huggingface.co/pipeline/feature-extraction/sentence-transformers/all-mpnet-base-v2) Anyone else faced this? How we can avoid this error?

> Machine cost per second

Could this be it…?

> **[Hugging Face – Pricing](https://huggingface.co/pricing#endpoints)**
>
> The simplest way to access compute for AI

I have never seen any information that seems to be definitively correct on this matter.

When the Inference Provider is HF, is it okay to assume that it is fluid as to which machine a given model will actually be hosted on? @meganariley
