I am trying to use gpt api but i get this: 'Failed to access gpt: Error code: 429'

i found the problem … Error code: 429 - {‘error’: {‘message’: ‘You exceeded your current quota, please check your plan and billing details}
this message error is wrong. the problem was not billing .
it was your documents about using api in python … when i use this it worked:
os.environ[‘OPENAI_API_KEY’] = os.getenv(“OPEN_AI_API_KEY”)

but in your tutorial u said use this:
client = OpenAI( api = os.getenv(“OPEN_AI_API_KEY”))

this last code cause me the issue … wasted 4 days to find

1 Like