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/image-to-video",
"input": {
"prompt": "Slow dolly-in as warm sunlight drifts across the table and coffee steam rises gently.",
"image_urls": [
"https://example.com/opening-frame.jpg"
],
"duration": 5
}
}
'{
"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 Image to Video
The MAGI-2 Image to Video API animates one opening frame or a first-and-last-frame pair into a 4–30 second 1080p video with synchronized audio.
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/image-to-video",
"input": {
"prompt": "Slow dolly-in as warm sunlight drifts across the table and coffee steam rises gently.",
"image_urls": [
"https://example.com/opening-frame.jpg"
],
"duration": 5
}
}
'{
"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.
Models
- sand-ai/magi-2/image-to-video — First-frame and first-and-last-frame video generation at 1080p for 4–30 seconds with synchronized audio.
Features
- Single opening frame or first-and-last-frame keyframe control (
1–2images inimage_urls). - 1080p video from 4 to 30 seconds in one generation.
- Automatic aspect-ratio matching to the first input image.
- Synchronized dialogue, sound effects and ambience, with an option to disable audio.
- Prompts up to 15,000 characters and optional
seed.
Required parameters
prompt(string): Motion, camera, action and sound instructions, up to 15,000 characters. Put spoken lines in quotes.image_urls(string[]): One or two public HTTP(S) image URLs (JPG, PNG or WEBP). The first image sets the opening frame; an optional second image sets the closing frame.
Optional parameters
duration(integer): Length in whole seconds from4to30. Default5.resolution(string):1080p.aspect_ratio(string):auto(default). The output matches the first frame’s aspect ratio.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
- First frame animation: animate one opening frame for 5 seconds with camera motion and synchronized ambience.
- First and last frame transition: transition smoothly between two keyframes over 6 seconds.
Notes
image_urlsmust contain 1 or 2 publicly accessible HTTP(S) URLs;aspect_ratioaccepts onlyauto(or omit it). Reference fields (reference_*) are rejected with 400.- Credits are billed per second of
durationat 1080p;generate_audiodoes not change the price. Failed tasks are refunded in full. See the pricing page for current rates.
Body
application/json