#8707 DeepSeek: Authentication Fails, Your api key: ****quHF is invalid (request_id: 4b8eb7f0-1a5f-4236-83e9-616e1ec8403b)http

101.205**0 Posted at: 13 hours ago

DeepSeek: Authentication Fails, Your api key:


quHF is invalid (request_id: 4b8eb7f0-1a5f-4236-83e9-616e1ec8403b)
https://api.deepseek.com/v1/
{'model': 'deepseek-v4-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 16384, 'reasoning_effort': 'high'}
{'thinking': {'type': 'enabled'}},
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: 4b8eb7f0-1a5f-4236-83e9-616e1ec8403b)', '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: 4b8eb7f0-1a5f-4236-83e9-616e1ec8403b)
https://api.deepseek.com/v1/
{'model': 'deepseek-v4-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 16384, 'reasoning_effort': 'high'}
{'thinking': {'type': 'enabled'}}


=
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 服务端返回的 401 认证失败:报错明确表示你填写的 API Key(末四位 quHF)无效,与软件本身无关,而是密钥错误、被删除/重置,或填写时混入了多余字符。

排查与解决步骤:

  1. 核对密钥本身

    • 登录 https://platform.deepseek.com/api_keys ,确认该 Key 是否仍存在于列表中(未被删除、未被重置),并确认账户已充值、余额不为 0。
    • 若不确定,直接点击「创建 API key」新建一个密钥(新密钥只在创建时完整显示一次,务必立即复制)。
  2. 正确粘贴到软件

    • 打开菜单 → 翻译设置 → DeepSeek,先将密钥输入框内容全部清空,再粘贴新 Key。
    • 注意粘贴时不要带首尾空格、换行,也不要带入 Bearer 前缀或引号。
    • 保存后重新执行翻译或点击测试。
  3. 确认接口地址与渠道匹配

    • 必须使用 DeepSeek 官方申请的 Key 搭配 https://api.deepseek.com/v1/。若 Key 来自第三方中转平台,则该地址需替换为中转平台提供的地址,不能混用。
  4. 附带提示(非本错误原因)

    • 日志中 reasoning_effort: high 与 thinking: enabled 表示已开启思考模式,配合 max_tokens 16384 在长字幕批次时可能触发截断类报错。若后续出现 Could not parse response content,可在 DeepSeek 设置界面将 思考深度 改为 none,并降低 高级选项-字幕翻译-AI翻译渠道每批字幕行数。

若按上述更换新 Key 后仍报同样的 401,请提供软件安装目录下 logs/ 文件夹中最新日志底部约 30 行内容以便进一步分析。

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