Same issue this evening. Never seen this before. Looked at my account, no where near the quota (hardly touched it even). Never had issue with billing before as far as I can see the last invoice was paid.
Everything was working on the 6th March 2024 when I last ran my code.
{
“error”: {
“message”: “You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.”,
“type”: “insufficient_quota”,
“param”: null,
“code”: “insufficient_quota”
}
}
I think I found the issue (in my case at least) just looked at my email and see this from openAI yesterday…
Hi there,
We’ve updated the billing system for your [OpenAI API account](. Instead of receiving a bill at the end of the month, you will now pre-purchase credits to use the API. This change should enable you to access higher usage tiers more quickly. You can add credits to your account by visiting the [billing page]. To learn more about prepaid billing, please see this [help center article]
OK was right to have a bad feeling. Min credit spend is $6 and credits expire after a year… so this has gone from costing virtually nothing to being an annual service subscription.
Note the expiry clause is very well hidden…
“Service Credits are not refundable and expire one year after the date of purchase or issuance if not used, unless otherwise specified at the time of purchase.”
Well… that should help them pay for the law suit with Elon if they suddenly demanding all the devs pay up front…
yeah this definitely will be an on going problem forever this is the 8th time its given me this error out of all my 2 years with the api. the old way of making a new account/ a new key isn’t seeming to be working anymore either I have a 120 dollar limit its not just you lol.
For the record, I was getting this error when I definitively did not have a quota issue. It turned out that I was using a straight up string for the prompt instead of wrapping it in [ { "role": "user", "content": prompt, } ],
The API requires pre-purchase of a credit balance to fund services through a credit card payment method.
The initial payment through OpenAI processor can take minutes or many hours to unlock an account to be able to use services even when the “billing overview” no longer shows your credit balance is $0.00.