#5333 {'model': 'deepseek-v4-flash', 'timeout': 300, 'max_completion_tokens': 32768, 'temperature': 0.1, 'reasoning_effort': '

114.88* Posted at: 12 hours ago

Error code: 401 - {'error': {'message': 'Authentication Fails, Your api key:


fee1 is invalid', 'type': 'authentication_error', 'param': None, 'code': 'invalid_request_error'}}
https://api.deepseek.com/v1/
{'model': 'deepseek-v4-flash', 'timeout': 300, 'max_completion_tokens': 32768, 'temperature': 0.1, 'reasoning_effort': 'high'}:Traceback (most recent call last):
File "videotrans\translator\_openaicompat.py", line 69, in _item_task
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:
fee1 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\__init__.py", line 860, in run
File "videotrans\translator\_base.py", line 68, in run
File "videotrans\translator\_base.py", line 142, 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 74, in _item_task
videotrans.configure.excepts.StopTask: Error code: 401 - {'error': {'message': 'Authentication Fails, Your api key:


fee1 is invalid', 'type': 'authentication_error', 'param': None, 'code': 'invalid_request_error'}}
https://api.deepseek.com/v1/
{'model': 'deepseek-v4-flash', 'timeout': 300, 'max_completion_tokens': 32768, 'temperature': 0.1, 'reasoning_effort': 'high'}


=
system:Windows-10-10.0.19045-SP0
version:v4.03
frozen:True
language:zh
root_dir:F:/BaiduNetdiskDownload/win-pyvideotrans-v4.03-0619

1 Replies

该报错是 DeepSeek API 认证失败,根本原因是您填入的 API Key 无效或已过期

请按以下步骤检查:

  1. 确认 API Key 来源:前往 DeepSeek 开放平台 登录后,在“API Keys”页面重新生成或查看您的密钥。注意:Key 通常以 sk- 开头。
  2. 检查填写位置:打开 pyVideoTrans,进入 菜单 -> 翻译设置 -> DeepSeek 设置,确保粘贴的是正确的完整 Key(不要多余空格或换行)。
  3. 测试 Key 有效性:可在浏览器中通过 curl 或在线工具测试该 Key 是否有效(例如发送一次简单请求),或直接在 DeepSeek 官网控制台测试。
  4. 账户余额:检查 DeepSeek 账户是否有可用余额或配额,部分免费额度可能已用完。

注意:日志中 frozen:True 表示您使用的是 Windows 预打包版,配置保存路径正常,无需担心权限问题。

请查阅相关文档:

Post Your Reply
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: ko-fi.com/jianchang512

Related resource