> ## Content Index
> Fetch the complete content index at: https://www.bramadams.dev/llms.txt
> Use this file to discover other available public pages before exploring further.

# No OpenAI API Key Provided Error
- URL: https://www.bramadams.dev/202301222307/
- Published: 2023-01-27T05:54:35.000Z
- Updated: 2023-01-27T05:54:35.000Z
- Author: Bram Adams
- Tags: programming

Check for `load_dotenv()` being called for `python-dotenv`

```sh
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.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  ...

```