Background texture

POST /v1/queue/{model}

POST/v1/queue/{model}

非同期の動画生成タスクを送信します。リクエスト ID とポーリング用 URL をすぐに返します。

リクエスト

パスパラメーター

パラメーター説明
modelstring動画モデル ID(例: veo-3veo-3-fast)。

ヘッダー

ヘッダー
AuthorizationBearer {api_key}
Content-Typeapplication/json

ボディ

{
  "prompt": "A drone shot flying over a coral reef at sunset",
  "parameters": {
    "aspect_ratio": "16:9",
    "resolution": "1080p",
    "duration_seconds": 8,
    "generate_audio": true
  }
}

パラメーター

パラメーター必須説明
promptstringはい動画のテキスト説明。
parametersobjectいいえ生成オプション(下記参照)。

parameters オブジェクト

フィールドデフォルト説明
aspect_ratiostring"16:9""16:9" または "9:16"
resolutionstring"720p""720p""1080p"、または "4k"
duration_secondsinteger8秒数。最大 8 秒
generate_audiobooleantrue音声トラックを含める
sample_countinteger1動画数(1–4)
negative_promptstring避けたい内容
imagestringimage-to-video 用の Base64 画像

レスポンス

ステータス: 202 Accepted

{
  "request_id": "Z2VtaW5pOnZlby0zOjg6NzIwcDoxOm9wLTEyMzQ1",
  "status": "IN_QUEUE",
  "status_url": "/v1/queue/veo-3/requests/Z2Vt.../status",
  "response_url": "/v1/queue/veo-3/requests/Z2Vt..."
}
フィールド説明
request_idstring一意のタスク識別子。
statusstring送信時は常に "IN_QUEUE"
status_urlstringステータス確認用の相対 URL。
response_urlstring完全な結果用の相対 URL。

ステータスコード

ステータス説明
202タスクを受け付けました
400不正なリクエスト、prompt 不足、または動画モデルではありません
401認証なし
402残高不足
502上流プロバイダーエラー

curl -X POST https://api.modelmax.io/v1/queue/veo-3 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $MODELMAX_API_KEY" \
  -d '{
    "prompt": "A cat playing piano in a jazz club"
  }'
import requests

resp = requests.post(
    "https://api.modelmax.io/v1/queue/veo-3",
    headers={"Authorization": "Bearer your-key"},
    json={"prompt": "A cat playing piano in a jazz club"},
)
task = resp.json()
print(task["request_id"])
const resp = await fetch("https://api.modelmax.io/v1/queue/veo-3", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer your-key",
  },
  body: JSON.stringify({ prompt: "A cat playing piano in a jazz club" }),
});
const task = await resp.json();
console.log(task.request_id);

次のステップ

タスクステータスをポーリングする → キュー状態