# Seedance 2.0

> Seedance 2.0, a video generation model by ByteDance.

- **Model ID**: `bytedance/seedance-2.0`
- **Maker**: ByteDance
- **Type**: video
- **Status**: live
- **Timeout**: 3600 s
- **Unified format**: Supported
- **Endpoint**: `POST https://api.kerox.ai/v1/tasks`
- **Model page**: https://kerox.ai/models/bytedance/seedance-2.0

## Pricing

**Billed by tokens.** The approx. per-second prices below are converted at 16:9: 720p without a reference video is approx. $0.1436 / s.

| Resolution | Without reference video (approx. / s) | With reference video (approx. / s) | Official / 1M tokens | Kerox / 1M tokens | With reference video: official / 1M tokens | With reference video: Kerox / 1M tokens |
| --- | --- | --- | --- | --- | --- | --- |
| 4k | $0.7387 | $0.4432 | $4.0000 | $3.8000 | $2.4000 | $2.2800 |
| 480p | $0.0668 | $0.0410 | $7.0000 | $6.6500 | $4.3000 | $4.0850 |
| 720p | $0.1436 | $0.0882 | $7.0000 | $6.6500 | $4.3000 | $4.0850 |
| 1080p | $0.3555 | $0.2170 | $7.7000 | $7.3150 | $4.7000 | $4.4650 |

- **Token formula**: `tokens = (output seconds + reference video seconds) × width × height × 24 / 1024`. With a reference video, the lower rate applies to the combined duration (output plus reference video).
- **Aspect ratio and audio**: approx. per-second prices are converted at 16:9 without a reference video. Other aspect ratios at the same resolution differ by under 5%, and audio does not change the price.
- **Estimate before you submit**: call `POST /v1/estimate`, or check Studio, for the estimated cost of your exact parameters.

## Request example

Submit a task with the model's native parameters.

### cURL

```bash
curl -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "bytedance/seedance-2.0",
  "input": {
    "content": [
      {
        "type": "text",
        "text": "a red fox running through fresh snow, cinematic lighting"
      }
    ],
    "resolution": "720p",
    "duration": 5
  }
}'
```

### Python

```python
import os
import requests

resp = requests.post(
    "https://api.kerox.ai/v1/tasks",
    headers={
        "Authorization": f"Bearer {os.environ['KEROX_API_KEY']}",
        "Content-Type": "application/json",
    },
    json={
        "model": "bytedance/seedance-2.0",
        "input": {
            "content": [
                {
                    "type": "text",
                    "text": "a red fox running through fresh snow, cinematic lighting",
                },
            ],
            "resolution": "720p",
            "duration": 5,
        },
    },
    timeout=60,
)
resp.raise_for_status()
task = resp.json()
print(task["id"], task["status"], task["output"])
```

### Node.js

```javascript
const res = await fetch('https://api.kerox.ai/v1/tasks', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.KEROX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "model": "bytedance/seedance-2.0",
    "input": {
      "content": [
        {
          "type": "text",
          "text": "a red fox running through fresh snow, cinematic lighting"
        }
      ],
      "resolution": "720p",
      "duration": 5
    }
  }),
});
const task = await res.json();
console.log(task.id, task.status, task.output);
```

### Go

```go
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	body := []byte(`{
  "model": "bytedance/seedance-2.0",
  "input": {
    "content": [
      {
        "type": "text",
        "text": "a red fox running through fresh snow, cinematic lighting"
      }
    ],
    "resolution": "720p",
    "duration": 5
  }
}`)
	req, _ := http.NewRequest("POST", "https://api.kerox.ai/v1/tasks", bytes.NewReader(body))
	req.Header.Set("Authorization", "Bearer "+os.Getenv("KEROX_API_KEY"))
	req.Header.Set("Content-Type", "application/json")
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	out, _ := io.ReadAll(resp.Body)
	fmt.Println(string(out))
}
```

## Parameters (native format)

| Parameter | Type | Default | Values | Description |
| --- | --- | --- | --- | --- |
| `ratio` | string | `"adaptive"` | adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | Aspect ratio |
| `content` | array | — | — | Content |
| `duration` | integer | `5` | -1, 4–15 | Duration |
| `priority` | integer | — | 0–9 | Queue priority |
| `watermark` | boolean | `false` | — | Watermark |
| `resolution` | string | `"720p"` | 480p, 720p, 1080p, 4k | Resolution |
| `service_tier` | string | `"default"` | default | Service tier |
| `generate_audio` | boolean | `true` | — | Generate audio |
| `return_last_frame` | boolean | `false` | — | Return last frame |
| `safety_identifier` | string | — | — | End-user ID |

## Parameters (unified format, `format: "unified"`)

| Parameter | Type | Default | Values | Description |
| --- | --- | --- | --- | --- |
| `n` | integer | `1` | 1 | Number of outputs |
| `audios` | string \| string[] | — | — | Reference audio |
| `images` | string \| string[] | — | — | Reference images |
| `prompt` | string | — | — | Prompt |
| `videos` | string \| string[] | — | — | Reference videos |
| `duration` | integer | `5` | -1, 4–15 | Duration |
| `last_frame` | string | — | — | Last frame |
| `resolution` | string | `"720p"` | 480p, 720p, 1080p, 4k | Resolution |
| `first_frame` | string | — | — | First frame |
| `aspect_ratio` | string | `"adaptive"` | adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | Aspect ratio |
| `priority` | integer | — | 0–9 | Queue priority |
| `watermark` | boolean | `false` | — | Watermark |
| `service_tier` | string | `"default"` | default | Service tier |
| `generate_audio` | boolean | `true` | — | Generate audio |
| `return_last_frame` | boolean | `false` | — | Return last frame |
| `safety_identifier` | string | — | — | End-user ID |

