#7164 Authentication Fails, Your api key: ****5d81 is invalidhttps://api.deepseek.com/v1/

180.93**2 Posted at: 2 hours ago

Authentication Fails, Your api key:


5d81 is invalid
https://api.deepseek.com/v1/
{'model': 'deepseek-v4-flash', 'timeout': 300, 'temperature': 0.2, 'max_tokens': 32768, 'reasoning_effort': 'high'}:Traceback (most recent call last):
File "videotrans\translator\_openaicompat.py", line 88, in _item_task
File "videotrans\translator\_openaicompat.py", line 48, 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:
5d81 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 67, in run
File "videotrans\translator\_base.py", line 70, in run
File "videotrans\translator\_base.py", line 153, 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 94, in _item_task
videotrans.configure.excepts.StopTask: Authentication Fails, Your api key:


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


=
system:Windows-10-10.0.22631-SP0
version:v4.12
frozen:True
language:zh
root_dir:D:/pyVideoTrans/win-pyvideotrans-v4.07

1 Replies

#1 DeepSeek reply at 2 hours ago

这是由于 DeepSeek API 密钥无效导致认证失败,与软件本身无关。

原因

错误信息 AuthenticationError: 401 - Authentication Fails, Your api key: ****5d81 is invalid 明确指出:您填入的 DeepSeek API 密钥(尾号为 5d81)不被 DeepSeek 服务器认可。

解决方案

  1. 访问 https://platform.deepseek.com/ 登录您的账号
  2. 进入「API Keys」页面,重新创建一个新的 API Key
  3. 务必确认账户有余额(DeepSeek 需充值后才能调用,可自定义充值 1 元起)
  4. 复制新的完整 Key(注意不要带多余空格)
  5. 在软件中点击顶部菜单 设置 → 翻译设置 → DeepSeek,将新 Key 粘贴替换,保存
  6. 重新执行任务

补充说明

  • 若您使用的是第三方中转/代理的 DeepSeek Key,请确认其 API 地址是否为 https://api.deepseek.com/v1/,中转服务通常不兼容此官方地址。
  • 若确认 Key 无误但仍报错,请检查 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