I’m trying to create a Chatbot with the OpenAI API, but I get the following error:
Error code: 429 – {‘error’: {‘message’: ‘You exceeded your current quota, please check your plan and billing details.
It is the first time I use the API so I have never consumed my monthly quota (I already tried creating the API Keys from two different accounts).
Could someone tell me how I can solve this error?
I followed the documentation directly from the OpenAI page to see if there was a problem with my code, but Even using the code provided in the official documentation, I still get the same error.
from openai import OpenAI
client = OpenAI()
completion = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "You are a poetic assistant, skilled in explaining complex programming concepts with creative flair."},
{"role": "user", "content": "Compose a poem that explains the concept of recursion in programming."}
]
)
print(completion.choices[0].message)
Jorge Prieto is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.