#8625 Authentication Fails, Your api key: ****Mr4g is invalid (request_id: c920c7e8-4982-41ef-8faf-33354a360d1c)https://api.de

89.185**9 Posted at: 1 hour ago

Authentication Fails, Your api key:


Mr4g is invalid (request_id: c920c7e8-4982-41ef-8faf-33354a360d1c)
https://api.deepseek.com/v1/
{'model': 'deepseek-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 16384}
None:Traceback (most recent call last):
File "videotrans\translator\_openaicompat.py", line 89, in _item_task
File "videotrans\translator\_openaicompat.py", line 41, 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:
Mr4g is invalid (request_id: c920c7e8-4982-41ef-8faf-33354a360d1c)', '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 100, in _item_task
videotrans.configure.excepts.StopTask: Authentication Fails, Your api key:


Mr4g is invalid (request_id: c920c7e8-4982-41ef-8faf-33354a360d1c)
https://api.deepseek.com/v1/
{'model': 'deepseek-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 16384}
None


=
system:Windows-10-10.0.26200-SP0
version:v4.17
frozen:True
language:zh_CN
root_dir:H:/translate_video

1 Replies

#1 DeepSeek reply at 1 hour ago

核心原因:DeepSeek 官方返回 401 AuthenticationError,即你填写的 API Key 被判定为无效(****Mr4g is invalid)。这与软件本身无关,是密钥问题,常见于:Key 复制不完整/多了空格、Key 已在平台被删除或重置、账户欠费或未实名、用错了平台的 Key(如把别的服务商的 Key 填到了 DeepSeek 里)。

处理步骤:

  1. 打开 菜单 → 翻译设置 → DeepSeek,清空当前 API Key。
  2. 登录 https://platform.deepseek.com/ ,进入「API keys」,删除旧 Key 后重新创建一个,复制完整字符串(sk- 开头,无首尾空格、无换行)。
  3. 粘贴回软件设置窗口保存,确认该账户余额 > 0(余额为 0 也会鉴权失败)。
  4. 回到主界面,翻译渠道选 DeepSeek,点击渠道设置里的「测试」按钮验证,通过后再执行任务。
  5. 若你使用的是第三方中转/代理地址(而非官方 https://api.deepseek.com/v1),必须同时把该中转平台提供的 Base URL 与对应 Key 成对填写,不可混用官方 Key 与中转地址。

补充:日志里的 deepseek-flash 模型名与此 401 无因果关系,密钥通过后若仍报「model not found / 无权限」,再到同一设置页切换为当前账号可用的模型即可。

请查阅相关文档:

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