Skip to main content
All CollectionsAI Providers & ModelsAI ConnectionsOpenAI
Error 400 using OpenAI: How to fix it.
Error 400 using OpenAI: How to fix it.

Can't chat or generate prompts when using OpenAI? Simply check your OpenAI account, add credits, and you're up and running again.

Promptitude Team avatar
Written by Promptitude Team
Updated over a week ago

If you're using Promptitude's chat or you're generating prompts and get Error 400 “Internal Error. Couldn't Connect. Please double-check the API key.", you're not alone.

This error typically appears when there's a billing issue with your OpenAI account. Recently, OpenAI has shifted its payment model from a postpaid to a prepaid system, which has led to some confusion.

Let's break down what this means for you and how you can quickly resolve this issue.

Understanding OpenAI's New Prepaid Billing

OpenAI has transitioned from a monthly billing cycle to a prepaid model. In simple terms, this means that instead of being billed at the end of the month for the services you used, you now need to pay upfront before you can access the services. This change requires you to add credits to your OpenAI account in advance.

Consequences of the Model Change

This shift to a prepaid model can lead to services being interrupted if your OpenAI account does not have sufficient prepaid credits. When the credits run low or are used up, the OpenAI API will stop functioning, leading to errors like the one you're experiencing.

How to Fix Error 400

Don’t worry, resolving this error is straightforward and simply involves ensuring your OpenAI account has adequate credits. Here’s what you need to do:

  • Check Your OpenAI Account Balance: Log into your OpenAI account and check the current balance of your prepaid credits.

  • Recharge Your Account:

    • Navigate to the billing section.

    • Select the option to add credits.

    • Enter the amount you wish to add and complete the transaction.

Additional tips:

  • Double-Check API Key: Sometimes, the error could also be due to an incorrect API key. Verify that the API key in your Promptitude settings matches the one in your OpenAI account.

  • Restart Your Requests: After adding credits and verifying your API key, try to resend your request to see if the issue is resolved.

Tips to Avoid Future Issues

  • Monitor Your Usage: Keep an eye on your usage stats to ensure you don’t run out of OpenAI credits unexpectedly.

  • Activate Automatic Recharge: OpenAI allows you automatically recharge your account when your credit balance falls below a certain threshold. We highly recommend activating this neat feature to avoid future disruptions.

  • Regularly Update Your Billing Details: Make sure your payment information is always up to date to avoid transaction issues when recharging your account.

Conclusion

OpenAI's transition from a postpaid to a prepaid model can be a bit tricky initially, but with a few simple steps, you can manage your account effectively and avoid service interruptions.

Always ensure you have enough credits, and keep your API key and billing information up to date.

If you follow these guidelines, you'll minimize disruptions and enjoy a smoother experience with Promptitude and OpenAI's services.

Did this answer your question?