#8556 翻译字幕阶段出错 [DeepSeek] Authentication Fails, Your api key: **** Key is invalid (request_id: dba19965-2659-4122-acf2-7a556a3

171.213**1 Posted at: 2 hours ago

翻译字幕阶段出错 [DeepSeek] Authentication Fails, Your api key:


Key is invalid (request_id: dba19965-2659-4122-acf2-7a556a3ea8df)
https://api.deepseek.com/v1/
{'model': 'deepseek-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 16384}
{'thinking': {'type': 'disabled'}}
Traceback (most recent call last):

File "videotrans\translator\_openaicompat.py", line 90, in _item_task

File "videotrans\translator\_openaicompat.py", line 40, 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:


Key is invalid (request_id: dba19965-2659-4122-acf2-7a556a3ea8df)', 'type': 'authentication_error', 'param': None, 'code': 'invalid_request_error'}}

The ab
......
py", line 136, in process_task

File "videotrans\task\_stage_translate.py", line 31, in trans

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 101, in _item_task

videotrans.configure.excepts.StopTask: Authentication Fails, Your api key:


Key is invalid (request_id: dba19965-2659-4122-acf2-7a556a3ea8df)
https://api.deepseek.com/v1/
{'model': 'deepseek-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 16384}
{'thinking': {'type': 'disabled'}}
trk=[TransCreate]: uuid='b0727cb84a', proxy_str=None, cfg=[TaskCfgVTT]当前工作模式: 翻译视频 批量翻译模式
原始输入文件名: C:/Users/83178/Desktop/dfq/dvrcc4.mp4,
输出结果保存到文件夹: C:/Users/83178/Desktop/dfq/_video_out/dvrcc4-mp4,
临时文件夹: C:/Users/83178/Desktop/win-pyvideotrans-v4.16/tmp/24704/b0727cb84a
已选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 英语, LLM纠错
翻译渠道:DeepSeek,原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
配音渠道:Edge-TTS(免费), 角色:Yunxi(Male/CN), 配音语言:简体中文, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
已选 移除每条字幕配音开头和结尾静音缓冲
静音移除力度: default
字幕: 嵌入硬字幕 , precent=12, hasend=False, should_recogn=True, should_trans=True, should_dubbing=True, should_hebing=True, is_copy_video=True, video_codec_num=264, ignore_align=False, is_audio_trans=False, clone_ref='', should_recogn2=False, do_diarize=False


=
system:Windows-10-10.0.26300-SP0
version:v4.16
frozen:True
language:zh_CN
root_dir:C:/Users/83178/Desktop/win-pyvideotrans-v4.16

1 Replies

#1 DeepSeek reply at 2 hours ago

这是因为 DeepSeek 的 API Key 无效(错误码 401 Authentication Fails),翻译环节调用 DeepSeek 接口时认证失败,导致翻译字幕阶段直接终止。与软件本身、视频、识别、配音均无关。

排查与解决步骤:

  1. 登录 DeepSeek 开放平台,进入「API keys」页面,确认 Key 是否存在、是否已被删除或重置。
  2. 在软件顶部菜单 → 翻译设置 → DeepSeek,清空原 Key,重新粘贴新的 Key。

    • 粘贴后请检查 Key 首尾没有多余空格、换行、引号。
    • 不要使用带前缀的格式(如 Bearer )。
  3. 检查账户余额:DeepSeek 余额为 0 时,也可能返回认证类错误,需充值(可最低充值 1 元)。
  4. 确认模型名有效:报错中显示使用的是 deepseek-flash,请在 DeepSeek 设置面板中确认该模型名与你账户所支持的模型一致,若不确定,切换为平台当前提供的对话模型。
  5. 保存设置后,重新点击开始执行,并在界面上勾选 清理已生成,避免复用缓存的失败状态。

补充说明: 该报错属于 StopTask(不可重试错误),软件不会自动重试,必须在无效 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