PopNowAPI Docs
Main content

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

OptionUSD
Default$0.096 per second of output

Parameters

FieldTypeDefaultAllowedWhat it does
promptRequiredstring—up to 15,000 charactersDescribe the scene, motion, camera, and sound. Put spoken dialogue in quotes.
aspect_ratioOptionalstring16:916:9, 9:16, 1:1, 4:3, 3:4, 21:9Output video aspect ratio.
generate_audioOptionalbooleantrue—Generate synchronized stereo dialogue, effects, ambience, and music. Turning audio off removes the audio stream at the same per-second rate.
duration_secondsOptionalinteger54 to 30Video length in whole seconds, from 4 to 30. Billed per requested second.
seedOptionalinteger—0 to 2147483647Optional 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.

POST /api/v1/jobs/createTask
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.

GET /api/v1/jobs/recordInfo
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

OptionUSD
Default$0.096 per second of output

Parameters

FieldTypeDefaultAllowedWhat it does
image_urlRequiredstring (uri)——Opening frame image URL. The video starts from this still.
promptOptionalstring—up to 15,000 charactersOptional motion, transition, camera, and sound instructions.
last_image_urlOptionalstring (uri)——Optional closing frame image URL to anchor the end of the clip.
aspect_ratioOptionalstringautoauto, 16:9, 9:16, 1:1, 4:3, 3:4, 21:9Output aspect ratio. Leave on auto to follow the closest ratio to the opening frame.
generate_audioOptionalbooleantrue—Generate synchronized stereo dialogue, effects, ambience, and music. Turning audio off removes the audio stream at the same per-second rate.
duration_secondsOptionalinteger54 to 30Video length in whole seconds, from 4 to 30. Billed per requested second.
seedOptionalinteger—0 to 2147483647Optional 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.

POST /api/v1/jobs/createTask
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.

GET /api/v1/jobs/recordInfo
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

OptionUSD
Default$0.096 per second of output

Parameters

FieldTypeDefaultAllowedWhat it does
promptRequiredstring—up to 15,000 charactersDescribe the scene and what each reference contributes. Refer to uploaded files as @image_1, @video_1, and @audio_1 in upload order.
reference_image_urlsOptionalarray<string (uri)>—up to 10 itemsReference images (up to 10) for subjects, outfits, objects, or settings. Refer to them as @image_1, @image_2, etc.
reference_video_urlsOptionalarray<string (uri)>—up to 5 itemsReference 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_urlsOptionalarray<string (uri)>—up to 5 itemsReference 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_ratioOptionalstring16:916:9, 9:16, 1:1, 4:3, 3:4, 21:9Output video aspect ratio.
generate_audioOptionalbooleantrue—Generate synchronized stereo dialogue, effects, ambience, and music. Turning audio off removes the audio stream at the same per-second rate.
duration_secondsOptionalinteger54 to 30Video length in whole seconds, from 4 to 30. Billed per requested second.
seedOptionalinteger—0 to 2147483647Optional 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.

POST /api/v1/jobs/createTask
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.

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Next steps

On this page