MAGI-2 API

4–30s 1080p cinema · 20 multimodal refs · Synced audio

POST /v1/videos/generations · https://api.callmodels.dev/v1/videos/generations
Try in Playground

Pricing & specification tiers

Deterministic requested-duration billing across all 3 modes: flat 10.00 Credits/s ($0.10/s) at 1080p (4s min = 40 Credits, 5s = 50 Credits). Up to 20 image/video/audio references and synced audio add 0 extra Credits; failed calls charge 0 Credits.

SpecificationPrice (USD)Credits ($1 = 100)Per $10 Est.
1080p per-second rate · T2V / I2V / Multimodal R2V (all modes flat rate)$0.1000 / s10.000000 Credits / s100 sec (1080p)
4s 1080p minimum clip · Includes synced sound & up to 20 refs (+0 fee)$0.4040.000000 Credits~25 clips (4s)
5s 1080p standard shot (default) · T2V / I2V / Multimodal R2V$0.5050.000000 Credits~20 clips (5s)
10s 1080p narrative scene · Synced dialogue & ambient sound$1.00100.000000 Credits~10 clips (10s)
30s 1080p continuous long take (maximum duration)$3.00300.000000 Credits~3 clips (30s)

Public model IDs & modes

Public model IDMode
magi-2-text-to-videoText-to-Video (4–30s · 1080p Cinema)
magi-2-image-to-videoStart / Start+End Frame Image-to-Video (4–30s · 1080p)
magi-2-reference-to-videoMultimodal Reference-to-Video (Up to 10 Images + 5 Videos + 5 Audios)

Request parameters

Local reference assets: upload via POST /v1/files/uploads (0 Credits) for a 24h signed URL.
ParameterType & DefaultConstraints
Authorization
RequiredHeader
string
Bearer sk-... server-side API key from your account.
Idempotency-Key
OptionalHeader
stringDefault: recommended
1 to 255 ASCII chars. Prevents duplicate submissions and charges for 24h.
model
Required
"magi-2-{text,image,reference}-to-video"
Select text-to-video, 1–2 frame image-to-video, or multimodal reference-to-video (up to 10 images, 5 videos, and 5 audio clips).
prompt
Required
string (1..15000)
1 to 15,000 UTF-8 characters describing camera direction, character blocking, dialogue, and sound effects.
quality
Optional
"1080p"Default: "1080p"
Outputs full-HD 1080p (25 fps) across all three modes.
duration
Optional
integer (4..30s)Default: 5
Requested integer clip duration from 4 to 30 seconds; settles deterministically on requested seconds after delivery.
aspect_ratio
Optional
T2V/R2V: "16:9"|"9:16"|"1:1"|"4:3"|"3:4"|"21:9" · I2V: "adaptive"|"16:9"|"9:16"|"1:1"|"4:3"|"3:4"Default: "16:9" (T2V/R2V) · "adaptive" (I2V)
T2V and R2V support 6 ratios including 21:9 widescreen; I2V defaults to "adaptive" (follows start image) plus 16:9, 9:16, 1:1, 4:3, and 3:4 (21:9 is not supported on I2V).
image_urls
Optional
I2V: string[] (1..2) | R2V: string[] (1..10)Default: required on I2V
I2V accepts 1 start frame or 2 start+end frames; R2V accepts up to 10 HTTPS reference images (0 extra Credits).
video_urls
Optional
R2V: string[] (1..5)Default: omitted
R2V only: up to 5 HTTPS MP4/MOV reference clips (each ≤30s, ≤50 MB) for motion/camera reference at 0 extra Credits.
audio_urls
Optional
R2V: string[] (1..5)Default: omitted
R2V only: up to 5 HTTPS MP3/WAV/M4A reference audio clips (each ≤30s, ≤15 MB) at 0 extra Credits (can be used alone or combined with images/videos).
generate_audio
Optional
booleanDefault: true
Generates synchronized dialogue, Foley, and ambient sound effects in the MP4 at 0 extra Credits.
output_format
Optional
"mp4"Default: "mp4"
Full-HD 1080p MP4 delivered via a 30-day signed HTTPS URL on files.callmodels.dev.

Code examples

# Set CALLMODELS_OPERATION_ID once per job and keep it for retries.
: "${CALLMODELS_OPERATION_ID:?Set a stable job ID}"
curl --silent --show-error --fail-with-body --max-time 15 "https://api.callmodels.dev/v1/videos/generations" \
  -H "Authorization: Bearer $CALLMODELS_API_KEY" \
  -H "Idempotency-Key: $CALLMODELS_OPERATION_ID" \
  -H "Content-Type: application/json" \
  --data-binary '{
  "model": "magi-2-text-to-video",
  "prompt": "Golden-hour sunlight filtering through crimson Japanese maple leaves onto a moss-lined bamboo water spout, raindrops rippling across still emerald water with crisp natural rain audio",
  "quality": "1080p",
  "duration": 5,
  "aspect_ratio": "16:9",
  "generate_audio": true
}'

# Set TASK_ID to the id from the response, then poll until terminal.
if [ -n "${TASK_ID:-}" ]; then
  curl --silent --show-error --fail-with-body --max-time 15 "https://api.callmodels.dev/v1/tasks/$TASK_ID" \
    -H "Authorization: Bearer $CALLMODELS_API_KEY"
fi

Task responses

On completed, read results[0].url (30-day signed link, no auth header) and usage.cost_credits.

HTTP/1.1 202 Accepted
X-Request-Id: req_example
Cache-Control: no-store

{
  "id": "task_01e561ba-859e-47fe-be79-60bc6f1d6499",
  "model": "magi-2-text-to-video",
  "object": "video.generation.task",
  "created_at": "2026-11-21T00:00:00.000Z",
  "status": "pending"
}

Error codes

HTTP / Error CodeCause & HandlingBilling
400 invalid_parameter400 model_not_found
Use the model ID and parameters documented for the endpoint. Correct the JSON before sending again.0 Credits for this rejection
401 invalid_api_keyCheck the server-side Bearer key, expiration and revocation status.0 Credits for this rejection
402 insufficient_balance402 key_quota_exceeded402 trial_interactive_only402 trial_tier_restricted
Check available account credits and the key’s total and daily limits with GET /v1/credits, or top up from $10 to lift starter-trial channel/tier limits.0 Credits for this rejection
403 model_access_denied403 account_disabled
Check the model allowlist and account status.0 Credits for this rejection
404 not_foundCheck the task ID or original Idempotency-Key and the account that submitted it.0 Credits for this rejection
409 idempotency_key_conflictUse the original JSON for this job. Assign a fresh key only to a new job.0 Credits for this rejection
413 body_too_large415 unsupported_media_type
Send application/json with a request body no larger than 128 KiB.0 Credits for this rejection
500 internal_error503 service_unavailable503 model_unavailable
On a timeout or transient error, look up the original job and retry only with its original key and body.Check the task record
Task: invalid_mediaTask: content_moderationTask: invalid_inputTask: submission_rejected
The task ended (retryable: false) and its hold was released. Fix the prompt, parameters, or reference media (format, dimensions, aspect ratio, duration, or public HTTPS URL) before creating a new job with a fresh Idempotency-Key.0 Credits charged
Task: service_busyTask: timeoutTask: delivery_failedTask: submission_unknownTask: upstream_failed
The task ended due to temporary load, timeout, or output verification failure (retryable: true) and its hold was released. You may create a separate generation job with a fresh Idempotency-Key.0 Credits charged