cURL
Python
JavaScript
Go
Java
PHP
Ruby
Swift
C#
curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-2.0",
"prompt": "A kitten yawning at the camera",
"resolution": "720p",
"size": "16:9",
"duration": 5,
"generate_audio": true
}'
{
"code" : 200 ,
"data" : [
{
"status" : "submitted" ,
"task_id" : "task_01KMCGF6BQGN3X28H3KSR50X5T"
}
]
}
Authentication
All API endpoints require Bearer Token authentication Get your API Key: Visit the API Key Management Page to get your API Key Add it to the request header: Authorization: Bearer YOUR_API_KEY
Request Parameters
Video generation model name Supported models:
doubao-seedance-2.0 - Standard version, supports text-to-video, image-to-video, first/last frame video, reference video, reference audio, and audio-enabled video
doubao-seedance-2.0-fast - Fast version, same features as the standard version with faster generation speed
Video content description Required for text-to-video; optional for image-to-video or video-reference-to-video It is recommended to clearly specify the subject, action, camera movement, and style for better generation results Example: "A kitten yawning at the camera"
Video duration (seconds) Supported range: 5 to 15 seconds Default: 5
Video aspect ratio Options:
16:9 - Landscape
9:16 - Portrait
1:1 - Square
4:3 - Traditional ratio
3:4 - Vertical traditional ratio
21:9 - Ultra-wide
adaptive - Adaptive (automatically matches the input image/video)
Default: 16:9
Video resolution Options:
480p - Standard definition
720p - High definition
Default: 480p
Random seed for controlling the randomness of generated content
With the same request, different seed values will produce different results
With the same request, the same seed value will produce similar results, but exact consistency is not guaranteed
Whether to fix the camera position When set to true, the camera position remains fixed Default: false
Whether to generate audio (audio-enabled video) When set to true, the video will include AI-generated accompanying audio Default: false
Whether to return the last frame image When set to true, the task result will additionally return the URL of the video’s last frame image, which can be used for continuous video generation Default: false
Tool list for enhanced capabilities such as web search Example: [{"type": "web_search"}] Tool type Options:
web_search - Web search, references online information during generation
Image URL array for image-to-video Example: ["https://example.com/cat.jpg"]
image_urls and image_with_roles cannot be used simultaneously
Maximum of 9 reference images
Image array with roles, supports specifying first frame/last frame Image role Options:
first_frame - First frame image, used as the video’s starting frame
last_frame - Last frame image, used as the video’s ending frame
Example: [
{ "url" : "https://example.com/day.jpg" , "role" : "first_frame" },
{ "url" : "https://example.com/night.jpg" , "role" : "last_frame" }
]
image_urls and image_with_roles cannot be used simultaneously
When using first/last frame images, video_urls and audio_urls are not available
Reference video URL array Requires publicly accessible video URLs Example: ["https://example.com/reference.mp4"]
When using first/last frame images (image_with_roles), reference videos are not available
Maximum of 3 reference videos, total duration must be 15s or less
Reference video resolution must be between 480P and 720P
Reference audio URL array Requires publicly accessible audio URLs Example: ["https://example.com/speech.wav"]
When using first/last frame images (image_with_roles), reference audio is not available
Maximum of 3 reference audio files, total duration must be 15s or less
Reference audio must be used together with reference images or reference videos
Response
Response status code, 200 on success
Response data array Task status, submitted when initially submitted
Unique task identifier for querying task status and results
Use Cases
Case 1: Text-to-Video
{
"model" : "doubao-seedance-2.0" ,
"prompt" : "A kitten yawning at the camera" ,
"resolution" : "720p" ,
"size" : "16:9" ,
"duration" : 5 ,
"seed" : 42 ,
"generate_audio" : true
}
Case 2: Image-to-Video (First Frame)
{
"model" : "doubao-seedance-2.0" ,
"prompt" : "The kitten stands up and walks toward the camera" ,
"image_urls" : [ "https://example.com/cat.jpg" ],
"duration" : 5
}
Case 3: First/Last Frame Video
{
"model" : "doubao-seedance-2.0" ,
"prompt" : "Transition from day to night" ,
"image_with_roles" : [
{ "url" : "https://example.com/day.jpg" , "role" : "first_frame" },
{ "url" : "https://example.com/night.jpg" , "role" : "last_frame" }
],
"duration" : 5
}
Case 4: Video-Reference-to-Video
{
"model" : "doubao-seedance-2.0" ,
"prompt" : "Convert the video style to anime style" ,
"video_urls" : [ "https://example.com/reference.mp4" ]
}
Case 5: Reference Video + Reference Audio
{
"model" : "doubao-seedance-2.0" ,
"prompt" : "A scene of a person speaking" ,
"video_urls" : [ "https://example.com/reference.mp4" ],
"audio_urls" : [ "https://example.com/speech.wav" ],
"size" : "16:9" ,
"duration" : 11
}
Case 6: Audio-Enabled Video
{
"model" : "doubao-seedance-2.0" ,
"prompt" : "A man stops a woman and says: \" Remember, you must never point your finger at the moon. \" " ,
"generate_audio" : true
}
Case 7: Continuous Video Generation (Return Last Frame)
{
"model" : "doubao-seedance-2.0" ,
"prompt" : "The kitten continues walking toward the camera" ,
"image_urls" : [ "https://example.com/last_frame_from_prev.png" ],
"return_last_frame" : true
}
Case 8: Fast Version Generation
{
"model" : "doubao-seedance-2.0-fast" ,
"prompt" : "City nightscape timelapse photography" ,
"size" : "21:9" ,
"duration" : 8
}
Query Task Results Video generation is an async task that returns a task_id upon submission. Use the Get Task Status endpoint to query generation progress and results.
Differences from 1.5 Pro Version
Feature 1.5 Pro 2.0 / 2.0 fast Resolution 480p/720p/1080p 480p/720p Duration range 4-12s 5-15s Default duration 5s 5s Aspect ratio parameter aspect_ratiosize (new adaptive option)Audio generation audio parametergenerate_audio parameterReference video Not supported Supported via video_urls Reference audio Not supported Supported via audio_urls Image-to-video image_urls / image_with_rolesimage_urls / image_with_rolesAudio-enabled video Not supported Supported via generate_audio Continuous video Not supported Supported via return_last_frame Fast version Not supported Supported via doubao-seedance-2.0-fast