#8706 DeepSeek: Authentication Fails, Your api key: ****quHF is invalid (request_id: 1b4b5288-1b07-4c64-bf4a-76ff0da3158c)http

2408**aed1 Posted at: 13 hours ago

DeepSeek: Authentication Fails, Your api key:


quHF is invalid (request_id: 1b4b5288-1b07-4c64-bf4a-76ff0da3158c)
https://api.deepseek.com/v1/
{'model': 'deepseek-v4-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 16384}
None,
Traceback (most recent call last):
File "videotrans\translator\_openaicompat.py", line 87, in _item_task
File "videotrans\translator\_openaicompat.py", line 39, in _create_completion
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:
quHF is invalid (request_id: 1b4b5288-1b07-4c64-bf4a-76ff0da3158c)', '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 71, in run
File "videotrans\translator\_base.py", line 82, in run
File "videotrans\translator\_base.py", line 165, 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 99, in _item_task
videotrans.configure.excepts.StopTask: Authentication Fails, Your api key:


quHF is invalid (request_id: 1b4b5288-1b07-4c64-bf4a-76ff0da3158c)
https://api.deepseek.com/v1/
{'model': 'deepseek-v4-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 16384}
None


=
system:Windows-10-10.0.19043-SP0
version:v4.18
frozen:True
language:zh_CN
root_dir:F:/pyvideotrans

1 Replies

#1 DeepSeek reply at 13 hours ago

核心原因:DeepSeek 服务端判定该 API Key 无效(HTTP 401 Authentication Fails),即密钥本身错误、已失效或账户异常,与软件本身、模型参数无关。

处理步骤:

  1. 登录 DeepSeek 开放平台 https://platform.deepseek.com/ ,进入「API keys」页面,确认该 Key(结尾为 quHF)是否仍然存在且状态正常。若已被删除、重置或过期,请点击「创建 API key」重新生成一个新密钥(新密钥只在创建时显示一次,请立即复制)。
  2. 检查账户状态:确认账户有可用余额(充值后余额大于 0),若余额为 0 或账户存在异常,请求会被拒绝。免费赠送额度用尽后也需充值。
  3. 回到软件,打开 菜单 → 翻译设置 → DeepSeek,清空原密钥输入框,重新粘贴新 Key。粘贴后注意:

    • 确认密钥首尾没有多余的空格、换行或引号;
    • 建议手动全选后重新复制,避免复制时丢失字符(报错中只显示末 4 位 quHF,无法判断是否被截断)。
  4. 确认 API 地址填写为 https://api.deepseek.com/v1/(你日志中显示该地址本身正确,保持即可)。
  5. 保存设置后,点击该设置窗口内的「测试」按钮或重新执行一次翻译任务验证;若仍报 401,请到 DeepSeek 平台确认该 Key 在浏览器中调用是否同样失败,以排除平台侧问题。

补充说明:401 是鉴权失败,不代表软件存在 bug;即使更换模型为 deepseek-v4-flash 也无法绕过。若你使用的是第三方中转/代理 Key(非 DeepSeek 官方),请确认中转服务商的密钥与地址匹配,必要时联系服务商。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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

Related resource