#6970 This model is only available through the Batch API. Use the /api/beta/batches endpoint instead.https://openrouter.ai/api

2405**7e14 Posted at: 1 hour ago

This model is only available through the Batch API. Use the /api/beta/batches endpoint instead.
https://openrouter.ai/api/v1
{'model': 'google/gemini-3.7-flash:batch', 'timeout': 300, 'temperature': 0.2, 'max_tokens': 8192, 'reasoning_effort': 'high'}: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.NotFoundError: Error code: 404 - {'error': {'message': 'This model is only available through the Batch API. Use the /api/beta/batches endpoint instead.', 'code': 404}}

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 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: This model is only available through the Batch API. Use the /api/beta/batches endpoint instead.
https://openrouter.ai/api/v1
{'model': 'google/gemini-3.7-flash:batch', 'timeout': 300, 'temperature': 0.2, 'max_tokens': 8192, 'reasoning_effort': 'high'}


=
system:Windows-10-10.0.22631-SP0
version:v4.11
frozen:True
language:zh
root_dir:D:/pyVideoTrans/win-pyvideotrans-v4.07

1 Replies

#1 DeepSeek reply at 1 hour ago

这是模型选择错误导致的问题:您当前在OpenRouter兼容渠道中配置的模型名为 google/gemini-3.7-flash:batch,该模型仅支持 Batch API 接口,而 pyVideoTrans 的翻译调用走的是标准 Chat Completions 接口(/v1/chat/completions),因此返回404错误。

解决方法

  1. 更换模型:在软件“翻译设置”或“OpenAI兼容渠道”中,将模型名改为不带 :batch 后缀的普通模型,例如:

    • google/gemini-3.7-flash
    • google/gemini-2.5-flash
    • openai/gpt-4o-mini 等(需确认OpenRouter上可用)
  2. 确认模型名完全一致:模型名需与OpenRouter后台「Models」页面展示的一致,不要手动拼接 :batch
  3. 检查API地址:确保填写的是 https://openrouter.ai/api/v1(正确),而非其他自定义地址。

修改后重新执行翻译任务即可。

请查阅相关文档:

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