I've got some problems with the Authentification to OpenAI in my python code. It seems like, OpenAI doesn't accept my key. I did a new on and tried it with other ones before. I always get the same issues. I just copied and pasted the key, same for the organization. There isn't a typo. There is another problem, but I don't know, why the authentifitaion failed.
Here is my code: I used it in the same way like the OpenAI Website https://platform.openai.com/docs/api-reference/authentication?lang=python
import os
import openai
openai.organization = "org-CXk0SUzbnyzzCLcaSBCFAV64"
openai.api_key = os.getenv("sk-**********************************************9Q")
openai.Model.list()
It produces the follwing error:
openai.error.AuthenticationError: No API key provided. You can set your API key in code using 'openai.api_key = <API-KEY>', or you can set the environment variable OPENAI_API_KEY=<API-KEY>). If your API key is stored in a file, you can point the openai module at it with 'openai.api_key_path = <PATH>'. You can generate API keys in the OpenAI web interface. See https://onboard.openai.com for details, or email support@openai.com if you have any questions.
Did anyone had the some issues before? Are there any solutions?