#8593 Authentication Fails, Your api key: ****nPrr is invalid (request_id: 56d768c7-5e67-4c52-9d6d-03acb9f5c825)https://api.de

2408**c8c6 Posted at: 1 hour ago

Authentication Fails, Your api key:


nPrr is invalid (request_id: 56d768c7-5e67-4c52-9d6d-03acb9f5c825)
https://api.deepseek.com/v1/
{'model': 'deepseek-v4-pro', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 16384}:Traceback (most recent call last):
File "videotrans\translator\_openaicompat.py", line 98, 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:
nPrr is invalid (request_id: 56d768c7-5e67-4c52-9d6d-03acb9f5c825)', '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 75, in run
File "videotrans\translator\_base.py", line 72, in run
File "videotrans\translator\_base.py", line 155, 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 109, in _item_task
videotrans.configure.excepts.StopTask: Authentication Fails, Your api key:


nPrr is invalid (request_id: 56d768c7-5e67-4c52-9d6d-03acb9f5c825)
https://api.deepseek.com/v1/
{'model': 'deepseek-v4-pro', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 16384}


=
system:Windows-10-10.0.19045-SP0
version:v4.14
frozen:True
language:zh_CN
root_dir:D:/Program Files (x86)/pyvideotrans4.14

1 Replies

#1 DeepSeek reply at 1 hour ago

问题的核心原因:DeepSeek 的 API 密钥(Key)无效或已过期,服务端返回 401 AuthenticationError,与软件本身无关;软件只是原样转发了服务端的拒绝信息。

解决步骤

  1. 核对密钥是否正确粘贴:打开 菜单 → 翻译设置 → DeepSeek,清空原有密钥后重新粘贴。注意不要带多余的空格、换行,也不要粘贴成其他渠道的 Key。报错中显示 ****nPrr,请确认这个结尾是否与你后台密钥的结尾一致,不一致说明填错了。
  2. 确认密钥状态:登录 https://platform.deepseek.com/ ,进入「API keys」页面,确认该 Key 仍处于启用状态且未被删除;如果已失效,请新建一个 Key(新建后只显示一次,务必立即复制)。同时确认账户余额 > 0,欠费账号同样会认证失败。
  3. 确认 API 地址:DeepSeek 官方地址应为 https://api.deepseek.com/v1,若被改动请恢复;如果你使用中转平台,请填写该平台的地址和对应 Key,两者必须匹配。
  4. 测试:保存后点击翻译设置面板中的测试按钮,返回正常即可。
  5. 附带提醒(非本次报错原因,但会引发后续问题):你的软件安装在 D:/Program Files (x86)/pyvideotrans4.14,这属于系统受保护目录,容易导致临时文件写入失败、合成报错。建议将整个软件文件夹移动到 D:/pyvideotrans 这类纯英文浅层路径下再使用。
  6. 另外,当前版本为 v4.14,最新为 v4.17,建议更新(注意需覆盖补丁包内所有文件及 _internal、videotrans 文件夹,不要只覆盖 sp.exe)。

请查阅相关文档:

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