I’m trying to use the OpenAI API , but I’m encountering an error message that says
raise self._make_status_error_from_response(err.response) from None
openai.RateLimitError: Error code: 429 - {'error': {'message': 'You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.', 'type': 'insufficient_quota', 'param': None, 'code': 'insufficient_quota'}}
even though my usage is 0% and also I have bought openAI plus for monthly.
I checked openAI document to write down the code, Here’s the code I’m using:
import openai
api_key = 'my api key'
openai.api_key = api_key
completion = openai.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)
and i just want OpenAI API to generate a completion.