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/text-to-video",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "In a rainy neon-lit alley at night, a street musician plays a slow saxophone melody and says: \"Thanks for staying till the last song.\"",
"duration": 5,
"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 Text to Video
The MAGI-2 Text to Video API generates a 4–30 second 1080p video with synchronized dialogue, sound effects and ambience from a text prompt.
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/text-to-video",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "In a rainy neon-lit alley at night, a street musician plays a slow saxophone melody and says: \"Thanks for staying till the last song.\"",
"duration": 5,
"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.
Models
- sand-ai/magi-2/text-to-video — Text-to-video generation at 1080p for 4–30 seconds with synchronized audio.
Features
- 1080p video from 4 to 30 seconds in one generation.
- Synchronized dialogue, sound effects and ambience, with an option to generate video only.
- Six aspect ratios:
16:9,9:16,1:1,4:3,3:4and21:9. - Prompts up to 15,000 characters for detailed scripts and shot lists.
- Optional
seedfor reproducible results.
Required parameters
prompt(string): Scene, subjects, motion, camera and sound, up to 15,000 characters. Put spoken lines in quotes.
Optional parameters
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
- Dialogue scene: a 5-second
16:9night street scene with a spoken line in quotes. - Vertical clip: a 4-second
9:16action shot with ambient sound. - Ultra-wide silent shot: a 4-second
21:9desert shot withgenerate_audio: falseand a fixedseed.
Notes
- Fields from other modes (
image_urls,reference_*) are rejected with 400.modelandcallback_urlbelong at the request root, not insideinput. - 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