#6220 Authentication Fails, Your api key: ****3m5z is invalidhttps://api.deepseek.com/v1/

2602:f919* Posted at: 21 hours ago

Authentication Fails, Your api key:


3m5z is invalid
https://api.deepseek.com/v1/
{'model': 'deepseek-v4-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 32768, 'reasoning_effort': 'high'}:Traceback (most recent call last):
File "videotrans\translator\_openaicompat.py", line 77, in _item_task
File "openai\_utils\_utils.py", line 298, in wrapper
File "openai\resources\chat\completions\completions.py", line 1215, in create
File "openai\_base_client.py", line 1332, in post
File "openai\_base_client.py", line 1105, in request
openai.AuthenticationError: Error code: 401 - {'error': {'message': 'Authentication Fails, Your api key:
3m5z is invalid', 'type': 'authentication_error', 'param': None, 'code': 'invalid_request_error'}}

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\_runner.py", line 63, in run
File "videotrans\translator\_base.py", line 71, in run
File "videotrans\translator\_base.py", line 204, in _run_srt
File "tenacity\__init__.py", line 338, in wrapped_f
File "tenacity\__init__.py", line 477, in call
File "tenacity\__init__.py", line 378, in iter
File "tenacity\__init__.py", line 400, in
File "concurrent\futures\_base.py", line 451, in result
File "concurrent\futures\_base.py", line 403, in __get_result
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_openaicompat.py", line 82, in _item_task
videotrans.configure.excepts.StopTask: Authentication Fails, Your api key:


3m5z is invalid
https://api.deepseek.com/v1/
{'model': 'deepseek-v4-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 32768, 'reasoning_effort': 'high'}


=
system:Windows-10-10.0.26200-SP0
version:v4.08
frozen:True
language:zh
root_dir:D:/tool/win-pyvideotrans-v4.08

1 Replies

这是 DeepSeek API 密钥校验失败导致的认证错误(HTTP 401)。请求已到达 DeepSeek 服务器,但服务器明确拒绝了该密钥,说明问题不在网络,而在密钥本身或其账户状态。

按以下步骤排查:

  1. 核验密钥正确性:登录 DeepSeek 开放平台(platform.deepseek.com),重新复制 API Key。注意不要复制多余空格、换行或前后引号;确认密钥以 sk- 开头且完整无误。
  2. 检查密钥是否已删除/重置:如果此前重置过密钥,旧密钥会立即失效,需在软件中更新为新密钥。
  3. 检查账户余额:DeepSeek 账户余额不足 0 或未开通相应模型权限,即使密钥有效也可能返回认证失败。请登录平台确认账户有余量,且已开通 deepseek-v4-flash 模型使用权限。
  4. 重新填写并测试:打开 菜单 -> 翻译设置 -> DeepSeek 设置面板,重新粘贴正确的 API Key,保存后再次测试连接。

如果以上步骤确认无误但问题依旧,请提供 DeepSeek 平台账户的完整截图(隐藏中间字符)以及软件 logs/ 目录下最新日志,以便进一步定位。

请查阅相关文档:

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Dondate via ko-fi.com

Dondate via PayPal

Related resource