#8720 翻译字幕阶段出错 [DeepSeek] Authentication Fails, Your api key: ****4647 is invalid (request_id: e7b53ba4-456b-4726-a6c0-4245eae

240e**72ec Posted at: 3 hours ago

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


4647 is invalid (request_id: e7b53ba4-456b-4726-a6c0-4245eaec0591)
https://api.deepseek.com/v1/
{'model': 'deepseek-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 16384, 'reasoning_effort': 'none'}
{'thinking': {'type': 'disabled'}}
Traceback (most recent call last):
File "videotrans\translator\_openaicompat.py", line 87, in _item_task
File "videotrans\translator\_openaicompat.py", line 39, 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:
4647 is invalid (request_id: e7b53ba4-456b-4726-a6c0-4245eaec0591)', 'type': 'authentication_error', 'param': None, 'code': 'invalid_request_error'
......
y", 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 99, in _item_task
videotrans.configure.excepts.StopTask: Authentication Fails, Your api key:
4647 is invalid (request_id: e7b53ba4-456b-4726-a6c0-4245eaec0591)
https://api.deepseek.com/v1/
{'model': 'deepseek-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 16384, 'reasoning_effort': 'none'}
{'thinking': {'type': 'disabled'}}

trk=翻译视频 单视频模式
选择音视频文件: C:/Users/Lzxli/Downloads/Video/PPBD-268 巨乳突出来了!波尔蒂奥尖叫起来!弓身! 100 次最佳的连续性高潮,伴随著乳房的弹跳和向后倾.mp4,
输出目录: C:/Users/Lzxli/Downloads/Video/_video_out/PPBD-268 巨乳突出来了!波尔蒂奥尖叫起来!弓身! 100 次最佳的连续性高潮,伴随著乳房的弹跳和向后倾-mp4,
self.cfg.cache_folder='D:/pyVideoTrans/tmp/44496/bd3e910136'
已选 清理已生成, 已选 CUDA加速
语音识别:faster-whisper(内置), large-v3, 发音语言: 日语
最长语音持续(秒): 5s
最短语音持续(毫秒): 1000ms
静音分割持续毫秒: 600ms
语音阈值: 0.45
选择VAD: silero
计算数据类型:default
识别准确度beam_size:5
识别准确度best_of:5
启用上下文感知:False
重复惩罚:1.0
文本压缩率:2.4
翻译渠道:DeepSeek,发音语言:日语,目标语言:简体中文
已选 发送完整字幕, AI翻译渠道每批字幕行数:40
Dont dubbing: self.cfg.voice_role='No'
嵌入硬字幕
中日韩字幕单行字符数:15, 其他语言字幕单行字符数:40
video duration:14166000ms
video information:{'video_fps': 24.0, 'r_frame_rate': 24.0, 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 1280, 'height': 720, 'time': 14166000, 'streams_len': 2, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}
self.cfg=TaskCfgVTT(uuid='bd3e910136', name='C:/Users/Lzxli/Downloads/Video/PPBD-268 巨乳突出来了!波尔蒂奥尖叫起来!弓身! 100 次最佳的连续性高潮,伴随著乳房的弹跳和向后倾.mp4', dirname='C:/Users/Lzxli/Downloads/Video', noextname='PPBD-268 巨乳突出来了!波尔蒂奥尖叫起来!弓身! 100 次最佳的连续性高潮,伴随著乳房的弹跳和向后倾', basename='PPBD-268 巨乳突出来了!波尔蒂奥尖叫起来!弓身! 100 次最佳的连续性高潮,伴随著乳房的弹跳和向后倾.mp4', ext='mp4', target_dir='C:/Users/Lzxli/Downloads/Video/_video_out/PPBD-268 巨乳突出来了!波尔蒂奥尖叫起来!弓身! 100 次最佳的连续性高潮,伴随著乳房的弹跳和向后倾-mp4', cache_folder='D:/pyVideoTrans/tmp/44496/bd3e910136', is_cuda=True, source_language='日语', source_language_code='ja', source_sub='C:/Users/Lzxli/Downloads/Video/_video_out/PPBD-268 巨乳突出来了!波尔蒂奥尖叫起来!弓身! 100 次最佳的连续性高潮,伴随著乳房的弹跳和向后倾-mp4/ja.srt', source_wav='D:/pyVideoTrans/tmp/44496/bd3e910136/ja.wav', source_wav_output='C:/Users/Lzxli/Downloads/Video/_video_out/PPBD-268 巨乳突出来了!波尔蒂奥尖叫起来!弓身! 100 次最佳的连续性高潮,伴随著乳房的弹跳和向后倾-mp4/ja.m4a', target_language='简体中文', target_language_code='zh-cn', target_sub='C:/Users/Lzxli/Downloads/Video/_video_out/PPBD-268 巨乳突出来了!波尔蒂奥尖叫起来!弓身! 100 次最佳的连续性高潮,伴随著乳房的弹跳和向后倾-mp4/zh-cn.srt', target_wav='D:/pyVideoTrans/tmp/44496/bd3e910136/target.wav', target_wav_output='C:/Users/Lzxli/Downloads/Video/_video_out/PPBD-268 巨乳突出来了!波尔蒂奥尖叫起来!弓身! 100 次最佳的连续性高潮,伴随著乳房的弹跳和向后倾-mp4/zh-cn.m4a', translate_type=5, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='No', voice_autorate=True, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='ja', recogn_type=0, model_name='large-v3', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=False, fix_punc=0, app_mode='biaozhun', subtitle_language=None, targetdir_mp4='C:/Users/Lzxli/Downloads/Video/_video_out/PPBD-268 巨乳突出来了!波尔蒂奥尖叫起来!弓身! 100 次最佳的连续性高潮,伴随著乳房的弹跳和向后倾-mp4/PPBD-268 巨乳突出来了!波尔蒂奥尖叫起来!弓身! 100 次最佳的连续性高潮,伴随著乳房的弹跳和向后倾.mp4', novoice_mp4='D:/pyVideoTrans/tmp/44496/bd3e910136/novoice.mp4', is_separate=False, embed_bgm=True, instrument='D:/pyVideoTrans/tmp/44496/bd3e910136/instrument.wav', vocal='D:/pyVideoTrans/tmp/44496/bd3e910136/vocal.wav', clear_cache=True, background_music='', subtitle_type=1, only_out_mp4=False, recogn2pass=False, output_srt=2, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=0.8, batch=False)
video_duration_ms=14166000


=
system:Windows-10-10.0.26200-SP0
version:v4.18
frozen:True
language:zh_CN
root_dir:D:/pyVideoTrans

1 Replies

#1 DeepSeek reply at 3 hours ago

这是由于 DeepSeek 渠道的 API 密钥无效导致的,返回码为 401 认证失败。软件本身并无问题,问题出在密钥本身或密钥的填写上。

排查与解决步骤:

  1. 登录 DeepSeek 开放平台(https://platform.deepseek.com/),进入「API keys」页面,确认该 key(尾号 4647)是否仍然存在、是否已被删除或禁用。
  2. 检查账户余额:余额为 0 时,部分接口也会返回认证或权限类错误。请确认账户已充值。
  3. 重新生成密钥:在该页面新建一个 API key,点击复制(注意不要带入首尾空格、换行)。
  4. 重新填写并保存:打开软件菜单 翻译设置 → DeepSeek,把新 key 粘贴到密钥框中,点击保存。API 地址保持 https://api.deepseek.com。
  5. 确认密钥与地址匹配:如果你使用的是第三方中转站或聚合平台,其 key 无法在官方 api.deepseek.com 地址下使用,两者必须配对。中转的 key 请填写到 OpenAI兼容渠道 或对应的中转渠道中。
  6. 清缓存重试:回到主界面,勾选 清理已生成 后重新执行,避免复用旧的失败状态。
补充:从 v4.16 起,软件对 params.json 中的参数名做过规范化调整,部分渠道的 SK、API 地址在升级后可能需要重新填写一遍,这也是此报错的常见诱因。

若确认 key 在官方平台有效、余额充足、重新填写保存后仍报同样错误,请提供软件目录下 logs/ 文件夹中最新日志的底部约 30 行内容以便进一步分析。

请查阅相关文档:

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