API Rate Limit error before 1st use

Hello,

I’m trying to make an API call to ChatGPT for the 1st time, but for some reason I keep getting the below error message. I haven’t made my first API call yet so I can’t have reached the limit, is this on my end or a server issue? Also attaching the code I’m using.

Error Message

{'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'}}

Code

import os
from openai import OpenAI

client = OpenAI(
    # This is the default and can be omitted
    api_key='My_Key'
)

chat_completion = client.chat.completions.create(
    messages=[
        {
            "role": "user",
            "content": "Say this is a test",
        }
    ],
    model="gpt-3.5-turbo",
)

Hi, welcome. Please look at the related post that shows you how your usage on your dashboard should look like.

Ah I see, OpenAI API is not covered by free tier? If not, will mark as resolved and thanks very much!

Welcome @ritahayden55

You need to load credits to consume the API, which is separate from ChatGPT.

I’m having the same issue.
The code was working fine for about 8 responses and then said i reach the rate limit. This somehow resolved itself but now i’m getting the “you’ve reached your quota”
i’ve seen here a few fixes including adding an ORG ID, which this did not solve it. I have plenty of credits, an active payment method and everything.

Arc_GQUIFq3gbn

@cxj05h In your dashboard, look on the upper right for a gear icon. That should be your account settings. Click that icon, then look on the left panel. Click Limits then Rate Limits. Look for the model that you are using to see if the allocated RPM matches your expectation.
There’s more rate limit info in the docs.

Oops, forgot about the second part. For the quota, look in your dashboard and get to the project associated with the key you are using for your program. Then look at the Usage for your project. What does that look like?


that’s overkill. i’m the only one using the api for this…

that was just what was used while i was testing it…