Dear OpenAI Support,
I am a paying client, but I was unable to utilise the help option because the link is not active. I have return to start doing some development after some months and having no end of trouble where it was not an issue in the past.
I am encountering a persistent rate limit error with my API key, despite having no visible activity in my usage dashboard. Here are the details:
-
API Key: [sk-proj*******Ggn3a]
-
Error Message:
$ py api_test.py
Rate limit error: 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.
Please check your plan and billing details: https://platform.openai.com/account/billing -
Steps Taken:
- Verified the API key is correct and valid.
- Created a new API key and updated the script.
- Ran a minimal test script (see below) to verify functionality.
- Checked billing details and subscription plan.
- Ensured stable network connection without proxies or firewalls.
- Tried running the script in a different environment.
- Script Used:
import openai
OPENAI_API_KEY = "your_new_openai_api_key"
openai.api_key = OPENAI_API_KEY
def test_openai_api():
try:
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello, can you confirm that the API is working?"}
]
)
print("API response:", response.choices[0].message['content'].strip())
except openai.error.RateLimitError as e:
print(f"Rate limit error: {e}\nPlease check your plan and billing details: https://platform.openai.com/account/billing")
except openai.error.AuthenticationError as e:
print(f"Authentication error: {e}\nPlease check your API key.")
except openai.error.APIConnectionError as e:
print(f"API connection error: {e}\nPlease check your network connection.")
except openai.error.OpenAIError as e:
print(f"An error occurred: {e}")
if __name__ == "__main__":
test_openai_api()
Despite these efforts, the issue persists, and no usage is reflected in the dashboard. Your assistance in resolving this matter would be greatly appreciated.
Best regards, Marc Dimmick