深度理解文本、图像、音频和视频等多模态上下文及其相互关系,通过复杂逻辑推理生成结构化表达,并在尽量保持用户原始意图的前提下丰富语义细节。本接口只返回增强提示词,**不创建视频** 。
Video is billed by duration. Unlisted resolutions use the fallback price. Duration is rounded up to the billing unit.
This model has no supply routes yet.
import os
import time
import requests
API_BASE = "https://api.openroute.cn/api/minimax"
headers = {
"Authorization": f"Bearer {os.environ['ONTOROUTE_API_KEY']}",
"Content-Type": "application/json",
}
created = requests.post(
f"{API_BASE}/v2/video_generation",
headers=headers,
json={
"model": "minimax-h3-context-ir",
"content": [
{"type": "text", "text": "一只可爱的猫在窗台晒太阳,镜头缓慢拉近"},
],
"duration": 5,
"resolution": "768P",
},
)
created.raise_for_status()
task_id = created.json()["task_id"]
while True:
query = requests.get(f"{API_BASE}/v2/query/video_generation/{task_id}", headers=headers)
query.raise_for_status()
data = query.json()
if data.get("status") == "Success":
print(data["content"]["url"])
break
if data.get("status") == "Fail":
raise RuntimeError(data)
time.sleep(10)暂无调用数据
No routes available.
This model does not publish tunable parameters.