Claude Opus 5.5 is live on SeedRouter

Model APIs

MAGI-2

View Markdown

Asynchronous API reference for MAGI-2 text-to-video, first/last-frame image-to-video, and multimodal reference-to-video generation on SeedRouter.

MAGI-2 is Sand.ai's 480B native audio-video model. On SeedRouter it is served through three public model IDs on the unified asynchronous video endpoint (POST /v1/videos/generations), with task polling at GET /v1/tasks/{id}.

Model IDModeRequired Input
magi-2-text-to-videoText-to-Videoprompt (non-blank, up to 15,000 characters)
magi-2-image-to-videoFirst / First-and-Last Frame Image-to-Videoimage_urls (1–2 public HTTP/HTTPS image URLs)
magi-2-reference-to-videoMultimodal Reference-to-VideoAt least one of image_urls, video_urls, or audio_urls

All three routes generate 1080p MP4 video from 4 to 30 seconds (integer) with optional synchronized dialogue, sound effects, and music (generate_audio: true by default).

Endpoints & Authentication

  • Submit task: POST https://api.seedrouter.ai/v1/videos/generations
  • Poll task status: GET https://api.seedrouter.ai/v1/tasks/{id}
  • Authentication: Authorization: Bearer YOUR_API_KEY
  • Content-Type: application/json

Request Parameters

Unknown fields are rejected with HTTP 400 (invalid_request_error).

ParameterTypeDefaultConstraints & Description
modelstringrequiredmagi-2-text-to-video, magi-2-image-to-video, or magi-2-reference-to-video.
promptstring—Required for magi-2-text-to-video; optional for image-to-video and reference-to-video. When provided, must be non-blank and at most 15,000 characters.
image_urlsstring[]—Public HTTP/HTTPS image URLs (no base64 or data: URIs, under 30 MB each). Not accepted on magi-2-text-to-video. magi-2-image-to-video requires 1 image (first frame) or 2 images (first and last frames). magi-2-reference-to-video accepts up to 10 images.
video_urlsstring[]—magi-2-reference-to-video only. Up to 5 public HTTP/HTTPS MP4/MOV reference videos (each up to 200 MB, 2–30 s; combined duration ≤ 30 s).
audio_urlsstring[]—magi-2-reference-to-video only. Up to 5 public HTTP/HTTPS WAV/MP3 reference audio tracks (each up to 15 MB, 2–30 s; combined duration ≤ 30 s).
durationinteger5Requested output length in seconds, integer from 4 to 30.
qualitystring"1080p"Output resolution. Currently "1080p".
aspect_ratiostring"16:9"One of "16:9", "9:16", "1:1", "4:3", "3:4", "21:9".
generate_audiobooleantrueGenerate synchronized dialogue, sound effects, and music at no extra charge. Set false for silent video.
seedinteger—Optional random seed (0 to 4294967295) for repeatable runs.

Examples

1. Text-to-Video

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. Image-to-Video (First / Last Frame)

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. Reference-to-Video

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. Poll Task Result

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

Submission returns:

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

When polling reaches "status": "completed", the delivered MP4 URL is in 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/..."
  }
}

Billing

All three MAGI-2 routes are billed per requested output second at 1080p (duration from 4 to 30 seconds). Reference images, reference videos, reference audio tracks, and synchronized audio generation add no extra charge. Failed tasks are not charged.

See current live per-second rates on the MAGI-2 model page.