Hi, I have looked for search other questions and tried way to debug before I have to post up here.
TL; DR, I was working on a project using OpenAI Response API and stored the key in .env file. I tried many times with just the key, key with project ID, key with org ID. None of it works.
I also noticed that API key can only created if it is associated with a given project. Is it not possible to create account / org level API key for general use not specific to project scope? Thanks
Codes below is created for my API testing:
Error msg: openai.AuthenticationError: Error code: 401 - {‘error’: {‘message’: ‘Incorrect API key provided: [api-key] You can find your API key at https://platform.openai.com/account/api-keys.’, ‘type’: ‘invalid_request_error’, ‘param’: None, ‘code’: ‘invalid_api_key’}}