#9098 DeepSeek: Authentication Fails, Your api key: ****0h-g is invalid (request_id: ab646283-9113-4afc-98e1-2b0c41b3b223)http

118.74**5 Posted at: 9 hours ago

DeepSeek: Authentication Fails, Your api key:


0h-g is invalid (request_id: ab646283-9113-4afc-98e1-2b0c41b3b223)
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 99, 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:
0h-g is invalid (request_id: ab646283-9113-4afc-98e1-2b0c41b3b223)', 'type': 'authentication_error', 'param': None, 'code': 'authentication_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 112, in _item_task
videotrans.configure.excepts.StopTask: Authentication Fails, Your api key:


0h-g is invalid (request_id: ab646283-9113-4afc-98e1-2b0c41b3b223)
https://api.deepseek.com/v1/
{'model': 'deepseek-v4-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 16384}
None


=
system:Windows-10-10.0.26200-SP0
version:v4.20
frozen:True
language:zh_CN
root_dir:D:/AI/win-pyvideotrans-v4.20

1 Replies

#1 DeepSeek reply at 9 hours ago

DeepSeek API Key 无效(401 Authentication Fails),即填写的密钥本身不正确、已过期或被删除,所以与软件功能无关。

解决步骤

  1. 登录 DeepSeek 开放平台 https://platform.deepseek.com/ ,进入「API Keys」页面。
  2. 检查密钥是否仍存在;如果已删除,或已过期,请新建一个 API Key。
  3. 注意不要有多余字符:复制时务必完整、不要带前后空格,也不要漏字符。报错中显示 ****0h-g 只是末尾片段,请核对完整串是否一致。
  4. 在软件中打开 菜单 → 翻译设置 → DeepSeek,清空原密钥后重新粘贴,保存。
  5. 同时确认 DeepSeek 账户 余额充足(欠费或余额为 0 时也可能返回认证类错误)。
  6. 在软件右下角点击对应渠道的 测试 按钮,验证密钥是否生效。

补充排查

  • 若确认密钥无误仍报 401,检查是否在 翻译设置 里把其他平台的 Key 误填进 DeepSeek 渠道(各渠道 Key 不能混用)。
  • 若你使用的是第三方中转服务,API 地址应填你中转商提供的地址,而非官方 https://api.deepseek.com/v1/。
  • 报错中 {'model': 'deepseek-v4-flash'...} 说明已正常发起请求,问题纯粹在密钥鉴权,更换有效 Key 即可恢复。

请查阅相关文档:

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