429 Error on Free API key

I just created an OpenAI account a few minutes ago, and I’m attempting to use some of the models in a very simple python script as a demo. All I have right now is:

import os

import openai

openai.api_key = “[API KEY REDACTED]”

response = openai.Completion.create(model=“text-davinci-003”, prompt=“Say this is a test”, temperature=0, max_tokens=7)


When I run the script, I get a 429 error:

“openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details.”

From my understanding OpenAI gives new users a 4 month free trial for up to $18 of free credit. Did this policy change or did I do something wrong? The only thing I can think of is that I created a second API key after I forgot to copy the first one to my clipboard (lol).

Thanks in advance.

1 Like

My guess is that you’re hitting to 20 requests per minutes (RPM) limit for free users.

I thought my script would only make a singular request, so how would this be possible?

It might help double-check your account usage to ensure there aren’t additional requests from a bug in your code.

As the author of an open-source plugin used by many free users of the OpenAI APIs, I have seen the 429 error code thrown many times because of exceeding the rate limits specified at the link in my last post.

Oops, figured it out. I forgot to save my updated code so it was using an old API key that was already drained without me knowing. Thanks for the help!

1 Like