## Polling and output

Poll `GET /v1/tasks/{id}` or receive a webhook when the task finishes. Output files expire at `expires_at` (7 days after completion), so download anything you want to keep. The other fields of the task object are in the tasks guide and the API reference.

```bash
curl https://api.kerox.ai/v1/tasks/task_01JD8X9B4Q2M7T8N3K5P6R1S0V \
  -H "Authorization: Bearer $KEROX_API_KEY"
```

```json
{
  "id": "task_01JD8X9B4Q2M7T8N3K5P6R1S0V",
  "object": "task",
  "model": "bytedance/seedance-2.0",
  "status": "succeeded",
  "output": {
    "videos": [
      {
        "url": "https://cdn.kerox.ai/t/task_01JD8X9B4Q2M7T8N3K5P6R1S0V/5f2b8c1e9d3a4f6b8a7c0d1e2f3a4b5c/0.mp4",
        "content_type": "video/mp4",
        "width": 1280,
        "height": 720,
        "duration": 5
      }
    ]
  },
  "error": null,
  "expires_at": "2026-11-27T08:01:10Z"
}
```

## Input schema (JSON)

```json
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "content"
  ],
  "properties": {
    "ratio": {
      "enum": [
        "adaptive",
        "21:9",
        "16:9",
        "4:3",
        "1:1",
        "3:4",
        "9:16"
      ],
      "type": "string",
      "x-tier": "common",
      "default": "adaptive",
      "x-label-en": "Aspect ratio",
      "x-label-zh": "画面比例"
    },
    "content": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "title": "Text",
            "required": [
              "type",
              "text"
            ],
            "properties": {
              "text": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "const": "text"
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "title": "Image",
            "required": [
              "type",
              "image_url"
            ],
            "properties": {
              "role": {
                "enum": [
                  "first_frame",
                  "last_frame",
                  "reference_image"
                ],
                "type": "string"
              },
              "type": {
                "const": "image_url"
              },
              "image_url": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "pattern": "^(https://|data:image/)"
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "title": "Video",
            "required": [
              "type",
              "video_url",
              "role"
            ],
            "properties": {
              "role": {
                "const": "reference_video"
              },
              "type": {
                "const": "video_url"
              },
              "video_url": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "pattern": "^https://"
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "title": "Audio",
            "required": [
              "type",
              "audio_url",
              "role"
            ],
            "properties": {
              "role": {
                "const": "reference_audio"
              },
              "type": {
                "const": "audio_url"
              },
              "audio_url": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "pattern": "^(https://|data:audio/)"
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "x-tier": "common",
      "minItems": 1,
      "x-label-en": "Content",
      "x-label-zh": "输入内容",
      "x-constraints": {
        "max_text_items": 1,
        "audio_only_allowed": false,
        "max_reference_audios": 3,
        "max_reference_images": 9,
        "max_reference_videos": 3,
        "first_last_frame_exclusive_with_references": true
      }
    },
    "duration": {
      "type": "integer",
      "anyOf": [
        {
          "const": -1
        },
        {
          "maximum": 15,
          "minimum": 4
        }
      ],
      "x-tier": "common",
      "default": 5,
      "x-label-en": "Duration",
      "x-label-zh": "时长"
    },
    "priority": {
      "type": "integer",
      "x-tier": "advanced",
      "maximum": 9,
      "minimum": 0,
      "x-label-en": "Queue priority",
      "x-label-zh": "排队优先级"
    },
    "watermark": {
      "type": "boolean",
      "x-tier": "advanced",
      "default": false,
      "x-label-en": "Watermark",
      "x-label-zh": "水印"
    },
    "resolution": {
      "enum": [
        "480p",
        "720p",
        "1080p",
        "4k"
      ],
      "type": "string",
      "x-tier": "common",
      "default": "720p",
      "x-label-en": "Resolution",
      "x-label-zh": "分辨率"
    },
    "service_tier": {
      "enum": [
        "default"
      ],
      "type": "string",
      "x-tier": "advanced",
      "default": "default",
      "x-label-en": "Service tier",
      "x-label-zh": "服务档位"
    },
    "generate_audio": {
      "type": "boolean",
      "x-tier": "common",
      "default": true,
      "x-label-en": "Generate audio",
      "x-label-zh": "生成声音"
    },
    "return_last_frame": {
      "type": "boolean",
      "x-tier": "advanced",
      "default": false,
      "x-label-en": "Return last frame",
      "x-label-zh": "返回尾帧"
    },
    "safety_identifier": {
      "type": "string",
      "x-tier": "advanced",
      "maxLength": 64,
      "x-label-en": "End-user ID",
      "x-label-zh": "终端用户标识"
    }
  },
  "additionalProperties": false
}
```
