I had an issue accessing the Anthropic API. It was giving me 401 error.
anthropic.AuthenticationError: Error code: 401 - {'type': 'error', 'error': {'type': 'authentication_error', 'message': 'invalid x-api-key'}}
I generated a fresh API KEY, and it didn't work either.
I had an issue accessing the Anthropic API. It was giving me 401 error.
anthropic.AuthenticationError: Error code: 401 - {'type': 'error', 'error': {'type': 'authentication_error', 'message': 'invalid x-api-key'}}
I generated a fresh API KEY, and it didn't work either.
Share Improve this question asked Nov 21, 2024 at 3:06 Abu ShoebAbu Shoeb 5,1524 gold badges45 silver badges49 bronze badges1 Answer
Reset to default 0Running the following code block in a Python Notebook gave me a detailed message about the error. Then, I realized that I needed to add credits or payment methods. After loading some credits using a credit card, it started working