#8222 Invalid API Key, for details please view 302.AIhttps://api.302.ai/v1/

193.235**0 Posted at: 1 hour ago

Invalid API Key, for details please view 302.AI
https://api.302.ai/v1/
{'model': 'deepseek-v4-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 65536}
None: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': {'err_code': -10002, 'message': 'Invalid API Key, for details please view 302.AI', 'message_cn': '无效的API KEY,更多请访问 302.AI', 'message_jp': '無効なAPIキーです。詳細は 302.AI をご覧ください。 ', 'type': 'api_error'}}

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
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: Invalid API Key, for details please view 302.AI
https://api.302.ai/v1/
{'model': 'deepseek-v4-flash', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 65536}
None


=
system:Windows-10-10.0.19045-SP0
version:v4.16
frozen:True
language:ru
root_dir:D:/pyVideoTrans

1 Replies

#1 DeepSeek reply at 1 hour ago

This is caused by an invalid or unauthorized 302.AI API key. The 302.AI service rejected your request with HTTP 401, meaning the key you entered is not recognized, has expired, or has insufficient balance.

Solution

  1. Open the 302.AI platform (https://302.ai) and log in to your account.
  2. Go to the API key management page and confirm your key is active and has available balance/credits.
  3. Copy the key again carefully (no extra spaces, no line breaks).
  4. In pyVideoTrans, go to Menu -> Translation Settings -> 302.AI (or the corresponding 302.AI configuration window) and paste the correct key.
  5. Save the settings and retry the translation.

If the key is correct but still fails, check whether your 302.AI account has been banned or the key was revoked. You may need to create a new key.

Please consult the relevant documentation:

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