Inference API budget, billing limit

Hi, it would be nice to be able to limit inference API spending.

I like the simple OpenAI system: soft and hard limit.

Would be useful, especially when someone makes the mistake of an infinite loop calling the API :stuck_out_tongue:

12 Likes

Second this - a hard limit to billing would be fantastic

3 Likes

Actually hard and soft limit, i.e. to get warnings after exceeding soft limit (so one can e.g. reconsider budget, change app usage or whatever e.g. to stay operational, or increase hard limit before it kicks in) , and ofc hard limit for safety reasons!

3 Likes

Yes to both - I’d feel safer knowing I’d get en email notification if an improperly configured experiment starts blowing through our budget.

2 Likes

This feature is definitely overdue

5 Likes

Think how easy it is to implement ‘if expense > limit then stop & send email’… it’s not an oversight.

2 Likes

Any news on this front? The lack of a billing limit makes me afraid to use HF Spaces as a private user. What if my apps go viral and I have to pay hundreds to thousands of dollars?

2 Likes

Yes, I agree. I want to build a public app and this is an essential feature.

3 Likes

HF can you please implement this already???

1 Like

April 2025 and still looking for this feature.

How is this not a thing…

1 Like

Not limited to inference, but it seems like a $100 circuit breaker (variable) has been included by default for the past year or so…

I only have a Pro subscription, so I haven’t actually tried it to see if it works…

Hi @John6666, @FilippTrigub, and @im93! This feature now exists for Enterprise Hub organizations for Inference Providers billing! You can check out what setting a limit looks like in the screenshot here: Pricing and Billing.

For more info and to subscribe to Enterprise Hub, head here: Enterprise Hub - Hugging Face.

1 Like

@John6666 The $100 is the threshold limit and please note it doesn’t act as a spending cap. More info here: Billing.

1 Like

Thank you! Is that so…:sweat_smile:

So… In order to be able to set a hard limit I would have to subscribe to Enterprise which is $20/user with a required minimum of 10 users, so $200/month minimum. As a Pro user I have no way of limiting my spend? So if I have any kind of error in code, or make a mistake estimating the resource utilization I need, I could accidentally end up owing Hugging Face thousands, or tens of thousands of dollars? Am I understanding this correctly?

1 Like

Hi @mark1138 We also email friendly reminders on an account’s inference usage when billing hits certain milestones, like $10, $50, $100, etc. so you can be on the lookout and avoid any billing surprises in the future. :slight_smile:

2 Likes

Hi @meganariley Thank you for the quick reply. The reminders certainly make the situation much better and would set my mind more at ease. If there are any internal discussions about adding hard limits for the Pro level, please add my vote. I love everything else about Hugging Face, so that would make it perfect :slightly_smiling_face:

1 Like