# Seedance video

Call seedance-2.0 and seedance-2.5 with POST /v1/videos. Send a JSON body with fields at the top level.

Seedance video uses an asynchronous task API. The create call returns a task object, not the finished video file.

```http
POST /v1/videos
```

Poll and download:

```http
GET /v1/videos/{task_id}
GET /v1/videos/{task_id}/content
```

Send JSON. Put every field at the top level. Do not wrap these fields in `metadata`. `images` and `videos` accept only public `http` or `https` URLs. Base64 and data URIs are not supported. The links must stay available until the task finishes.

Check `GET /v1/models` before calling. A duration or resolution outside the table fails the task.

## Models

| Model ID | What it does | Duration | Resolution |
| --- | --- | --- | --- |
| `seedance-2.0` | Text, image, reference, first and last frame | 4–15 seconds | `480p`, `720p`, `1080p`, `4k` |
| `seedance-2.5` | Same modes, plus edit and extend | 4–30 seconds | `480p`, `720p`, `1080p` |

## Request fields

| Field | Required | Description |
| --- | --- | --- |
| `model` | Yes | A model ID from the table |
| `prompt` | Yes | Subject, action, camera, and what must stay unchanged. For references, say "image 1" or "video 1" |
| `mode` | No | `text2video`, `image2video`, `reference`, `frames2video`. `seedance-2.5` also accepts `video_edit` and `video_extend` |
| `duration` | No | 4–15 seconds for `seedance-2.0`, 4–30 seconds for `seedance-2.5`. `video_edit` and `video_extend` may send `-1` to follow the source video length |
| `resolution` | No | `480p`, `720p`, `1080p`. Only `seedance-2.0` also accepts `4k` |
| `aspect_ratio` | No | For example `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9` |
| `images` | No | Array of public image URLs. URLs only, not base64 |
| `videos` | No | Array of public video URLs. URLs only, not base64 |
| `face_check` | No | Whether to check faces. Omitted is treated as enabled |
| `generate_audio` | No | `true` or `false` |
| `output_format` | No | For example `mp4` or `mov`. Omitted uses the default format |

`image2video` uses the first item in `images` as the first frame. `frames2video` uses the first item as the first frame and the second as the last frame. `reference` may include both `images` and `videos`. `video_edit` and `video_extend` put the source video in `videos`.

## Text to video

```bash
curl https://kaienapi.com/v1/videos \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2.0",
    "prompt": "A quiet lake at dawn, mist lifting, camera held still",
    "mode": "text2video",
    "duration": 5,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "face_check": false
  }'
```

## Image to video

```bash
curl https://kaienapi.com/v1/videos \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2.5",
    "prompt": "The cat in the picture turns its head slightly. Keep the camera still",
    "mode": "image2video",
    "duration": 4,
    "resolution": "480p",
    "aspect_ratio": "16:9",
    "images": [
      "https://example.com/cat.jpg"
    ]
  }'
```

## Reference image or video

```bash
curl https://kaienapi.com/v1/videos \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2.0",
    "prompt": "The person in image 1 walks with the motion from video 1",
    "mode": "reference",
    "duration": 5,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "face_check": true,
    "images": [
      "https://example.com/person.jpg"
    ],
    "videos": [
      "https://example.com/motion.mp4"
    ]
  }'
```

## First and last frame

```bash
curl https://kaienapi.com/v1/videos \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2.0",
    "prompt": "Move naturally from the first frame to the last frame and keep the person consistent",
    "mode": "frames2video",
    "duration": 5,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "images": [
      "https://example.com/first.jpg",
      "https://example.com/last.jpg"
    ]
  }'
```

## Edit and extend

Only `seedance-2.5` supports these modes. `duration: -1` follows the source length:

```bash
curl https://kaienapi.com/v1/videos \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2.5",
    "prompt": "Keep the subject and motion, and change the light to dusk",
    "mode": "video_edit",
    "duration": -1,
    "resolution": "720p",
    "videos": [
      "https://example.com/source.mp4"
    ],
    "generate_audio": false,
    "output_format": "mov"
  }'
```

Use `video_extend` to extend the clip.

## Polling

Save `id` from the create response. Poll every 3–5 seconds until `completed` or `failed`:

```bash
curl "https://kaienapi.com/v1/videos/$TASK_ID" \
  -H "Authorization: Bearer <YOUR_API_KEY>"
```

Read `url` when the task completes. That URL is the video file. `cost` in the response is not the account charge; use the console usage record. On failure, read `error.message`.

Download the bytes directly:

```bash
curl "https://kaienapi.com/v1/videos/$TASK_ID/content" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  --output result.mp4
```

## Prices

The charge is based on output seconds. Prices are CNY per second and follow the API key group, `standard` or `stable`.

| Model | Resolution | `standard` | `stable` |
| --- | --- | ---: | ---: |
| `seedance-2.0` face check on | 480p / 720p / 1080p / 4k | 0.462 / 0.696 / 1.735 / 3.535 | 0.462 / 0.994 / 2.478 / 5.050 |
| `seedance-2.0` face check off | 480p / 720p / 1080p / 4k | 0.5775 / 0.800 / 2.16875 / 4.41875 | 0.5775 / 1.2425 / 3.0975 / 6.3125 |
| `seedance-2.5` | 480p / 720p / 1080p | 0.54 / 1.06 / 2.99 | 0.67 / 1.51 / 3.74 |

If the console model page and the bill disagree, the bill is the charge.
