Unable to get passed the Auth API Key Error 401

Getting Error code: 401
mismatched_project
“OpenAI-Project header should match project for API key”

I keep checking and the project key is in place. Even if I try a key with no project, it then says no project ID ‘$project’ found in organization, even though the project is listed there! Its so weird everything seems to check out but I get these errors.

Fixed: Be sure to not lose track of the .env file in the home directory along with your code as there is more than one way to set the api key.