最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - anthropic.AuthenticationError: Error code: 401 invalid x-api-key - Stack Overflow

programmeradmin3浏览0评论

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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

Running 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

发布评论

评论列表(0)

  1. 暂无评论