MAGI-2 API reference
4 to 30-second 1080p scenes with native sound, from text, keyframes or mixed references
Call MAGI-2 from your own code with one PopNow API key. Below are the exact model IDs to send, every input field the model accepts, what each request costs in USD, and a request you can paste into a terminal.
At a glance
- Made by
- Sand.ai
- Output
- Video
- From
- $0.096 USD per second of output
- Typical time
- about 710 s
Prices are in USD, charged to your PopNow balance. A task reserves the maximum possible charge when accepted and settles actual usage on completion; any remainder is released. Failed tasks are not charged. Call POST /api/v1/jobs/quote for an exact quote before running.
Create Video
sand-ai/magi-2/text-to-video
Price
| Option | USD |
|---|---|
Default | $0.096 per second of output |
Parameters
| Field | Type | Default | Allowed | What it does |
|---|---|---|---|---|
promptRequired | string | — | up to 15,000 characters | Describe the scene, motion, camera, and sound. Put spoken dialogue in quotes. |
aspect_ratioOptional | string | 16:9 | 16:9, 9:16, 1:1, 4:3, 3:4, 21:9 | Output video aspect ratio. |
generate_audioOptional | boolean | true | — | Generate synchronized stereo dialogue, effects, ambience, and music. Turning audio off removes the audio stream at the same per-second rate. |
duration_secondsOptional | integer | 5 | 4 to 30 | Video length in whole seconds, from 4 to 30. Billed per requested second. |
seedOptional | integer | — | 0 to 2147483647 | Optional random seed. Omit for a random result. |
Example request
This request runs as it is; any field you leave out uses its default. Put your key in POPNOW_API_KEY first.
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "sand-ai/magi-2/text-to-video",
"input": {
"prompt": "A paper boat drifts down a rain-soaked street at dusk, neon signs reflecting in the water, slow tracking shot at ground level",
"duration_seconds": 5
}
}'The response carries a taskId straight away. Read the result with GET /api/v1/jobs/recordInfo, or add callBackUrl to be notified.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"Image to Video
sand-ai/magi-2/image-to-video
Price
| Option | USD |
|---|---|
Default | $0.096 per second of output |
Parameters
| Field | Type | Default | Allowed | What it does |
|---|---|---|---|---|
image_urlRequired | string (uri) | — | — | Opening frame image URL. The video starts from this still. |
promptOptional | string | — | up to 15,000 characters | Optional motion, transition, camera, and sound instructions. |
last_image_urlOptional | string (uri) | — | — | Optional closing frame image URL to anchor the end of the clip. |
aspect_ratioOptional | string | auto | auto, 16:9, 9:16, 1:1, 4:3, 3:4, 21:9 | Output aspect ratio. Leave on auto to follow the closest ratio to the opening frame. |
generate_audioOptional | boolean | true | — | Generate synchronized stereo dialogue, effects, ambience, and music. Turning audio off removes the audio stream at the same per-second rate. |
duration_secondsOptional | integer | 5 | 4 to 30 | Video length in whole seconds, from 4 to 30. Billed per requested second. |
seedOptional | integer | — | 0 to 2147483647 | Optional random seed. Omit for a random result. |
Example request
This request runs as it is; any field you leave out uses its default. Put your key in POPNOW_API_KEY first.
The example uses PopNow sample files in image_url. Replace them with your own public HTTPS links, uploads or saved assets.
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "sand-ai/magi-2/image-to-video",
"input": {
"prompt": "He lands softly on the rooftop, laughs and turns toward the camera while the balloons sway in the evening breeze; slow push-in",
"image_url": "https://media.popnow.ai/influencer/examples/marco.webp",
"duration_seconds": 5
}
}'The response carries a taskId straight away. Read the result with GET /api/v1/jobs/recordInfo, or add callBackUrl to be notified.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"Reference to Video
sand-ai/magi-2/reference-to-video
Price
| Option | USD |
|---|---|
Default | $0.096 per second of output |
Parameters
| Field | Type | Default | Allowed | What it does |
|---|---|---|---|---|
promptRequired | string | — | up to 15,000 characters | Describe the scene and what each reference contributes. Refer to uploaded files as @image_1, @video_1, and @audio_1 in upload order. |
reference_image_urlsOptional | array<string (uri)> | — | up to 10 items | Reference images (up to 10) for subjects, outfits, objects, or settings. Refer to them as @image_1, @image_2, etc. |
reference_video_urlsOptional | array<string (uri)> | — | up to 5 items | Reference videos (up to 5; 2–30 s each, 30 s combined; longer clips are trimmed) for camera movement or pacing. Refer to them as @video_1, @video_2, etc. |
reference_audio_urlsOptional | array<string (uri)> | — | up to 5 items | Reference audio clips (up to 5; 2–30 s each, 30 s combined; longer clips are trimmed) for voice, music, or rhythm. Refer to them as @audio_1, @audio_2, etc. |
aspect_ratioOptional | string | 16:9 | 16:9, 9:16, 1:1, 4:3, 3:4, 21:9 | Output video aspect ratio. |
generate_audioOptional | boolean | true | — | Generate synchronized stereo dialogue, effects, ambience, and music. Turning audio off removes the audio stream at the same per-second rate. |
duration_secondsOptional | integer | 5 | 4 to 30 | Video length in whole seconds, from 4 to 30. Billed per requested second. |
seedOptional | integer | — | 0 to 2147483647 | Optional random seed. Omit for a random result. |
Example request
This request runs as it is; any field you leave out uses its default. Put your key in POPNOW_API_KEY first.
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "sand-ai/magi-2/reference-to-video",
"input": {
"prompt": "The man from the reference image jogs across a sunlit rooftop at golden hour and smiles at the camera; smooth tracking shot",
"duration_seconds": 5
}
}'The response carries a taskId straight away. Read the result with GET /api/v1/jobs/recordInfo, or add callBackUrl to be notified.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
