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

2408**aed1 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

这是 API Key 鉴权失败(HTTP 401),与模型、max_tokens、thinking 参数无关:DeepSeek 服务端认定你填写的密钥 ****quHF 无效,通常是密钥填错、已被删除或重置、复制时带入空格换行,或者把第三方中转平台的 key 填到了 DeepSeek 官方渠道。

处理步骤:

  1. 打开 https://platform.deepseek.com/ 登录,进入 API keys 页面确认该 key 是否仍存在(被删除/重置的 key 立即失效),并确认账户有余额、未欠费。
  2. 重新创建一个新 API Key。密钥只在创建时完整显示一次,请一次性完整复制,确保复制内容首尾无空格、无换行、无多余引号。
  3. 回到软件:菜单 → 翻译设置 → DeepSeek,清空原密钥输入框后粘贴新密钥并保存;若使用了中转/兼容服务,请改到「OpenAI兼容/兼容AI」渠道填写,且 API 地址与 key 必须属于同一平台。
  4. DeepSeek 官方默认地址为 https://api.deepseek.com/v1/,无需修改;如你改过地址,请恢复为上述地址。
  5. 保存后可用「翻译字幕」功能做一次小测试,确认报错消失。

常见误填:把其他平台(如中转站、硅基流动、302.AI)的 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