"message":"Invalid API Key"

I’ve created an environment variable where I store my api key and whenever I try to initialize my index by calling it I get an unauthorized authentication error, “Invalid API Key” error message. But if I just call the api key in my code cell without using an environment variable it works.

code: “index = pc.Index(“llama-index-rag-fs”)”

Please I need help with this.

@ghostbandit02 can you share the code where you’re using the API key via environment variable? And dumb question, but did you test to make sure the variable is available in your local env?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.