Skip to main content
POST
  1. After submission, a task_id will be returned. If you provided a callback_url, when the task status becomes finished or failed, a POST request will be sent to the callback_url.
  2. Regardless of whether callback_url is provided, you can retrieve the result through the unified Query Task Status endpoint.
MAGI-2 Reference to Video generates 4–30 second 1080p videos guided by any combination of reference images, reference video clips and reference audio clips—including reference audio on its own. Describe in prompt how each reference contributes to character identity, motion, voice or music. For prompt-only generation use MAGI-2 Text to Video; for first-and-last-frame animation use MAGI-2 Image to Video.

Models

  • sand-ai/magi-2/reference-to-video — Multimodal reference-to-video generation at 1080p for 4–30 seconds with synchronized audio.

Features

  • Up to 10 reference images, 5 reference videos and 5 reference audio clips in one task.
  • Flexible multimodal combinations: mix images, videos and audio, or provide reference audio on its own.
  • 1080p video from 4 to 30 seconds across six aspect ratios (16:9, 9:16, 1:1, 4:3, 3:4, 21:9).
  • Prompts up to 15,000 characters with synchronized dialogue, sound effects and ambience.

Required parameters

  • prompt (string): Describe how each reference is used, plus scene, motion, camera and sound, up to 15,000 characters.
  • At least one of reference_image_urls, reference_video_urls or reference_audio_urls must be non-empty.

Optional parameters

  • reference_image_urls (string[]): Up to 10 public HTTP(S) reference image URLs (JPG, PNG or WEBP).
  • reference_video_urls (string[]): Up to 5 public HTTP(S) MP4 or MOV video URLs (each 2–30 seconds, up to 30 seconds total).
  • reference_audio_urls (string[]): Up to 5 public HTTP(S) MP3 or WAV audio URLs (each 2–30 seconds, up to 30 seconds total).
  • duration (integer): Length in whole seconds from 4 to 30. Default 5.
  • resolution (string): 1080p.
  • aspect_ratio (string): 16:9 (default), 9:16, 1:1, 4:3, 3:4 or 21:9.
  • generate_audio (boolean): true (default) generates synchronized audio; false returns a video-only file.
  • seed (integer): Random seed from 0 to 2147483647.

Output

A finished task returns one MP4 file: H.264 video at 25 fps with an AAC stereo audio track when generate_audio is true.

Examples

  • Character image + audio reference: keep the character from a reference image while matching the melody from a reference audio clip for 8 seconds.
  • Audio-only reference: drive a 5-second music scene using only reference_audio_urls.

Notes

  • Provide at least one non-empty reference list (reference_image_urls, reference_video_urls or reference_audio_urls). image_urls is not accepted on this endpoint and returns 400.
  • All media URLs must be publicly accessible and directly downloadable.
  • Credits are billed per second of duration at 1080p; reference media and generate_audio do not add extra charges. Failed tasks are refunded in full. See the pricing page for current rates.

Authorizations

Authorization
string
header
required

Use Authorization: Bearer VIDGO_API_KEY.

Body

application/json
model
string
required
Example:

"sand-ai/magi-2/reference-to-video"

input
object
required
callback_url
string<uri>

Optional webhook URL for completion or failure notifications.

Example:

"https://your-domain.com/callback"

Response

Task submission result. A task ID identifies asynchronous work; generation may still be running.

code
integer
required
Example:

200

data
object
required