Seedance 2.5
Seedance 2.5 supports text-to-video, multimodal image/video/audio references, and first/last-frame generation. The public model name is doubao-seedance-2.5; generation tasks are routed transparently through the configured upstream channels.
durationsupports-1. When set to-1, the upstream determines output duration and a separate output duration cannot be set. The request may contain video input, but video is not required.
Capabilities
| Feature | Supported range |
|---|---|
| Output duration | 4–30 seconds, or -1 for upstream-determined duration; default 5 |
| Resolution | 480p, 720p, 1080p |
| Aspect ratio | adaptive, 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 |
| Reference images | Up to 30 |
| Reference videos | Fixed-duration requests: up to 10 and 30 seconds total; with duration=-1, count and total duration are validated by the upstream |
| Reference audio | Up to 10; 30 seconds total; audio-only input supported |
| Output format | mp4, mov |
Pricing
- Without video input:
output duration × rate per second - With video input:
(total input video duration + output duration) × rate per second - With
duration=-1and no video:actual output duration × no-video rate per second - With
duration=-1and video:(total input video duration + actual output duration) × video-input rate per second
| Resolution | Input without video | Input with video |
|---|---|---|
| 480p | 25.86 credits/s | 17.24 credits/s |
| 720p | 58.17 credits/s | 38.78 credits/s |
| 1080p | 103.68 credits/s | 69.12 credits/s |
Examples:
- 5-second 480p text-to-video:
5 × 25.86 = 129.30 credits - 5-second 720p text-to-video:
5 × 58.17 = 290.85 credits - 5-second 1080p text-to-video:
5 × 103.68 = 518.40 credits - 1080p with 5 seconds of input video and 5 seconds of output:
(5 + 5) × 69.12 = 691.20 credits - 720p with 5 seconds of input video and 5 seconds of output:
(5 + 5) × 38.78 = 387.80 credits - 720p with a 10-second input video, 9.6-second actual output, and
duration=-1:(10 + 9.6) × 38.78 = 760.09 credits - 720p with no input video, 7.25-second actual output, and
duration=-1:7.25 × 58.17 = 421.73 credits
For duration=-1, the platform pre-charges up to 30 output seconds. If videos are present, it probes and adds their total duration to the pre-charge. After success, the platform uses the upstream output duration when available, otherwise probes the output video, and refunds the difference based on actual output duration. If output duration cannot be determined, the maximum pre-charge is retained without changing the successful task to failed. Failed or expired tasks receive a full refund.
Create a task
POST https://api.aivideoapi.ai/v1/videos/generations
Headers:
Authorization: Bearer sk-your-api-key
Content-Type: application/json
Request body
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Must be doubao-seedance-2.5 |
input | object | Yes | Generation parameters |
callback_url | string | No | Public HTTP(S) endpoint that receives completion/failure POST callbacks |
Input parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
prompt | string | Conditional | — | Required for text-only generation; optional when any media input is present |
generation_type | string | No | omni_reference | omni_reference or first_and_last_frames |
image_urls | string[] | object[] | No | — | Up to 30 reference images; 1–2 in first/last-frame mode |
video_urls | string[] | No | — | Fixed-duration requests support up to 10 reference videos and 30 seconds total; with duration=-1, count and total duration are validated by the upstream |
audio_urls | string[] | No | — | Up to 10 reference audio clips, 30 seconds total; may be used alone |
duration | integer | No | 5 | 4–30, or -1 to let the upstream determine output duration |
aspect_ratio | string | No | adaptive | Output ratio; first/last-frame mode only supports adaptive |
resolution | string | No | 720p | 480p, 720p, or 1080p |
generate_audio | boolean | No | true | Generate synchronized audio |
watermark | boolean | No | false | Add an AI watermark |
return_last_frame | boolean | No | false | Include the output video's last frame |
web_search | boolean | No | false | Allow the model to search the web when needed |
output_format | string | No | mp4 | mp4 or mov |
Generation modes
Multimodal reference
Omit generation_type or set it to omni_reference. Images, videos, and audio can be combined freely, and audio may be used alone. prompt is optional when media is present; a completely empty input is rejected.
First and last frames
Set generation_type to first_and_last_frames:
- One image is used as the first frame.
- With two images, the first is the first frame and the second is the last frame.
aspect_ratiomust be omitted or set toadaptive.video_urlsandaudio_urlscannot be combined with this mode.
Request examples
Text-to-video with MOV output
curl -X POST https://api.aivideoapi.ai/v1/videos/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-2.5",
"callback_url": "https://your-server.com/webhooks/video",
"input": {
"prompt": "A rain-soaked Tokyo street, slow dolly forward, neon reflections on the pavement",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"generate_audio": true,
"output_format": "mov",
"return_last_frame": true
}
}'
Audio-only reference
curl -X POST https://api.aivideoapi.ai/v1/videos/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-2.5",
"input": {
"audio_urls": ["https://example.com/music.mp3"],
"duration": 8,
"resolution": "480p"
}
}'
Image, video, and audio references
{
"model": "doubao-seedance-2.5",
"input": {
"prompt": "Keep the character design, follow the reference camera rhythm, and use the audio for ambience",
"image_urls": ["https://example.com/character.png"],
"video_urls": ["https://example.com/camera-reference.mov"],
"audio_urls": ["https://example.com/ambience.wav"],
"duration": 10,
"resolution": "720p",
"aspect_ratio": "adaptive"
}
}
Upstream-determined output duration
duration=-1 does not require video input. With video, the platform probes and sums all input-video durations and bills “total input-video duration + actual output duration.” Without video, only actual output duration is billed. The upstream validates the media combination and determines output duration, so no separate output duration can be set.
{
"model": "doubao-seedance-2.5",
"input": {
"prompt": "Keep the original camera rhythm and replace the character's outfit",
"video_urls": ["https://example.com/input-video.mp4"],
"duration": -1,
"resolution": "720p",
"aspect_ratio": "adaptive"
}
}
First and last frames
{
"model": "doubao-seedance-2.5",
"input": {
"generation_type": "first_and_last_frames",
"prompt": "Transition naturally from day to night while keeping the building structure consistent",
"image_urls": [
"https://example.com/first-frame.png",
"https://example.com/last-frame.png"
],
"duration": 6,
"resolution": "720p",
"aspect_ratio": "adaptive"
}
}
Create response
{
"code": 200,
"msg": "success",
"data": {
"taskId": "cbf6b69d-4f03-4817-8ed7-94c0292184a8"
}
}
Query a task
curl https://api.aivideoapi.ai/v1/tasks/{taskId} \
-H "Authorization: Bearer sk-your-api-key"
The normal state flow is pending → processing → completed; failed tasks use failed.
Completed response example:
{
"id": "cbf6b69d-4f03-4817-8ed7-94c0292184a8",
"status": "completed",
"model": "doubao-seedance-2.5",
"credits_consumed": 290.85,
"created_at": 1786093200,
"completed_at": 1786093500,
"output": {
"urls": ["https://file.aivideoapi.ai/videos/example.mov"],
"last_frame_url": "https://file.aivideoapi.ai/images/example-last-frame.png",
"metadata": {
"duration": 5,
"ratio": "16:9",
"resolution": "720p",
"framespersecond": 24,
"generate_audio": true,
"output_format": "mov"
}
}
}
Completed media is mirrored to platform storage when enabled for the account. When callback_url is supplied, completion and failure payloads are POSTed to that endpoint using the same structure.
credits_consumed reports the task's actual credit charge in both task-query and callback payloads. It is 0 while a task is in progress and after a failed task has been refunded.
Media requirements
| Type | Formats | Per-item requirements | Count and total duration |
|---|---|---|---|
| Image | JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, HEIF | Aspect ratio 0.4–2.5; each side 300–6000 px; under 30 MB | Up to 30 images |
| Video | MP4, MOV | 2–30 seconds; aspect ratio 0.4–2.5; each side 300–6000 px; 409,600–8,295,044 pixels; under 200 MB; 24–60 FPS | Fixed-duration requests: up to 10 and 30 seconds total; duration=-1 is validated upstream |
| Audio | WAV, MP3 | 2–30 seconds; under 15 MB | Up to 10 clips, 30 seconds total |
Media URLs must be downloadable by the API service and the selected upstream channel. Reference video duration is probed before task creation; an inaccessible URL or a file that cannot be recognized as MP4/MOV causes a synchronous request error.
Important limitations
4kis not supported.duration=-1supports requests with no video or with one or more videos. The platform does not restrict video count, combination, or total duration; the upstream validates support./v1/estimatereturns the maximum pre-charge: 30 output seconds without video, or total input-video duration plus 30 output seconds with video.- Seedance 2.5 determines reference, extension, and editing task types from the prompt and media. Some task-specific restrictions can only be classified asynchronously by the upstream service and may therefore result in an asynchronous failure.
- First/last-frame mode only supports
adaptive; extension/edit intent involving videos may also be required by the upstream service to useadaptive. - Failed or expired tasks automatically refund the full pre-charge.
Error Codes
When a request fails, the API returns a JSON error response:
{
"error": {
"code": "insufficient_credits",
"message": "Your credit balance is too low. Please top up.",
"type": "billing_error"
}
}
Error Reference
| HTTP Status | Code | Type | Description |
|---|---|---|---|
| 400 | invalid_request | invalid_request_error | Missing or invalid parameters |
| 401 | invalid_api_key | authentication_error | API key is invalid, disabled, or deleted |
| 402 | insufficient_credits | billing_error | Credit balance too low, please top up |
| 403 | ip_not_allowed | permission_error | Request IP not in the key's allowlist |
| 404 | model_not_found | invalid_request_error | Model does not exist or is inactive |
| 404 | task_not_found | invalid_request_error | Task ID does not exist |
| 429 | rate_limit_exceeded | rate_limit_error | Too many requests, please slow down |
| 429 | spend_limit_exceeded | billing_error | Key spend limit reached (hourly/daily/total) |
| 500 | internal_error | api_error | Unexpected server error |
| 503 | upstream_error | upstream_error | Upstream AI provider returned an error |
Common Scenarios
invalid_request (400)
Returned when required fields are missing or invalid.
{
"error": {
"code": "invalid_request",
"message": "'model' is required.",
"type": "invalid_request_error"
}
}
insufficient_credits (402)
Your balance is too low. Check your balance with GET /v1/credits and top up in Dashboard > Billing.
invalid_api_key (401)
Possible causes:
- The key does not start with
sk- - The key has been disabled or deleted
- The user account has been banned
upstream_error (503)
The upstream AI provider returned an error. This may happen when:
- The input contains sensitive or prohibited content
- The provider is temporarily unavailable
- The request parameters are not supported by the provider
Credits are automatically refunded when a task fails due to upstream errors.