#6940 Authentication Fails, Your api key: ****w08Q is invalidhttps://api.deepseek.com/v1/

31.94**1 Posted at: 2 hours ago

Authentication Fails, Your api key:


w08Q is invalid
https://api.deepseek.com/v1/
{'model': 'deepseek-v4-pro', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 65536}
Traceback (most recent call last):
File "videotrans\translator\_openaicompat.py", line 90, in _item_task
File "videotrans\translator\_openaicompat.py", line 51, 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:
w08Q 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\task\only_one.py", line 89, in run
File "videotrans\task\_stage_translate.py", line 31, in trans
File "videotrans\translator\_runner.py", line 67, in run
File "videotrans\translator\_base.py", line 71, in run
File "videotrans\translator\_base.py", line 209, 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 95, in _item_task
videotrans.configure.excepts.StopTask: Authentication Fails, Your api key:


w08Q is invalid
https://api.deepseek.com/v1/
{'model': 'deepseek-v4-pro', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 65536}

cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: C:/Users/mohammad/OneDrive/Desktop/38B.mp4,
输出结果保存到文件夹: C:/Users/mohammad/OneDrive/Desktop/_video_out/38B-mp4,
临时文件夹: D:/New folder/tmp/19060/ec1bb64a51
已选 清理已存在
已启用CUDA加速
未选 降噪
STT Service:faster-whisper(Built-in), large-v3-turbo, 发音语言: English, 断句方式:默认断句
TranslateSrt:DeepSeek,原始语言:English,目标语言:Persian, 已选 SendSRT
TTS Service:Edge-TTS (Free), 角色:Dilara(Female/IR), 配音语言:Persian, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
字幕: Soft Subtitles


=
system:Windows-10-10.0.26200-SP0
version:v4.11
frozen:True
language:en
root_dir:D:/New folder

1 Replies

#1 DeepSeek reply at 2 hours ago

The core cause is directly shown in the error: DeepSeek's server rejected your API key with a 401 AuthenticationError. The key ****w08Q is recognized by the server as invalid. This is a credential-side issue, not a pyVideoTrans bug.

Solutions

  1. Verify the key at the source
    Log in to https://platform.deepseek.com/ and go to the API Keys page. Confirm the key exists, has not been deleted or regenerated, and is the full key (not truncated).
  2. Re-copy the key without extra characters
    When copying from the DeepSeek platform, ensure you select the entire key with no leading/trailing spaces, no line breaks, and no accidental partial-copy. Then paste it into the software:
    Menu → 翻译设置 → DeepSeek → API Key.
  3. Check your account balance
    DeepSeek API requires prepaid balance. Even with a valid key, if the account balance is 0 or insufficient, requests may fail (sometimes showing authentication-style errors). Go to the platform and confirm you have topped up at least 1 CNY.
  4. Confirm the API address is correct
    In the software's DeepSeek settings, the API address should be https://api.deepseek.com/v1/ (as shown in your log). If you changed it, revert to this default.
  5. Generate a fresh API key
    If the above steps don't help, revoke the old key on the DeepSeek platform and generate a new one. Then update it in the software and try again.
  6. Try a different translation channel as a quick fallback
    If you need to proceed urgently, switch the translation channel to Google (Free) or M2M100 (Built-in) in the main interface, then go back to DeepSeek once the key issue is resolved.

Please refer to the relevant documentation:

If you have re-entered a correct key and still get the same error, please provide the latest log file from logs/ (bottom ~30 lines) for further analysis.

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