Getting an error even after making the secret key

I was getting an error so I tried with a different account. Now , it gives me an error as follows:

Kindly help!

Hi,
Please give the full error code for better understanding of the error…I think you have exceeded the free credits quota provided by OpenAI. Please create new account with a different email and different phone number. You will get free credits for the new account. You can replace the API key from the new account in your code. I think this will work…

Continuing the discussion from Getting an error even after making the secret key:

@vrushali.hawale09 please check your credit and share the complete code that you have written

My code :-

import openai
import os
import sys

openai.api_key = os.environ[‘OPENAI_API_KEY’]
if openai.api_key == “”:
sys.stderr.write(“”"
You haven’t set up your API key yet.

If you don’t have an API key yet, visit:

https://platform.openai.com/signup

  1. Make an account or sign in
  2. Click “View API Keys” from the top right menu.
  3. Click “Create new secret key”

Then, open the Secrets Tool and add OPENAI_API_KEY as a secret.
“”")
exit(1)

response = openai.chat.completions.create(
model=“gpt-3.5-turbo”,
messages=[{
“role”: “system”,
“content”: “You are a helpful assistant.”
}, {
“role”: “user”,
“content”: “Who won the world series in 2020?”
}, {
“role”:
“assistant”,
“content”:
“The Los Angeles Dodgers won the World Series in 2020.”
}, {
“role”: “user”,
“content”: “Where was it played?”
}])

print(response)

Hi @vrushali.hawale09

Please scroll down the output section and share a screenshot of the entire error message. This will help us to provide you with a better solution.

Here’s the output :-

Hi @vrushali.hawale09

In the above screenshot, the entire error message is not visible. Please scroll down at the end of the error message and then share the screenshot.

Hi @vrushali.hawale09 The error states that your QpenAI API credits are exhausted. Please create a new Open AI account using a new email id and new phone number. This way you will be able to get new credits

I actually tried that already. It was showing this error message before and now after making a new account with different email , it is still showing the same error.
Yet I will try again.
Thanks for the help…

1 Like

I created a new account for the 3rd time on Open AI , yet it is still showing the same error.

Kindly help and guide me about what I should do next.
Thank you.

@vrushali.hawale09
Hi!!!
First, please share your complete code.
Second change your code to
output = response.choices[0].message.content
at line number 36 I guess


:blush::blush:

@vrushali.hawale09 Apologies for the inconvenience. We will help you get the issue resolved.

Do you remember which option you chose while creating your new account on openAI? Was it google sign in or was it email id and password based sign in? Can you try again to create a new account with the email id and password approach with new set of email id and password and check if the credits are granted to you in the usage section.

I understand that you have already created multiple accounts hence it might be annoying. However I request you to try out the above suggestion once and let me know what is the result.

I created the new accounts using email id and password based sign in option itself . Still I am getting the error.

1 Like

Even we are facing the exact same issue. Already tried the troubleshooting steps detailed above.

Detailed Error Description - The code you are running is encountering an error related to rate limiting. This error occurs because you have exceeded your current quota for making requests to the OpenAI API. The specific error code is 429, and the error message indicates that you need to check your plan and billing details as you have reached your usage limit. The error message provides a link to the documentation for more information on this type of error.

@vrushali.hawale09 thank you for the update.
Please open the settings section for the openAI accounts you have created and share the screenshot with us on our Whatsapp number 9309051639.

Also share screenshot of the organzation section and the usage section. We will review your information and send it to openAI team for checking why the credits were not granted for your account.

@j.david2000

Please open the settings section for the openAI accounts you have created and share the screenshot with us on our Whatsapp number 9309051639.

Also share screenshot of the organzation section and the usage section. We will review your information and send it to openAI team for checking why the credits were not granted for your account.

I am also facing the exact issue.Tried the steps mentioned above but they did not work.

The error description is same as @j.david2000.

Please help.

So, what can I do about it further?
How can I get credits?