MAGI-2 API
Generate MAGI-2 videos from your own code. Three endpoints cover text-to-video, image-to-video with an optional last frame, and reference-to-video, which takes up to 10 images, 5 clips and 5 audio tracks. Any length from 4 to 30 seconds, with synchronized audio and spoken dialogue generated in the same pass. Put dialogue in quotation marks and name the speaker in the prompt.
Prices last checked December 2, 2026 at 01:00 CET: MAGI-2 costs $0.08 per second, audio included on Scenetra, billed at provider cost with no markup. The price is checked against the provider's own pricing page. Every price is re-checked against the providers daily at 01:00 CET.
- 1080p
- $0.08/s
- Audio
- included
Quickstart
Async by design: submit a generation, get a run id back instantly, poll until it completes (or pass a callbackUrl). Each mode is its own endpoint.
MAGI-2 Text to Video API
1 — Start a generation
curl -X POST https://app.scenetra.com/api/v1/generate/magi-2-t2v \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"A lighthouse keeper climbs a spiral staircase with a lantern during a storm, waves crashing against the rocks outside, wind howling, slow tracking shot up the stairs, cinematic lighting","aspect_ratio":"16:9","duration":"5"}'Response (202)
{
"runId": "run_abc123",
"status": "PENDING",
"model": "magi-2-t2v",
"estimatedCredits": 400,
"statusUrl": "/api/v1/runs/run_abc123"
}2 — Poll until COMPLETED (every 2-5 seconds)
curl https://app.scenetra.com/api/v1/runs/run_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"runId": "run_abc123",
"status": "COMPLETED",
"progress": { "completed": 1, "total": 1 },
"outputs": [
{ "type": "video", "url": "https://images.scenetra.com/..." }
],
"error": null,
"estimatedCredits": 400
}Request fields
| Field | Type | Description | Default |
|---|---|---|---|
| prompt* | string | Describe the scene, motion, camera and sound. Put suggested dialogue in quotation marks and name the speaker. | — |
| aspect_ratio | string | Aspect ratio of the generated video.16:9 · 9:16 · 1:1 · 4:3 · 3:4 · 21:9 | 16:9 |
| duration | string | Length of the generated video in seconds (4-30). Billed per second.4 · 5 · 6 · 7 · 8 · 9 · 10 · 11 · 12 · 13 · 14 · 15 · 16 · 17 · 18 · 19 · 20 · 21 · 22 · 23 · 24 · 25 · 26 · 27 · 28 · 29 · 30 | 5 |
| generate_audio | string | Generate synchronized audio (dialogue, sound effects, music) with the video. Same price either way.true · false | true |
| callbackUrl | string (https URL) | Optional. When the run finishes (completed or failed), we POST the final run status to this URL — same shape as the poll response, plus model, params, and chargedCredits. Best-effort; polling remains the source of truth. | |
Unknown fields are rejected with a helpful 400. Media fields take https URLs. There is no provider parameter — every run is routed to the cheapest capable provider automatically.
MAGI-2 Image to Video API
1 — Start a generation
curl -X POST https://app.scenetra.com/api/v1/generate/magi-2-i2v \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"Slow push-in, the subject turns to camera and says \"Watch and learn\", room tone and a soft laugh","image":"https://example.com/start-frame.jpg","duration":"5"}'Response (202)
{
"runId": "run_abc123",
"status": "PENDING",
"model": "magi-2-i2v",
"estimatedCredits": 400,
"statusUrl": "/api/v1/runs/run_abc123"
}2 — Poll until COMPLETED (every 2-5 seconds)
curl https://app.scenetra.com/api/v1/runs/run_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"runId": "run_abc123",
"status": "COMPLETED",
"progress": { "completed": 1, "total": 1 },
"outputs": [
{ "type": "video", "url": "https://images.scenetra.com/..." }
],
"error": null,
"estimatedCredits": 400
}Request fields
| Field | Type | Description | Default |
|---|---|---|---|
| prompt* | string | Describe the scene, motion, camera and sound. Put suggested dialogue in quotation marks and name the speaker. | — |
| image* | string (https URL) | Starting frame. The video animates from this image. | — |
| last_image | string (https URL) | Optional image to guide the final frame of the video. | — |
| aspect_ratio | string | Aspect ratio of the generated video. 'adaptive' uses the closest supported ratio to the starting image; the image may be cropped to fill.adaptive · 16:9 · 9:16 · 1:1 · 4:3 · 3:4 | adaptive |
| duration | string | Length of the generated video in seconds (4-30). Billed per second.4 · 5 · 6 · 7 · 8 · 9 · 10 · 11 · 12 · 13 · 14 · 15 · 16 · 17 · 18 · 19 · 20 · 21 · 22 · 23 · 24 · 25 · 26 · 27 · 28 · 29 · 30 | 5 |
| generate_audio | string | Generate synchronized audio (dialogue, sound effects, music) with the video. Same price either way.true · false | true |
| callbackUrl | string (https URL) | Optional. When the run finishes (completed or failed), we POST the final run status to this URL — same shape as the poll response, plus model, params, and chargedCredits. Best-effort; polling remains the source of truth. | |
Unknown fields are rejected with a helpful 400. Media fields take https URLs. There is no provider parameter — every run is routed to the cheapest capable provider automatically.
MAGI-2 Reference to Video API
1 — Start a generation
curl -X POST https://app.scenetra.com/api/v1/generate/magi-2-ref2v \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"@Image1 walks through the street from @Image2, handheld follow shot, crowd murmur and distant traffic","reference_image_urls":["https://example.com/person.jpg","https://example.com/street.jpg"],"duration":"5"}'Response (202)
{
"runId": "run_abc123",
"status": "PENDING",
"model": "magi-2-ref2v",
"estimatedCredits": 400,
"statusUrl": "/api/v1/runs/run_abc123"
}2 — Poll until COMPLETED (every 2-5 seconds)
curl https://app.scenetra.com/api/v1/runs/run_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"runId": "run_abc123",
"status": "COMPLETED",
"progress": { "completed": 1, "total": 1 },
"outputs": [
{ "type": "video", "url": "https://images.scenetra.com/..." }
],
"error": null,
"estimatedCredits": 400
}Request fields
| Field | Type | Description | Default |
|---|---|---|---|
| prompt* | string | Describe the scene, motion, camera and sound. Put suggested dialogue in quotation marks and name the speaker. | — |
| reference_image_urls | string[] (https URLs) | Up to 10 reference images for subjects, objects or style. Say in the prompt what each one is for (@Image1, @Image2, ...). Optional. | — |
| reference_video_urls | string[] (https URLs) | Up to 5 reference clips (2-30s each, 30s combined; longer clips are trimmed) for motion, camera work or look. Not billed. | — |
| reference_audio_urls | string[] (https URLs) | Up to 5 audio clips (2-30s each, 30s combined; longer clips are trimmed) for speech or sound. Not billed. | — |
| aspect_ratio | string | Aspect ratio of the generated video.16:9 · 9:16 · 1:1 · 4:3 · 3:4 · 21:9 | 16:9 |
| duration | string | Length of the generated video in seconds (4-30). Billed per second.4 · 5 · 6 · 7 · 8 · 9 · 10 · 11 · 12 · 13 · 14 · 15 · 16 · 17 · 18 · 19 · 20 · 21 · 22 · 23 · 24 · 25 · 26 · 27 · 28 · 29 · 30 | 5 |
| generate_audio | string | Generate synchronized audio (dialogue, sound effects, music) with the video. Same price either way.true · false | true |
| callbackUrl | string (https URL) | Optional. When the run finishes (completed or failed), we POST the final run status to this URL — same shape as the poll response, plus model, params, and chargedCredits. Best-effort; polling remains the source of truth. | |
Unknown fields are rejected with a helpful 400. Media fields take https URLs. There is no provider parameter — every run is routed to the cheapest capable provider automatically.
Good to know
Billing
Runs bill your account credits at provider cost with 0% markup. The submit response includes the credit estimate; failed generations are refunded automatically. Add ?dryRun=1 to get the estimate without running anything.
Errors
Errors are always { "error": { "code", "message" } } with stable codes: unauthorized, model_not_available, invalid_parameter, insufficient_credits, rate_limited. A failed run is not an HTTP error — poll responses report status: "FAILED" with the reason.
MAGI-2 API FAQ
Does audio change the MAGI-2 price?+
No. MAGI-2 costs the same per second with or without audio, and reference clips and audio are not billed. You pay only for the output seconds.
Is this Sand AI's official API?+
No. Scenetra runs MAGI-2 through a provider that serves the same model and output, and bills you at that provider's price in Scenetra credits, from the same balance as every other model.
How much does the MAGI-2 API cost?+
Prices last checked December 2, 2026 at 01:00 CET: MAGI-2 costs $0.08 per second, audio included on Scenetra, billed at provider cost with no markup. The price is checked against the provider's own pricing page. Every price is re-checked against the providers daily at 01:00 CET. Rates: 1080p $0.08/s; Audio included. With the example settings (5 seconds), a text to video run is estimated at about 400 credits. The submit response returns the estimate for your exact settings, and adding ?dryRun=1 prices a request without running it.
Which provider runs my request?+
The cheapest one that supports your settings, chosen per request. There is no provider parameter: the same MAGI-2 request is priced across every provider we route to and runs on the lowest quote.
Do failed generations cost credits?+
No. Credits are reserved when you submit and refunded automatically if the run fails. A failed run is not an HTTP error: polling returns status FAILED with the reason.
Do I have to poll, or can I get a webhook?+
Both work. Pass callbackUrl and we POST the final run status to it when the run completes or fails. Delivery is best-effort, so polling GET /api/v1/runs/{runId} remains the source of truth.