Skip to main content
POST
/
v1
/
videos
/
generations
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"
    }
  ]
}
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

Authorization
string
required
All API endpoints require Bearer Token authenticationGet your API Key:Visit the API Key Management Page to get your API KeyAdd it to the request header:
Authorization: Bearer YOUR_API_KEY

Request Parameters

model
string
required
Video generation model nameSupported 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
prompt
string
Video content descriptionRequired for text-to-video; optional for image-to-video or video-reference-to-videoIt is recommended to clearly specify the subject, action, camera movement, and style for better generation resultsExample: "A kitten yawning at the camera"
duration
integer
default:"5"
Video duration (seconds)Supported range: 5 to 15 secondsDefault: 5
size
string
default:"16:9"
Video aspect ratioOptions:
  • 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
resolution
string
default:"480p"
Video resolutionOptions:
  • 480p - Standard definition
  • 720p - High definition
Default: 480p
seed
integer
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
camera_fixed
boolean
default:"false"
Whether to fix the camera positionWhen set to true, the camera position remains fixedDefault: false
generate_audio
boolean
default:"false"
Whether to generate audio (audio-enabled video)When set to true, the video will include AI-generated accompanying audioDefault: false
return_last_frame
boolean
default:"false"
Whether to return the last frame imageWhen 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 generationDefault: false
tools
array<object>
Tool list for enhanced capabilities such as web searchExample: [{"type": "web_search"}]
image_urls
array<string>
Image URL array for image-to-videoExample: ["https://example.com/cat.jpg"]
  • image_urls and image_with_roles cannot be used simultaneously
  • Maximum of 9 reference images
image_with_roles
array
Image array with roles, supports specifying first frame/last frameExample:
[
  {"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
video_urls
array<string>
Reference video URL arrayRequires publicly accessible video URLsExample: ["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
audio_urls
array<string>
Reference audio URL arrayRequires publicly accessible audio URLsExample: ["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

code
integer
Response status code, 200 on success
data
array
Response data array

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 ResultsVideo 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

Feature1.5 Pro2.0 / 2.0 fast
Resolution480p/720p/1080p480p/720p
Duration range4-12s5-15s
Default duration5s5s
Aspect ratio parameteraspect_ratiosize (new adaptive option)
Audio generationaudio parametergenerate_audio parameter
Reference videoNot supportedSupported via video_urls
Reference audioNot supportedSupported via audio_urls
Image-to-videoimage_urls / image_with_rolesimage_urls / image_with_roles
Audio-enabled videoNot supportedSupported via generate_audio
Continuous videoNot supportedSupported via return_last_frame
Fast versionNot supportedSupported via doubao-seedance-2.0-fast