It was working fine on Friday morning but in the evening I start getting error: StatusCodeError: 400 - {"error":{"code":"billing_hard_limit_reached","message":"Billing hard limit has been reached","param":null,"type":"invalid_request_error"}}
I just started using the API and I shouldn’t already reached credit limit, and I didn’t do more than 50 images per minutes.
I created another account and use a different API Key but I still get the above error.
Anyone could help me with this matter?
At the following is the full payload and response:
curl https://api.openai.com/v1/images/generations \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer sk-...................." \
-d '{
"prompt": "a white siamese cat",
"n": 1,
"size": "1024x1024"
}'
{
"error": {
"code": "billing_hard_limit_reached",
"message": "Billing hard limit has been reached",
"param": null,
"type": "invalid_request_error"
}
}
Hey @klosezhang, out of curiosity, have you checked your usage limits? There is a hard limit you can set there which mentions that once you surpass it, every subsequent request will get rejected
Thank you for the reply.
After investigation, it is confirmed that the free trail account is running out of free credit. Even I created another account later on, however, as the mobile number I use to create the account is the same, hence I didn’t get free credits for my 2nd account, hence the new API key generated for the 2nd account does not work neither.
Account free trial credits expire after three months from account creation. That is even if you only created an account to use ChatGPT, and had never heard the word “API” until today.
For an account with expired trial credits (which would be everyone in this nine-month-old topic), you would need to purchase prepaid credits with a minimum purchase of $5 in order to use the OpenAI API.
If the message you receive is exactly “billing hard limit”, that error is from the monthly budget limit that you set for yourself on your own account.
Here’s where you can view the setting and your spending, and change the threshold.
Thanks.
Yesterday, all models include chat, tts, asr and dall-e API are working. And today they are all show “billing hard limit” mean all models use the same budget limitation. Am I right?
Yes, that is the main setting for your account. Your usage for just a few days this month is what you set the monthly hard limit to. You limit your own account with that setting.
ChatGPT subscription does not fund or enable API. Nor is it necessary.
They use completely separate billing systems, where you pay for the amount of language data transferred on API.
Read the full message of an error; is it along the lines of “check your plan and billing”, meaning you don’t have any prepaid credits in your API account?