0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

pythonでopenai APIを実行したときに`Incorrect API key provided: sk-proj-`と表示されてしまう際の対策備忘録

Posted at

pythonでopenai APIを実行したときにIncorrect API key provided: sk-proj-と表示されてしまう。
→ API Keyを再発行して利用すればOKである事が多い。
→ API keyが無効になっているか、間違っているか、利用不可になっている(例えばAPI KEYをうっかり公開してしまい自動的に利用不可になったなど)

raise self._make_status_error_from_response(err.response) from None
openai.AuthenticationError: Error code: 401 - {'error': {'message': 'Incorrect API key provided: sk-proj-************************************************************************************************************************GDYA. You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?