API keys not working

Hello everyone,
I am using groq api and today I got an unexpected error with error code 401 and it says invalid api key. I then made few new api keys but all of them are giving me the same error. I am still puzzled cause this has never happened before.

I also tried initializing client as client = Groq(api_key=os.getenv("GROQ_API_KEY"))
but it still gave me the same error.

Anyone who can help with this?

I tried closing my vscode window and then reopening it. Its now running fine with the exact same code. Don’t know the reason behind this.

You are the first person I have seen who has confirmed their Groq API keys are working. I have not managed it, and seems numerous requests online are unresolved.

Hi, Mike, what have you tried to get your API keys working? We have many users who use Groq daily without issue. Would love to help you get your API keys setup.