Error code: 429 You exceeded your current quota, please check your plan and billing details

I am a beginner in AI, so sorry if the question could sound stupid.

I got the API code from Open AI. I saved it in the same directory where my jupyter notebook is. I run all the necessary setup

import os
from dotenv import load_dotenv
from openai import OpenAI
load_dotenv(‘.env’, override=True)
openai_api_key = os.getenv(‘OPENAI_API_KEY’)
client = OpenAI(api_key = openai_api_key)

and when I tried to replicate simple exercise:

prompt = “What is the capital of France?”
response = get_llm_response(prompt)
print(response)

I got already the error that I exceeded my quota. I am confused as it was my first request. Could someone help me please?

you must have run down the codes in the assignment environment which is also counted in your quota, so assignments codes are used by learners with usuage limit.

But I didn´t have the API code when I did the assignments on the Jupyter notebook on the deeplearning platform. And I can still get_llm_response from the Jupyter on deeplearning platform…

Each user is assigned a limit usage even in work environment, also try to use search tool to find similar thread where you might find solutions to your issue as you haven’t shared any screenshot of the error you got i cannot say much.

Regards
DP

Yes you did have an API code, indirectly. You were using the API code provided by the course.