Open Interpreter Authentication Issue After Setting OPENAI_API_KEY in Conda Environment

Hello everyone,

I’ve installed Open Interpreter in a Conda environment and initially had it working as expected. Wanting to streamline the process, I decided to permanently set my OpenAI API key. I used the following command within my activated Conda environment:

setx OPENAI_API_KEY “new_api_key_here”

After running this command, Open Interpreter no longer prompts me for the OpenAI API key, which is good. However, I’ve run into an issue; it doesn’t work anymore. Whenever I try to use the console, I get the following error message:

raise self.handle_error_response(
openai.error.AuthenticationError: Incorrect API key provided: your_api_key. You can find your API key at OpenAI Platform.

Here’s what I’ve tried to resolve the issue so far:

  • Rebooting my system.
  • Uninstalling and re-installing Open Interpreter.
  • Updating the OpenAI API key with the setx command again. It tells me that the environment variable has been updated successfully.

Despite these efforts, the error message remains the same, and I’m unable to use Open Interpreter.

Does anyone have any insights on where i’m being an idiot here? Any help would be greatly appreciated.

Thank you in advance!

Hi and welcome to the Developer Forum!

Have you reached out to Open Interpreter? SO long as your API key works in the playground, then everything from the OpenAI side is working, if anyone on this forum is familiar with Open Interpreter perhaps they can comment, but it would be best to enquire with them as it’s not an OpenAI application.

I found this guide on youtube

Hey, thank you very much for you response. this is indeed the video i found that I followed in order to get it to work in the first place. It does indeed seems that my api key is working. I was just hoping that I made an easy oversight here. But if I try to use the openai key via the openai python the key does work. I will try to look if somebody in the open interpreter github is able to help me. When it was working it was really great, could just point it to documents on my computer to interpret :D.

1 Like