Skip to content

OpenAI API Invalid Organisation/Mismatch Error 401 #4373

Closed Answered by s25roy
s25roy asked this question in Q&A
Discussion options

You must be logged in to vote

I found the source of the error: I had earlier set a .env file for access through a Jupyter notebook in JupyterLab and moved the .env file to a different directory. The .env file had an OpenAI API key and OPENAI_ORGANIZATION="org-*" value. I lost track of the file and couldn't find it, thinking it had been removed. Checked using the find . -name '*.env' command in terminal and it located the .env file in my conda env folder. This was presumably passing the header through the Langflow OpenAI Model and overriding any other default setting. Deleting the .env file solved the issue and the model builds with a response from gpt-4o when prompted.

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
10 replies
@dosubot
Comment options

@s25roy
Comment options

@dosubot
Comment options

@s25roy
Comment options

@dosubot
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by s25roy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant