Claude Opus 5.5 が SeedRouter で利用できます

Model APIs

MAGI-2

View Markdown

SeedRouter における MAGI-2 テキストから動画、最初/最後のフレーム画像から動画、マルチモーダル参照から動画生成の非同期 API リファレンス。

MAGI-2 は Sand.ai の 480B ネイティブ音声・動画モデルです。SeedRouter では、統一された非同期動画エンドポイント(POST /v1/videos/generations)上の 3 つの公開モデル ID を通じて提供され、タスクのポーリングは GET /v1/tasks/{id} で行います。

モデル IDモード必須入力
magi-2-text-to-videoテキストから動画prompt(空白不可、最大 15,000 文字)
magi-2-image-to-video最初 / 最初と最後のフレーム画像から動画image_urls(公開 HTTP/HTTPS 画像 URL を 1〜2 件)
magi-2-reference-to-videoマルチモーダル参照から動画image_urls、video_urls、audio_urls のうち少なくとも 1 つ

3 つすべてのルートで、4〜30 秒(整数)の 1080p MP4 動画を生成でき、同期されたセリフ・効果音・音楽もオプションで含められます(デフォルトは generate_audio: true)。

エンドポイントと認証

  • タスク送信: POST https://api.seedrouter.ai/v1/videos/generations
  • タスク状態のポーリング: GET https://api.seedrouter.ai/v1/tasks/{id}
  • 認証: Authorization: Bearer YOUR_API_KEY
  • Content-Type: application/json

リクエストパラメータ

未定義のフィールドは HTTP 400(invalid_request_error)で拒否されます。

パラメータ型デフォルト制約と説明
modelstring必須magi-2-text-to-video、magi-2-image-to-video、または magi-2-reference-to-video。
promptstring—magi-2-text-to-video では必須。image-to-video と reference-to-video では任意。指定する場合は空白不可で最大 15,000 文字。
image_urlsstring[]—公開 HTTP/HTTPS 画像 URL(Base64 や data: URI は不可、各 30 MB 未満)。magi-2-text-to-video では指定不可。magi-2-image-to-video では 1 枚(最初のフレーム)または 2 枚(最初と最後のフレーム)が必須。magi-2-reference-to-video では最大 10 枚まで指定可能。
video_urlsstring[]—magi-2-reference-to-video 専用。公開 HTTP/HTTPS の MP4/MOV 参照動画を最大 5 本(各 200 MB 以下、2〜30 秒、合計 30 秒以下)。
audio_urlsstring[]—magi-2-reference-to-video 専用。公開 HTTP/HTTPS の WAV/MP3 参照音声トラックを最大 5 本(各 15 MB 以下、2〜30 秒、合計 30 秒以下)。
durationinteger5出力動画の長さ(秒)。4〜30 の整数。
qualitystring"1080p"出力解像度。現在は "1080p"。
aspect_ratiostring"16:9""16:9"、"9:16"、"1:1"、"4:3"、"3:4"、"21:9" のいずれか。
generate_audiobooleantrue追加料金なしで同期されたセリフ、効果音、音楽を生成します。無音動画にする場合は false を指定してください。
seedinteger—再現性のある実行のための任意の乱数シード(0〜4294967295)。

使用例

1. テキストから動画

curl -X POST https://api.seedrouter.ai/v1/videos/generations \
  -H "Authorization: Bearer $SEEDROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "magi-2-text-to-video",
    "prompt": "Continuous 5-second tracking shot through a rainy Tokyo alley at dusk, neon reflections on wet asphalt, distant train rumble and footsteps",
    "duration": 5,
    "quality": "1080p",
    "aspect_ratio": "16:9",
    "generate_audio": true
  }'

2. 画像から動画(最初 / 最後のフレーム)

curl -X POST https://api.seedrouter.ai/v1/videos/generations \
  -H "Authorization: Bearer $SEEDROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "magi-2-image-to-video",
    "prompt": "The camera slowly pushes in as subtle natural motion brings the frame to life",
    "image_urls": [
      "https://example.com/first-frame.jpg"
    ],
    "duration": 5,
    "quality": "1080p",
    "aspect_ratio": "16:9",
    "generate_audio": true
  }'

3. 参照から動画

curl -X POST https://api.seedrouter.ai/v1/videos/generations \
  -H "Authorization: Bearer $SEEDROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "magi-2-reference-to-video",
    "prompt": "The same character walks through a sunlit street market, handheld tracking shot",
    "image_urls": [
      "https://example.com/character.jpg"
    ],
    "duration": 5,
    "quality": "1080p",
    "aspect_ratio": "16:9",
    "generate_audio": true
  }'

4. タスク結果のポーリング

curl https://api.seedrouter.ai/v1/tasks/task_xxxxxxxx \
  -H "Authorization: Bearer $SEEDROUTER_API_KEY"

送信時のレスポンスは次のとおりです。

{
  "id": "task_xxxxxxxx",
  "model": "magi-2-text-to-video",
  "status": "processing",
  "created_at": 1764120000
}

ポーリング結果が "status": "completed" になると、出力された MP4 の URL が output.video_url に含まれます。

{
  "id": "task_xxxxxxxx",
  "model": "magi-2-text-to-video",
  "status": "completed",
  "created_at": 1764120000,
  "finished_at": 1764120095,
  "output": {
    "video_url": "https://static.seedrouter.ai/..."
  }
}

課金

3 つすべての MAGI-2 ルートは、1080p でリクエストした出力秒数(duration は 4〜30 秒)に応じて課金されます。参照画像、参照動画、参照音声トラック、同期音声生成に追加料金はかかりません。失敗したタスクは課金されません。

現在のリアルタイム秒単価は MAGI-2 モデルページ をご覧ください。