Submit Video Task
curl --request POST \
--url https://api.gravitex.ai/v1/video/generations \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"image": "<string>",
"duration": 123,
"resolution": "<string>",
"aspect_ratio": "<string>"
}
'Video Series
Submit Video Task
POST
/
v1
/
video
/
generations
Submit Video Task
curl --request POST \
--url https://api.gravitex.ai/v1/video/generations \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"image": "<string>",
"duration": 123,
"resolution": "<string>",
"aspect_ratio": "<string>"
}
'Documentation Index
Fetch the complete documentation index at: https://docs.gravitex.ai/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
The submit video task API is used to create a new video generation task. Upon successful submission, it returns a task ID that you can use to query the task status. Important Note: Video generation is an asynchronous task. You need to first submit a task to get a task ID, then poll the task status until it succeeds.Authentication
Bearer Token, e.g.
Bearer sk-xxxxxxxxxxRequest Parameters
Model identifier, supported models and features:Sora 2 Series:
sora-2- Supports text-to-video, image-to-video, video-to-video (Remix mode). AlsoPOST /v1/videos— see Sora 2
veo-3.0-fast-generate-001- Text-to-video (first frame mode)veo-3.1-fast-generate-preview- Text-to-video (first frame mode, first/last frame mode)
wan2.7-t2v-2026-04-25- Text-to-video (multi-shot, custom audio). See Wan 2.7wan2.7-i2v-2026-04-25- Image-to-video (first frame, first+last, continuation). See Wan 2.7wan2.7-r2v- Reference-to-video (multi-modal refs, voice clone). See Wan 2.7wan2.5-t2v-preview- Text-to-videowan2.5-i2v-preview- Image-to-video (first frame mode)
seedance-2-0- T2V, I2V, multi-modal refs, asset library (asset://). See Seedance 2.0seedance-2-0-fast- Fast (no 1080p). See Seedance 2.0
doubao-seedance-1-0-lite-t2v-250428- Text-to-videodoubao-seedance-1-0-lite-i2v-250428- Image-to-video (first frame mode, first/last frame mode, reference image mode)doubao-seedance-1-0-pro-250528- Text-to-video (first frame mode)doubao-seedance-1-5-pro-251215- Text-to-video, image-to-video (first frame mode, first/last frame mode), supports audio generationdoubao-seedance-1-5-pro-251215-noAudio- Text-to-video, image-to-video (first frame mode, first/last frame mode), no audio generation
Video generation prompt, describing scene actions and settings. Note: Doubao Seedance series models do not require this field, the prompt should be written directly in the
text field of the metadata.content arrayReference image for image-to-video (supports Base64 or URL format)
Video duration (seconds), different models support different durations
Video resolution:
480p, 720p, 1080p, 4kAspect ratio:
16:9, 9:16, 1:1, 4:3, 3:4, 21:9, adaptive (adaptive, only supported by some models)Model-Specific Parameters
Different models support different specific parameters. Below are detailed descriptions by model series:- Sora 2
- Veo
- Ali Wanxiang
- Doubao Seedance
Video duration (seconds), supports:
4, 8, 12Video resolution, supports:
720x1280 (portrait), 1280x720 (landscape)Reference image (supports URL or Base64 format), for image-to-video
Remix mode: Regenerate based on existing video ID (must start with
video_)Video duration (seconds), supports:
4, 6, 8Aspect ratio, only supports:
16:9, 9:16Resolution, supports:
720p, 1080pFrame rate, default 24
First frame reference image (supports URL or Base64 format)
Last frame reference image (supports URL or Base64 format), only
veo-3.1 series supportsWhether to generate synchronized audio. Fast models ignore this parameter and always include audio
Person generation strategy:
allow_all (all ages), allow_adult (adults only), dont_allow (no people)Whether to add watermark
Random seed for reproducing results
Number of videos generated each time, range:
1-4Video duration (seconds), supports:
5, 10Video resolution, supports:
480p, 720p, 1080pVideo size (t2v mode only), format:
width*height, e.g. 1280*720Whether to enable intelligent prompt expansion
Whether to generate synchronized audio with the video
Custom audio file URL (HTTPS format)
Random seed, range:
0-2147483647Content array, must be placed in the
metadata object. Must include text and optional images. Parameters are controlled through special markers in text prompts:--rsor--resolution: Resolution (480p,720p,1080p)--ratio: Aspect ratio (16:9,9:16,1:1,4:3,3:4,adaptive, note thatdoubao-seedance-1-0-lite-t2v-250428does not supportadaptive)--duror--duration: Duration (seconds, e.g.5,10)--frames: Frame count (only 1.5 pro series supports). Either--framesor--durcan be used,framestakes priority overduration. If you want fractional-second videos, specifyframes. Range: all integers within[29, 289]that match25 + 4nwherenis a positive integer--fpsor--framespersecond: Frame rate (e.g.24,30)--seed: Random seed, integer in range[-1, 2^32-1]--wmor--watermark: Watermark toggle (true,false)--cfor--camerafixed: Fixed camera (true,false, only lite models support)
- 1.0 lite/pro series:
doubao-seedance-1-0-lite-t2v-250428,doubao-seedance-1-0-lite-i2v-250428,doubao-seedance-1-0-pro-250528- Supports basic video generation features
- lite-i2v supports first/last frame mode and reference image mode
- pro models support high resolution (720p/1080p)
- 1.5 pro series:
doubao-seedance-1-5-pro-251215,doubao-seedance-1-5-pro-251215-noAudio- 1.5-pro: Supports text-to-video and image-to-video (first frame mode, first/last frame mode), automatically generates matching audio
- 1.5-pro-noAudio: Same features as 1.5-pro, but does not generate audio, faster video rendering
- Resolution support: Only supports
480pand720p(does not support 1080p) - Duration support: Any integer between 4-12 seconds (e.g. 4, 5, 6, 7, 8, 9, 10, 11, 12)
- Image-to-video modes: Supports first frame mode and first/last frame mode (does not support reference image mode)
{
"metadata": {
"content": [
{
"type": "text",
"text": "Prompt content --ratio 16:9 --dur 5 --rs 720p --wm false"
},
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,..."
},
"role": "first_frame" // Optional: first_frame, last_frame, reference_image
}
],
"return_last_frame": true, // Whether to return the last frame (1.5 Pro series)
"callback_url": "https://your-domain.com/callback" // Optional callback URL
}
}
Usage Examples
- Sora 2
- Veo
- Ali Wanxiang
- Doubao Seedance
1. Text-to-Video (Basic Example)2. Text-to-Video (Landscape, 8 seconds)3. Image-to-Video (First Frame Mode)4. Remix Mode (Video-to-Video)
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2",
"prompt": "A cute little cat playing in the garden, sunny and warm",
"seconds": "4",
"size": "720x1280"
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2",
"prompt": "A cute little cat playing in the garden, sunny and warm",
"seconds": "8",
"size": "1280x720"
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2",
"prompt": "A cute little cat playing in the garden, sunny and warm",
"seconds": "4",
"size": "720x1280",
"input_reference": "data:image/png;base64,iVBORw0KGgoAAxxxx..."
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2",
"prompt": "Change the video to a night scene with stars",
"seconds": "4",
"size": "720x1280",
"remix_from_video_id": "video_69095b4ce0048190893a01510c0c98b0"
}'
1. Text-to-Video (Basic Example)2. Image-to-Video (First Frame Mode)3. Image-to-Video (First/Last Frame Mode, only veo-3.1 supports)
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1-fast-generate-preview",
"prompt": "Aerial view of a sci-fi city at dawn, sunlight piercing through clouds",
"durationSeconds": 8,
"aspectRatio": "16:9",
"resolution": "1080p",
"fps": 24
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1-fast-generate-preview",
"prompt": "Generate video based on this image, scene gradually unfolds",
"durationSeconds": 8,
"aspectRatio": "16:9",
"resolution": "1080p",
"fps": 24,
"image": "data:image/png;base64,iVBORw0KGgoAAxxxx..."
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1-fast-generate-preview",
"prompt": "Transition from first image to second image",
"durationSeconds": 8,
"aspectRatio": "16:9",
"resolution": "1080p",
"fps": 24,
"image": "data:image/png;base64,iVBORw0KGgoAAxxxx...",
"lastFrame": "data:image/png;base64,iVBORw0KGgoAAyyyy..."
}'
1. Text-to-Video (Basic Example)2. Text-to-Video (10 seconds, 1080p, with Random Seed)3. Image-to-Video (First Frame Mode)4. Image-to-Video (with Custom Audio)
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.5-t2v-preview",
"prompt": "A kitten slowly opens its eyes, ears gently twitch, camera slowly pushes in",
"duration": 5,
"size": "1280*720",
"smart_rewrite": true,
"generate_audio": true
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.5-t2v-preview",
"prompt": "A kitten slowly opens its eyes, ears gently twitch, camera slowly pushes in",
"duration": 10,
"size": "1920*1080",
"smart_rewrite": false,
"generate_audio": false,
"seed": 123456
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.5-i2v-preview",
"prompt": "Kitten slowly opens its eyes, ears gently twitch, camera slowly pushes in",
"duration": 5,
"resolution": "720p",
"smart_rewrite": true,
"generate_audio": true,
"image": "data:image/png;base64,iVBORw0KGgoAAxxxx..."
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.5-i2v-preview",
"prompt": "Kitten slowly opens its eyes, ears gently twitch, camera slowly pushes in",
"duration": 10,
"resolution": "1080p",
"smart_rewrite": false,
"generate_audio": false,
"audio_url": "https://example.com/audio.mp3",
"image": "data:image/png;base64,iVBORw0KGgoAAxxxx...",
"seed": 789012
}'
1. Text-to-Video (T2V, Basic Example)2. Text-to-Video (T2V, Full Parameters)3. Image-to-Video (First Frame Mode)4. Image-to-Video (First/Last Frame Mode, lite-i2v and 1.5 pro support)5. Image-to-Video (Reference Image Mode, only lite-i2v supports)6. Pro Model (First Frame Mode)7. Seedance 1.5 Pro Text-to-Video (with Audio)8. Seedance 1.5 Pro Image-to-Video (First Frame Mode, without Audio)9. Seedance 1.5 Pro Image-to-Video (First/Last Frame Mode, with Audio)
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-1-0-lite-t2v-250428",
"metadata": {
"content": [
{
"type": "text",
"text": "A cute kitten playing in a garden, sunny day --ratio 16:9 --dur 5 --rs 720p --wm false"
}
]
}
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-1-0-lite-t2v-250428",
"metadata": {
"content": [
{
"type": "text",
"text": "A cute kitten playing in a garden, sunny day --ratio 9:16 --dur 10 --rs 1080p --fps 30 --wm true --seed 12345"
}
]
}
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-1-0-lite-i2v-250428",
"metadata": {
"content": [
{
"type": "text",
"text": "A girl opens her eyes and looks gently at the camera --ratio adaptive --dur 5 --rs 720p --wm false"
},
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,iVBORw0KGgoAAxxxx..."
}
}
]
}
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-1-0-lite-i2v-250428",
"metadata": {
"content": [
{
"type": "text",
"text": "A blue-green jingwei bird transforms into human form --rs 720p --dur 5 --fps 24 --cf false --wm false --seed 67890"
},
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,iVBORw0KGgoAAxxxx..."
},
"role": "first_frame"
},
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,iVBORw0KGgoAAyyyy..."
},
"role": "last_frame"
}
]
}
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-1-0-lite-i2v-250428",
"metadata": {
"content": [
{
"type": "text",
"text": "[图1] A boy wearing glasses and blue T-shirt and [图2] corgi dog, sitting on [图3] lawn, 3D cartoon style --rs 720p --dur 5 --ratio 16:9 --wm false"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/ref1.png"
},
"role": "reference_image"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/ref2.png"
},
"role": "reference_image"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/ref3.png"
},
"role": "reference_image"
}
]
}
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-1-0-pro-250528",
"metadata": {
"content": [
{
"type": "text",
"text": "A girl opens her eyes and looks gently at the camera --ratio 16:9 --dur 5 --rs 1080p --wm false"
},
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,iVBORw0KGgoAAxxxx..."
}
}
]
}
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-1-5-pro-251215",
"metadata": {
"content": [
{
"type": "text",
"text": "A cute kitten chasing butterflies in a garden, spring sunlight on flowers --ratio 16:9 --dur 6 --rs 720p --wm false"
}
]
}
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-1-5-pro-251215-noAudio",
"metadata": {
"content": [
{
"type": "text",
"text": "The scene gradually comes to life, person smiles and looks into the distance --ratio 16:9 --dur 5 --rs 720p --wm false"
},
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,iVBORw0KGgoAAxxxx..."
}
}
]
}
}'
curl -X POST "https://api.gravitex.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-1-5-pro-251215",
"metadata": {
"content": [
{
"type": "text",
"text": "Smooth transition from static scene to dynamic scene --ratio 16:9 --dur 8 --rs 720p --wm false"
},
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,iVBORw0KGgoAAxxxx..."
},
"role": "first_frame"
},
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,iVBORw0KGgoAAyyyy..."
},
"role": "last_frame"
}
]
}
}'
- The
contentarray must be placed in themetadataobject - All parameters are passed through special markers in the prompt text (e.g.
--ratio 16:9) - Images must be placed in the
contentarray using theimage_urltype - First/last frame mode requires two images, marked with
role: "first_frame"androle: "last_frame"respectively - Reference image mode requires using markers like
[图1],[图2]in the prompt to reference images, with images markedrole: "reference_image" doubao-seedance-1-0-lite-t2v-250428does not support image input andadaptiveaspect ratiodoubao-seedance-1-0-pro-250528only supports first frame modedoubao-seedance-1-5-pro-251215automatically generates audio, suitable for scenes requiring background musicdoubao-seedance-1-5-pro-251215-noAudiodoes not generate audio, faster rendering, suitable for scenes requiring post-production audio- 1.5 pro series supports text-to-video and image-to-video (first frame mode, first/last frame mode), does not support reference image mode
- 1.5 pro series resolution limit: Only supports
480pand720p(does not support 1080p) - 1.5 pro series duration range: Supports any integer between 4-12 seconds
- First/last frame mode: Requires providing two images, marked with
role: "first_frame"androle: "last_frame"respectively
Response Example
{
"task_id": "video_69095b4ce0048190893a01510c0c98b0",
"status": "submitted",
"format": "mp4"
}
Related APIs
Query Video Task
Query video generation task status and results
Download Video
Download completed video files (Sora 2 only)
⌘I