#7756 Authentication Fails, Your api key: ****4-UA is invalid (request_id: ac18c29e-ba09-4ef9-a6d0-079db71d9e0f)https://api.de

90.1**0 Posted at: 2 hours ago

Authentication Fails, Your api key:


4-UA is invalid (request_id: ac18c29e-ba09-4ef9-a6d0-079db71d9e0f)
https://api.deepseek.com/v1/
{'model': 'deepseek-v4-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 32768}
Traceback (most recent call last):
File "videotrans\translator\_openaicompat.py", line 77, 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:
4-UA is invalid (request_id: ac18c29e-ba09-4ef9-a6d0-079db71d9e0f)', '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 83, in run
File "videotrans\task\_stage_translate.py", line 31, in trans
File "videotrans\translator\_runner.py", line 63, in run
File "videotrans\translator\_base.py", line 68, in run
File "videotrans\translator\_base.py", line 107, in _run_text
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 82, in _item_task
videotrans.configure.excepts.StopTask: Authentication Fails, Your api key:


4-UA is invalid (request_id: ac18c29e-ba09-4ef9-a6d0-079db71d9e0f)
https://api.deepseek.com/v1/
{'model': 'deepseek-v4-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 32768}

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: C:/Users/doris/Desktop/Nouveau dossier (2)/The Opener by Adrian Vega.mp4,
输出结果保存到文件夹: C:/Users/doris/Desktop/The Opener by Adrian Vega-mp4,
临时文件夹: C:/Users/doris/Desktop/Pyvideotrans/tmp/9164/41b81c5b69
未选 清理已存在
未启用CUDA加速
未选 降噪
STT Service:openai-whisper(Built-in), model_name: tiny, 发音语言: English, 断句方式:默认断句
TranslateSrt:DeepSeek,原始语言:English,目标语言:French, 未选 SendSRT
TTS Service:Edge-TTS (Free), 角色:Henri(Male/FR), 配音语言:French, 未选 二次语音识别
音量:+0%, 语速:+0%, 未选 音频加速, 已选 视频慢速
字幕: No Subtitles
已选 仅输出mp4
代理地址:


=
system:Windows-10-10.0.19045-SP0
version:v4.08
frozen:True
language:en
root_dir:C:/Users/doris/Desktop/Pyvideotrans

1 Replies

#1 DeepSeek reply at 2 hours ago

This is a DeepSeek API authentication failure (HTTP 401) — the API key you entered is invalid or not recognized by DeepSeek's server.

The error is returned directly by https://api.deepseek.com/v1/, not by the software itself.

Fixes:

  1. Verify your API key at https://platform.deepseek.com/ (log in → API Keys).

    Copy the full key; it typically starts with sk-.

    A truncated or mistyped key (as hinted by the masked ****4-UA) is the most common cause.
  2. Check that your DeepSeek account has a positive balance (充值).

    A key with no credit can also fail.

    DeepSeek allows a custom recharge amount (e.g., 1 CNY).
  3. In the software, go to Menu → Tools/Options → Translation Settings → DeepSeek, clear the old key and paste the new one, then save.
  4. Also confirm the base URL is exactly https://api.deepseek.com/v1/ with no trailing spaces or extra characters.
  5. Note: deepseek-v4-flash is used here.

    If your account’s model access differs, switch the model name accordingly, and if you want to disable thinking mode, uncheck the Thinking option (thinking mode requires a larger max_tokens).

If the key is confirmed valid and funded but still returns 401, the key may have been revoked/regenerated on the platform — create a new key and re-test.

Additional note (unrelated to this error, for accuracy): you have "视频慢速" (Slow video) enabled while "音频加速" (Audio speedup) is off.

This can greatly increase output file size.

Consider enabling "音频加速" as well, or disabling "视频慢速" if not strictly needed.

请查阅相关文档:

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