Seedance 2.5 Flash
Seedance 2.5 Flash, a video generation model by ByteDance.
Overview
Seedance 2.5 Flash, a video generation model by ByteDance.
- Model ID:
bytedance/seedance-2.5-flash - Maker: ByteDance
- Type:
video - Timeout: 43200 s
- Typical time: ~84 s
- Endpoint:
POST https://api.kerox.ai/v1/tasks - Estimate: billed by tokens; send the same body to
POST https://api.kerox.ai/v1/estimatefirst for the cost of your request (Estimate, then submit)
Request example
Submit a task and get its id at once; get the result by polling (below) or by webhook. webhook_url and metadata are optional. To use a webhook, provide your own public HTTPS address in webhook_url. Every field is in Submit a task.
Set KEROX_API_KEY first. The polling example needs Bash, curl and jq. For Python, install requests with pip install requests.
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
-H "Authorization: Bearer $KEROX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2.5-flash",
"input": {
"prompt": "a red fox running through fresh snow, cinematic lighting",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9"
}
}'Reference image
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
-H "Authorization: Bearer $KEROX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2.5-flash",
"input": {
"prompt": "Image 1: the lighthouse beam sweeps slowly across the water",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9",
"images": [
"https://cdn.kerox.ai/assets/samples/seedream-5.5/lighthouse-blue-hour.webp"
],
"omni_reference_task_type": "auto"
}
}'First frame
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
-H "Authorization: Bearer $KEROX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2.5-flash",
"input": {
"prompt": "A lighthouse beam sweeps slowly across the waves",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "auto",
"first_frame": "https://cdn.kerox.ai/assets/samples/seedream-5.5/lighthouse-blue-hour.webp"
}
}'First and last frames
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
-H "Authorization: Bearer $KEROX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2.5-flash",
"input": {
"prompt": "Slowly dissolve from the coast to the cabin by the lake",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "auto",
"first_frame": "https://cdn.kerox.ai/assets/samples/seedream-5.5/lighthouse-blue-hour.webp",
"last_frame": "https://cdn.kerox.ai/assets/samples/seedream-5.0-pro/alpine-cabin-dawn.webp"
}
}'Reference video
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
-H "Authorization: Bearer $KEROX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2.5-flash",
"input": {
"prompt": "Use the camera motion of Video 1 for a flyover of a rocky coastline",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9",
"videos": [
"https://cdn.kerox.ai/assets/samples/seedance-2.0/sea-stacks-fog.mp4"
],
"omni_reference_task_type": "reference"
}
}'Edit a reference video
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
-H "Authorization: Bearer $KEROX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2.5-flash",
"input": {
"prompt": "Change the sky in Video 1 to a warm sunset",
"videos": [
"https://cdn.kerox.ai/assets/samples/seedance-2.0/sea-stacks-fog.mp4"
],
"omni_reference_task_type": "edit",
"aspect_ratio": "auto",
"duration": -1
}
}'Extend a reference video
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
-H "Authorization: Bearer $KEROX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2.5-flash",
"input": {
"prompt": "Continue Video 1 as the camera moves farther out over the sea",
"videos": [
"https://cdn.kerox.ai/assets/samples/seedance-2.0/sea-stacks-fog.mp4"
],
"omni_reference_task_type": "extend",
"aspect_ratio": "auto"
}
}'Reference audio
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
-H "Authorization: Bearer $KEROX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2.5-flash",
"input": {
"prompt": "Show a dinosaur at dusk and time its roar to Audio 1",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9",
"audios": [
"https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3"
]
}
}'Parameters
The parameter names mean the same on every model. You can also send ByteDance's own request body with "format": "native": see Migrate from ByteDance's API.
| Parameter | Description | Values and example |
|---|---|---|
promptstring · Optional | Text describing what to generate.Default · Unspecified | Values 1–10000 characters Example "A lighthouse at dawn" |
imagesstring | string[] · Optional | Images for the model to draw on, in the order the prompt refers to them.Default · Unspecified | Values one public HTTPS URL; or data:image/…;base64,… (≤ 3 MB total per request); one string or an array of 1–10 items; Model file limits: image/jpeg, image/png, image/webp, image/bmp, image/tiff, image/gif, image/heic, image/heif; under 30 MB each, 300–6,000 px per side, aspect ratio 0.4–2.5 Example "https://example.com/photo.png" |
videosstring | string[] · Optional | Videos for the model to draw on, in the order the prompt refers to them.Default · Unspecified | Values one public HTTPS URL; one string or an array of 1–5 items; Model file limits: video/mp4 or video/quicktime (H.264/H.265), up to 200 MB each; 480p–4K, 300–6,000 px per side, 407,696–8,847,360 pixels, 24–60 fps; 2–30 s each, up to 30 s total Example "https://example.com/clip.mp4" |
audiosstring | string[] · Optional | Audio clips for the model to draw on, in the order the prompt refers to them.Default · Unspecified | Values one public HTTPS URL; or data:audio/…;base64,… (≤ 3 MB total per request); one string or an array of 1–5 items; Model file limits: audio/wav or audio/mpeg (MP3), up to 15 MB each; 2–30 s each, up to 30 s total Example "https://example.com/music.wav" |
first_framestring · Optional | The image a video starts from.Default · Unspecified | Values one public HTTPS URL; or data:image/…;base64,… (≤ 3 MB total per request); Model file limits: image/jpeg, image/png, image/webp, image/bmp, image/tiff, image/gif, image/heic, image/heif; under 30 MB each, 300–6,000 px per side, aspect ratio 0.4–2.5 Example "https://example.com/start.png" |
last_framestring · Optional | The image a video ends on. Needs first_frame.Default · Unspecified | Values one public HTTPS URL; or data:image/…;base64,… (≤ 3 MB total per request); Model file limits: image/jpeg, image/png, image/webp, image/bmp, image/tiff, image/gif, image/heic, image/heif; under 30 MB each, 300–6,000 px per side, aspect ratio 0.4–2.5 Example "https://example.com/end.png" |
aspect_ratiostring · Optional | Width to height of the output.Default · "auto" | Values auto, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 Example "16:9" |
resolutionstring · Optional | Output resolution tier. The exact pixels follow from it and aspect_ratio.Default · "720p" | Values 480p, 720p Example "720p" |
durationinteger · Optional | Length of the output in whole seconds.Default · 5 | Values -1 (automatic duration); 4–30 Example 5 |
ninteger · Optional | How many outputs one task may produce.Default · 1 | Values 1 Example 1 |
generate_audioboolean · Optional | Whether the video comes with generated sound (voice, effects, music).Default · true | Values true, false Example true |
omni_reference_task_typestring · Optional | What to do with the references: generate from them, edit a video, or extend one. Only with reference images, videos or audios; leave it out for text-to-video and first or last frames, where it is rejected. Left out, the model decides ("auto").Default · Unspecified | Values auto, reference, edit, extend Example "auto" |
output_formatstring · Optional | File format of the output.Default · "mp4" | Values mp4, mov Example "mp4" |
return_last_frameboolean · Optional | Whether the result also includes the video’s last frame as an image, to continue from.Default · false | Values true, false Example false |
watermarkboolean · Optional | Whether the output carries the maker’s “AI generated” watermark.Default · false | Values true, false Example false |
- Supply at least one of: prompt or first_frame or images or videos or audios
- last_frame requires first_frame
- When omni_reference_task_type = "edit": supply videos; duration = -1; aspect_ratio = "auto"
- When omni_reference_task_type = "extend": supply videos; aspect_ratio = "auto"
- When first_frame: aspect_ratio = "auto"
- When omni_reference_task_type: supply images or videos or audios
- Do not combine first_frame with images or videos or audios
Use a public HTTPS URL directly for images, audio and video. For local media, upload with POST /v1/files and pass the returned url. For upload MIME and size limits, see Files & inputs.
Accepted and ignored: priority, safety_identifier, service_tier. A request may carry them; they are not passed to the model.
Polling and output
Poll GET /v1/tasks/{id}, or pass webhook_url when you submit and receive the same task object when it finishes: see Webhooks for the setup. Output files expire at expires_at (7 days after completion), so download anything you want to keep. See every task field in Tasks & polling.
Set TASK_ID to the id returned on submission. The script waits up to 10 minutes, prints error on failure and downloads every outputs[].url on success.
(
set -eu
# Set TASK_ID to the id returned by the submit request.
: "${TASK_ID:?Set TASK_ID}"
deadline=$((SECONDS + 600))
while (( SECONDS < deadline )); do
task=$(curl --fail-with-body --silent --show-error --max-time "$((deadline - SECONDS))" https://api.kerox.ai/v1/tasks/"$TASK_ID" \
-H "Authorization: Bearer $KEROX_API_KEY")
case $(jq -er .status <<< "$task") in
succeeded)
if ! jq -e '.outputs | length > 0' <<< "$task" >/dev/null; then
echo "Result files are unavailable." >&2
exit 1
fi
i=0
while IFS= read -r url; do
file_path=${url%%\?*}
filename="output-${i}.${file_path##*.}"
curl --fail-with-body --silent --show-error --max-time 120 "$url" -o "$filename"
printf "%s\n" "$filename"
i=$((i + 1))
done < <(jq -r '.outputs[].url' <<< "$task")
exit 0 ;;
failed) jq -c .error <<< "$task" >&2; exit 1 ;;
processing) sleep 2 ;;
*) echo "Unexpected task status." >&2; exit 1 ;;
esac
done
echo "Poll timed out. Keep TASK_ID to check again later." >&2
exit 1
)Pricing
From approx. $0.0639 / s (480p) at 16:9 without a reference video. Billed by tokens. 5% below official price
| Resolution | Without reference video | With reference video | ||||
|---|---|---|---|---|---|---|
| Approx. / s | Official / 1M tokens | Kerox / 1M tokens | Approx. / s | Official / 1M tokens | Kerox / 1M tokens | |
| 480p | $0.0639 | $7.0000 | $6.6500 | $0.0392 | $4.3000 | $4.0850 |
| 720p | $0.1436 | $7.0000 | $6.6500 | $0.0882 | $4.3000 | $4.0850 |
- 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.
Estimate before submitting
The returned amount is what submitting would hold. An estimate creates no task and charges nothing. When exact is false, the final charge may differ from the hold.
curl --fail-with-body -X POST https://api.kerox.ai/v1/estimate \
-H "Authorization: Bearer $KEROX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2.5-flash",
"input": {
"prompt": "a red fox running through fresh snow, cinematic lighting",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9"
}
}'Input schema (JSON)
The full JSON Schema, nested parameters included
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 10000,
"x-references": {
"images": "@Image {n}",
"videos": "@Video {n}",
"audios": "@Audio {n}"
},
"description": "Text describing what to generate.",
"x-label-en": "Prompt",
"x-label-zh": "提示词",
"x-tier": "common"
},
"images": {
"oneOf": [
{
"type": "string",
"pattern": "^(https://|data:image/)"
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string",
"pattern": "^(https://|data:image/)"
}
}
],
"description": "Images for the model to draw on, in the order the prompt refers to them.",
"x-label-en": "Reference images",
"x-label-zh": "参考图",
"x-tier": "common"
},
"videos": {
"oneOf": [
{
"type": "string",
"pattern": "^https://"
},
{
"type": "array",
"minItems": 1,
"maxItems": 5,
"items": {
"type": "string",
"pattern": "^https://"
}
}
],
"description": "Videos for the model to draw on, in the order the prompt refers to them.",
"x-label-en": "Reference videos",
"x-label-zh": "参考视频",
"x-tier": "common"
},
"audios": {
"oneOf": [
{
"type": "string",
"pattern": "^(https://|data:audio/)"
},
{
"type": "array",
"minItems": 1,
"maxItems": 5,
"items": {
"type": "string",
"pattern": "^(https://|data:audio/)"
}
}
],
"description": "Audio clips for the model to draw on, in the order the prompt refers to them.",
"x-label-en": "Reference audio",
"x-label-zh": "参考音频",
"x-tier": "common"
},
"first_frame": {
"type": "string",
"pattern": "^(https://|data:image/)",
"description": "The image a video starts from.",
"x-label-en": "First frame",
"x-label-zh": "首帧",
"x-tier": "common"
},
"last_frame": {
"type": "string",
"pattern": "^(https://|data:image/)",
"description": "The image a video ends on. Needs `first_frame`.",
"x-label-en": "Last frame",
"x-label-zh": "尾帧",
"x-tier": "common"
},
"aspect_ratio": {
"type": "string",
"enum": [
"auto",
"21:9",
"16:9",
"4:3",
"1:1",
"3:4",
"9:16"
],
"default": "auto",
"description": "Width to height of the output.",
"x-label-en": "Aspect ratio",
"x-label-zh": "画面比例",
"x-tier": "common"
},
"resolution": {
"type": "string",
"enum": [
"480p",
"720p"
],
"default": "720p",
"description": "Output resolution tier. The exact pixels follow from it and `aspect_ratio`.",
"x-label-en": "Resolution",
"x-label-zh": "分辨率",
"x-tier": "common"
},
"duration": {
"type": "integer",
"anyOf": [
{
"const": -1
},
{
"maximum": 30,
"minimum": 4
}
],
"default": 5,
"description": "Length of the output in whole seconds.",
"x-label-en": "Duration",
"x-label-zh": "时长",
"x-tier": "common"
},
"n": {
"type": "integer",
"const": 1,
"default": 1,
"description": "How many outputs one task may produce.",
"x-label-en": "Number of outputs",
"x-label-zh": "生成数量",
"x-tier": "advanced"
},
"generate_audio": {
"type": "boolean",
"default": true,
"description": "Whether the video comes with generated sound (voice, effects, music).",
"x-label-en": "Generate audio",
"x-label-zh": "生成声音",
"x-tier": "common"
},
"omni_reference_task_type": {
"enum": [
"auto",
"reference",
"edit",
"extend"
],
"type": "string",
"description": "What to do with the references: generate from them, edit a video, or extend one. Only with reference images, videos or audios; leave it out for text-to-video and first or last frames, where it is rejected. Left out, the model decides (`\"auto\"`).",
"x-label-en": "Reference task",
"x-label-zh": "参考任务类型",
"x-tier": "advanced"
},
"output_format": {
"enum": [
"mp4",
"mov"
],
"type": "string",
"default": "mp4",
"description": "File format of the output.",
"x-label-en": "Output format",
"x-label-zh": "输出格式",
"x-tier": "advanced"
},
"return_last_frame": {
"type": "boolean",
"default": false,
"description": "Whether the result also includes the video’s last frame as an image, to continue from.",
"x-label-en": "Return last frame",
"x-label-zh": "返回尾帧",
"x-tier": "advanced"
},
"watermark": {
"type": "boolean",
"default": false,
"description": "Whether the output carries the maker’s “AI generated” watermark.",
"x-label-en": "Watermark",
"x-label-zh": "水印",
"x-tier": "advanced"
}
},
"anyOf": [
{
"properties": {
"prompt": true
},
"required": [
"prompt"
]
},
{
"properties": {
"first_frame": true
},
"required": [
"first_frame"
]
},
{
"properties": {
"images": true
},
"required": [
"images"
]
},
{
"properties": {
"videos": true
},
"required": [
"videos"
]
},
{
"properties": {
"audios": true
},
"required": [
"audios"
]
}
],
"dependentRequired": {
"last_frame": [
"first_frame"
]
},
"additionalProperties": false,
"x-ignored": [
"priority",
"safety_identifier",
"service_tier"
],
"allOf": [
{
"not": {
"properties": {
"first_frame": true,
"images": true
},
"required": [
"first_frame",
"images"
]
}
},
{
"not": {
"properties": {
"first_frame": true,
"videos": true
},
"required": [
"first_frame",
"videos"
]
}
},
{
"not": {
"properties": {
"first_frame": true,
"audios": true
},
"required": [
"first_frame",
"audios"
]
}
},
{
"if": {
"required": [
"omni_reference_task_type"
],
"properties": {
"omni_reference_task_type": {
"const": "edit"
}
}
},
"then": {
"required": [
"videos"
],
"properties": {
"videos": true,
"duration": {
"const": -1
},
"aspect_ratio": {
"const": "auto"
}
}
}
},
{
"if": {
"required": [
"omni_reference_task_type"
],
"properties": {
"omni_reference_task_type": {
"const": "extend"
}
}
},
"then": {
"required": [
"videos"
],
"properties": {
"videos": true,
"aspect_ratio": {
"const": "auto"
}
}
}
},
{
"if": {
"required": [
"first_frame"
],
"properties": {
"first_frame": true
}
},
"then": {
"properties": {
"aspect_ratio": {
"const": "auto"
}
}
}
},
{
"if": {
"required": [
"omni_reference_task_type"
],
"properties": {
"omni_reference_task_type": true
}
},
"then": {
"anyOf": [
{
"required": [
"images"
],
"properties": {
"images": true
}
},
{
"required": [
"videos"
],
"properties": {
"videos": true
}
},
{
"required": [
"audios"
],
"properties": {
"audios": true
}
}
]
}
}
]
}