You exceeded your current quota, please check your plan and billing details

I want to make me an discord bot that is hosted by I used chatgpt to write the code for the bot. I finally got the bot online and i wrote him !chat hello then i got this message on Does anyone know how to fix this? (i dont want to pay anything)

Usually this can be solved by adding a payment method.
Once you add a payment method, you should create a new API key and use that. Revoke the old one.

Actually I’m making the chatbot (running only on terminal) using opneai api but when I’m running the index.mjs file it’s giving me the error!

Error generating chat completion: RateLimitError: You exceeded your current quota, please check your plan and billing details.
at APIError.generate (file:///D:/terminal-chatbot/node_modules/openai/error.mjs:49:14)
at OpenAI.makeStatusError (file:///D:/terminal-chatbot/node_modules/openai/core.mjs:256:21)
at OpenAI.makeRequest (file:///D:/terminal-chatbot/node_modules/openai/core.mjs:296:24)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async generateChatCompletion (file:///D:/terminal-chatbot/index.mjs:13:28) {
status: 429,

Have you attached a credit card to your account?

Is it working from Playground?

I suspect that you might be utilizing a free tier of the service, which likely comes with a designated quota limit. My understanding is that this limit allows for a maximum of three API calls per minute.

1 Like

No I haven’t done.
What should I do to fix this error?
is there any fees required to use apikey.

So, what should I do?
Do I need to generate a new :old_key: key?

The API is pay-per-use, by the amount of data sent and received (counted as tokens).

You must add a payment method specifically for the API, a credit card to be billed monthly.

1 Like

Hi, I have the same problem. It says I exceeded the current quota, but I just used like 20% of my quota.

My API Keys and also Playground stopped working. I added two new payment methods, removed the old ones, but it is still not working. I already waited for a couple of hours, but the error keeps showing on Playground and in my app.

How to fix this? I didn’t hit my soft or hard limit at all.

I also have the same issue, I only consumed less than half of my limit and it stopped working with the ‘quota exceeded’ error.
I changed the payment method, I created a new key and revoked the old one, still not working…