curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "sand-ai/magi-2/reference-to-video",
"input": {
"prompt": "The musician from the reference image walks along a sunlit boardwalk playing the melody from the reference audio.",
"reference_image_urls": [
"https://example.com/character.jpg"
],
"reference_audio_urls": [
"https://example.com/melody.mp3"
],
"duration": 8,
"aspect_ratio": "16:9"
}
}
'{
"code": 200,
"data": {
"task_id": "task-example-001",
"status": "not_started",
"created_time": "2026-11-29T10:30:00"
}
}{
"detail": "prompt is required"
}{
"detail": "prompt is required"
}Sand AI
MAGI-2 Reference to Video
The MAGI-2 Reference to Video API combines up to 10 reference images, 5 videos and 5 audio clips into a 4–30 second 1080p video with synchronized sound.
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "sand-ai/magi-2/reference-to-video",
"input": {
"prompt": "The musician from the reference image walks along a sunlit boardwalk playing the melody from the reference audio.",
"reference_image_urls": [
"https://example.com/character.jpg"
],
"reference_audio_urls": [
"https://example.com/melody.mp3"
],
"duration": 8,
"aspect_ratio": "16:9"
}
}
'{
"code": 200,
"data": {
"task_id": "task-example-001",
"status": "not_started",
"created_time": "2026-11-29T10:30:00"
}
}{
"detail": "prompt is required"
}{
"detail": "prompt is required"
}- After submission, a
task_idwill be returned. If you provided acallback_url, when the task status becomesfinishedorfailed, a POST request will be sent to thecallback_url. - Regardless of whether
callback_urlis provided, you can retrieve the result through the unified Query Task Status endpoint.
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_urlsorreference_audio_urlsmust 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 from4to30. Default5.resolution(string):1080p.aspect_ratio(string):16:9(default),9:16,1:1,4:3,3:4or21:9.generate_audio(boolean):true(default) generates synchronized audio;falsereturns a video-only file.seed(integer): Random seed from0to2147483647.
Output
A finished task returns one MP4 file: H.264 video at 25 fps with an AAC stereo audio track whengenerate_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_urlsorreference_audio_urls).image_urlsis not accepted on this endpoint and returns 400. - All media URLs must be publicly accessible and directly downloadable.
- Credits are billed per second of
durationat 1080p; reference media andgenerate_audiodo not add extra charges. Failed tasks are refunded in full. See the pricing page for current rates.
Body
application/json