# Seedance 2.5 API

> Seedance 2.5 — high-quality AI video generation.

- **Provider**: ByteDance
- **Model id**: `bytedance-seedance-2-5`
- **Modality**: video
- **Price**: 13.82–31.15 credits /sec

## Overview

Seedance 2.5 is called in two steps: create a generation task, then poll the task until the result is ready.

## Authentication

All requests require a Bearer Token in the request header:

```
Authorization: Bearer YOUR_API_KEY
```

## Create Task

`POST https://you.bot/api/v1/generate`

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| modelId | string | Yes | Model id: `bytedance-seedance-2-5` |
| input | object | Yes | Input parameters object (see below) |
| callbackUrl | string | No | https URL to receive a signed webhook on completion |

### input object parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| frame_key | string[] | No | Start Frame / End Frame |
| prompt | string | No | The text prompt or description for the video. Max 30000 characters. (default: Reference @Image1 @Image2 for the spear-wielding character, @Image3 @Image4 for the scene. Generate a martial arts action sequence where the character performs fluid spear techniques. Use multi-angle tracking shots to capture the power and beauty of martial arts.) |
| reference_image_urls | string[] | No | A list of input image URLs. (image URL) |
| reference_video_urls | string[] | No | A list of input video URLs. Furthermore, the total length of the three videos must not exceed 30 seconds. (image URL) |
| reference_audio_urls | string[] | No | A list of input audio URLs. Furthermore, the total length of the three audios must not exceed 30 seconds. (image URL) |
| generate_audio | boolean | No | Whether to generate AI audio synchronized with the video. (true/false) (default: true) |
| return_last_frame | boolean | No | Whether to return the last frame of the video. When draft=true, this parameter cannot be set to true. (true/false) (default: false) |
| resolution | string | No | The output video resolution. (options: 480p | 720p) (default: 720p) |
| aspect_ratio | string | No | The aspect ratio of the generated video. (options: 16:9 | 4:3 | 1:1 | 3:4 | 9:16 | 21:9 | adaptive) (default: adaptive) |
| duration | number | No | Video duration in seconds. (range 4-30) (default: 5) |
| output_format | string | No | Video output format. (options: mp4 | mov) (default: mp4) |
| web_search | boolean | No | Enable online search? (true/false) (default: false) |
| nsfw_checker | boolean | No | A configurable parameter. Defaults to true in the Playground. (true/false) (default: true) |

### Request example

```json
{
  "modelId": "bytedance-seedance-2-5",
  "input": {
    "frame_key": [
      "https://example.com/input.jpg"
    ],
    "prompt": "A cinematic aerial shot of a coastal town at golden hour, gentle waves rolling onto the shore, warm light, slow camera push-in.",
    "reference_image_urls": [
      "https://example.com/input.jpg"
    ],
    "reference_video_urls": [
      "https://example.com/input.jpg"
    ],
    "reference_audio_urls": [
      "https://example.com/input.jpg"
    ],
    "generate_audio": true,
    "return_last_frame": false,
    "resolution": "720p",
    "aspect_ratio": "adaptive",
    "duration": "5",
    "output_format": "mp4",
    "web_search": false,
    "nsfw_checker": true
  }
}
```

### Response example

```json
{
  "taskId": "281e5b0…f39b9",
  "creditsCharged": 155.75
}
```

## Query Task

`GET https://you.bot/api/v1/task/{taskId}?model=bytedance-seedance-2-5`

When `state` is `success`, the output is in `resultUrls`: `{ "state": "success", "resultUrls": [ ... ] }`. (Text models return inline in the create response.)

## Error Codes

| Code | Description |
|------|-------------|
| 200 | Request successful |
| 400 | Invalid request parameters |
| 401 | Authentication failed, check API Key |
| 402 | Insufficient account balance |
| 422 | Parameter validation failed |
| 429 | Request rate limit exceeded |
| 500 | Internal server error |
