#7771 Authentication Fails, Your api key: ****c4a0 is invalid (request_id: a82b6ced-a11a-405d-bbc5-78447d0c12d3)https://api.de

39.68**1 Posted at: 18 hours ago

Authentication Fails, Your api key:


c4a0 is invalid (request_id: a82b6ced-a11a-405d-bbc5-78447d0c12d3)
https://api.deepseek.com/v1/
{'model': 'deepseek-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 16384, 'reasoning_effort': 'high'}
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:
c4a0 is invalid (request_id: a82b6ced-a11a-405d-bbc5-78447d0c12d3)', '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\task\only_one.py", line 89, in run
File "videotrans\task\_stage_translate.py", line 31, in trans
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:


c4a0 is invalid (request_id: a82b6ced-a11a-405d-bbc5-78447d0c12d3)
https://api.deepseek.com/v1/
{'model': 'deepseek-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 16384, 'reasoning_effort': 'high'}

cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: C:/Users/1/Videos/shadow_1790916176564_1928.mp4,
输出结果保存到文件夹: C:/Users/1/Videos/bilibili/shadow_1790916176564_1928-mp4,
临时文件夹: D://tmp/18572/7916826b60
已选 清理已存在
已启用CUDA加速
已选 降噪
语音识别:faster-whisper(内置), tiny, 发音语言: 英语, 断句方式:默认断句
翻译渠道:DeepSeek,原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
配音渠道:Edge-TTS(免费), 角色:Yunyang(Male/CN), 配音语言:简体中文, 已选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 已选 视频慢速
字幕: 不嵌入字幕
已选 分离人声与背景声, 已选 重新嵌入背景声, 背景音量0.8, 背景声音时长 短于 视频时长时: 拉长(降速播放),存在分离后的纯净人声文件,存在分离后的背景声音文件
已选 仅输出mp4
video_duration_ms=917516


=
system:Windows-10-10.0.19045-SP0
version:v4.14
frozen:True
language:zh_CN
root_dir:D:/

1 Replies

#1 DeepSeek reply at 18 hours ago

错误核心原因:DeepSeek API 密钥无效(api key:


c4a0)。

服务端返回 401 认证失败,与软件本身无关,属于密钥配置问题。

常见原因:

  1. 密钥复制错误(多复制了空格、换行,或复制不全)。

  2. 密钥已在 DeepSeek 平台被删除或重置。

  3. 账户未充值/余额不足导致密钥被停用。

  4. 填错了位置(例如把别家平台的 key 填到了 DeepSeek 位置)。

操作步骤:

  1. 登录 DeepSeek 开放平台 https://platform.deepseek.com/ ,进入「API Keys」页面。

  2. 重新创建一个新的 API Key,立即完整复制(密钥只显示一次)。

  3. 打开 pyVideoTrans,菜单 → 翻译设置 → DeepSeek,将旧的 key 清空后粘贴新 key,保存。

  4. 确认账户已有余额(可自定义充值 1 元)。

  5. 重新执行任务。

    若之前失败过,请勾选「清理已生成」再重试,避免使用缓存。

  6. 注意:填写 key 时不要带引号、空格或换行。

补充说明:日志中 model: deepseek-flash 是软件侧模型名,只要 key 有效即可正常工作;若 key 有效仍报错,再检查网络代理是否影响了 api.deepseek.com 的访问。

请查阅相关文档:

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