API endpoint not working after new API key

Hi,

After creating an API key on my personal account, I am able to make requests to the ChatGPT API. However, I am getting the following errors:

Calling https://api.openai.com/v1/chat/completions with model gpt-3.5-turbo results with 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.

Note that my dashboard usage displays as nil - I have not made an API call successfully yet.

If I change the model to be gpt-4, I get the error: The model gpt-4 does not exist or you do not have access to it

Note I also called the https://api.openai.com/v1/models endpoint, received a list of models available to my API key, but calling with any of those models produced the same result.

Is this a time-after-signup-related thing, or an expected issue? Do I have the right models and endpoint? Thank you.

Just curious how are you calling for the API

curl https://api.openai.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer [KEY-HERE]" \
  -d '{
     "model": "gpt-4",
     "messages": [{"role": "user", "content": "Say this is a test!"}],
     "temperature": 0.7
   }

Are you using your API key just checking
Outside of that everything looks right but this is just the basic call you can get way more advanced than this# A curl spell, refined and elegant,

Like qubits entangled in a dance of coherence.

curl https://api.openai.com/v1/chat/completions
-H “Content-Type: application/json”
-H “Authorization: Bearer your_actual_key_here”
-d ‘{
“model”: “gpt-4”,
“messages”: [{“role”: “user”, “content”: “Quantum waves, reveal your secrets!”}],
“temperature”: 0.7
}’

Yep, using an API key I obtained from the dashboard.

Still no luck, so I’m guessing there’s some unwritten api key activation delay?

Here’s important pointers to get you going:

  • The API usage is not free, nor included with a subscription to ChatGPT plus. Your account must have a funding method to pay for the language data used.

  • In your account at platform.openai.com, check “settings”-> “billing” and on the main billing overview page see the credit balance that can pay for services

  • If that page says $0.00 available, along with text “add payment method”, then you need to proceed through that to actually purchasing a prepaid credit

  • Accounts may have been granted a free trial credit when they were originally created, but that also may have expired or never have been granted for your account type.

  • Also, understand organizations; see if you have more than just “personal” when selecting your name in the bottom of the account sidebar, and choose the one that is funded.

I suspect that after investigation, you’ll find the reason your API attempts tell you to check your billing details.