# Seedance 2.5 Flash

Seedance 2.5 Flash supports text-to-video, first/last-frame generation, reference generation and video editing. Use `dreamina-seedance-2-5-flash` with the **Default** tier. Send media as public HTTP or HTTPS URLs without credentials. Save the returned task ID and query it for the finished video.

See the [playground and live prices](https://seedrouter.ai/models/seedance-2-5-flash#pricing), [OpenAPI specification](https://seedrouter.ai/docs/seedance-2-5-flash.openapi.json), and [pricing guide](https://seedrouter.ai/blog/seedance-2-5-flash-pricing).

## Quick example

This request creates a four-second video. Review the current price before sending it; submitting a successful generation incurs a charge.

```bash
curl https://api.seedrouter.ai/v1/videos/generations \
  -H "Authorization: Bearer $SEEDROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dreamina-seedance-2-5-flash",
    "content": [{"type": "text", "text": "A ceramic cup slowly rotates under warm studio lighting."}],
    "resolution": "480p",
    "duration": 4,
    "ratio": "16:9",
    "generate_audio": false
  }'
```

```python
import os
import requests

response = requests.post(
    "https://api.seedrouter.ai/v1/videos/generations",
    headers={"Authorization": f"Bearer {os.environ['SEEDROUTER_API_KEY']}"},
    json={
        "model": "dreamina-seedance-2-5-flash",
        "content": [{"type": "text", "text": "A ceramic cup slowly rotates under warm studio lighting."}],
        "resolution": "480p", "duration": 4, "ratio": "16:9", "generate_audio": False,
    },
    timeout=90,
)
response.raise_for_status()
task_id = response.json()["id"]
```

```javascript
const response = await fetch('https://api.seedrouter.ai/v1/videos/generations', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SEEDROUTER_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    model: 'dreamina-seedance-2-5-flash',
    content: [{ type: 'text', text: 'A ceramic cup slowly rotates under warm studio lighting.' }],
    resolution: '480p', duration: 4, ratio: '16:9', generate_audio: false,
  }),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const { id: taskId } = await response.json();
```

```go
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
    "os"
    "time"
)

func main() {
    payload := []byte(`{"model":"dreamina-seedance-2-5-flash","content":[{"type":"text","text":"A ceramic cup slowly rotates under warm studio lighting."}],"resolution":"480p","duration":4,"ratio":"16:9","generate_audio":false}`)
    req, err := http.NewRequest("POST", "https://api.seedrouter.ai/v1/videos/generations", bytes.NewReader(payload))
    if err != nil { panic(err) }
    req.Header.Set("Authorization", "Bearer " + os.Getenv("SEEDROUTER_API_KEY"))
    req.Header.Set("Content-Type", "application/json")
    response, err := (&http.Client{Timeout: 90 * time.Second}).Do(req)
    if err != nil { panic(err) }
    defer response.Body.Close()
    if response.StatusCode != 200 { panic(response.Status) }
    var task struct { ID string `json:"id"` }
    if err := json.NewDecoder(response.Body).Decode(&task); err != nil { panic(err) }
    fmt.Println(task.ID)
}
```

## Parameters

`model` and `content` are required. All other fields are optional. Explicit `null` values and unknown fields are rejected.

| Field                      | Type    | Default                               | Constraints                                                                                                          |
| -------------------------- | ------- | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `model`                    | string  | required                              | `dreamina-seedance-2-5-flash`                                                                                        |
| `content`                  | array   | required                              | At least one non-empty text item; media items require a role.                                                        |
| `resolution`               | string  | `720p`                                | `480p` or `720p`.                                                                                                    |
| `duration`                 | integer | `5`, or `-1` for edit                 | Generation: 4–30 seconds. Edit: omit or use `-1`; output follows the source.                                         |
| `ratio`                    | string  | `16:9`, or `adaptive` for frames/edit | Text/reference generation: `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`. First/last frames and edit: only `adaptive`. |
| `generate_audio`           | boolean | `true`                                | Enable or disable generated audio; it does not change the rate.                                                      |
| `omni_reference_task_type` | string  | `generate`                            | `generate` or `edit`. Editing needs exactly one video.                                                               |
| `content_filter`           | boolean | `true`                                | Only `true` is accepted; no control is needed in the playground.                                                     |

Prompts are documented with a maximum of 10,000 tokens. No public tokenizer is specified, so a character count must not be treated as an exact token count.

## Content and modes

Text uses `{"type":"text","text":"Describe the shot"}`. Images, videos and audio use a nested URL and an explicit role:

```json
{
  "type": "image_url",
  "image_url": {"url": "https://example.com/reference.jpg"},
  "role": "reference_image"
}
```

| Mode                 | Content                                                                                | Framing and duration                                               |
| -------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| Text to video        | Text only                                                                              | Fixed ratio; 4–30 seconds.                                         |
| First/last frames    | Text plus one `first_frame`, optionally one `last_frame` image                         | `adaptive`; 4–30 seconds. Last frame requires first frame.         |
| Reference generation | Text plus `reference_image`, `reference_video` or `reference_audio` items              | Fixed ratio; 4–30 seconds. Up to 10 images, 5 videos and 5 audios. |
| Video edit           | Text, exactly one `reference_video`, optional reference images/audio; task type `edit` | `adaptive`; duration omitted or `-1`.                              |

Video items use `type: "video_url"`, `video_url: {"url": "..."}`, `role: "reference_video"`; audio items use `audio_url` and `reference_audio` in the same shape. First/last frames cannot be combined with reference media. Draft, Extend, 1080p, watermark, seed and last-frame output controls are not available for this integration. Callbacks are not offered.

## Media constraints

| Media | Formats         | Size and duration                                                                                                                                                                |
| ----- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Image | JPEG, PNG, WebP | Up to 30 MB; each edge 300–6,000 px; width/height ratio 0.4–2.5.                                                                                                                 |
| Video | MP4, MOV        | Up to 200 MB; 24–60 FPS; each edge 300–6,000 px; ratio 0.4–2.5; 409,600–8,295,044 pixels. References: 2–30 seconds each, at most 30 seconds combined. Edit source: 4–30 seconds. |
| Audio | WAV, MP3        | Up to 15 MB; 2–30 seconds each, at most 30 seconds combined.                                                                                                                     |

Files must be readable before submission. Video duration is measured from the media to calculate the charge. Use stable public URLs.

## Task response and polling

Creation returns an `id`, `model`, `status` and `created_at`. Query the same task until it completes:

```bash
curl "https://api.seedrouter.ai/v1/tasks/$TASK_ID" \
  -H "Authorization: Bearer $SEEDROUTER_API_KEY"
```

The status is `processing`, `completed` or `failed`. On success, read `output.video_url` for the stored video. On failure, read `error.code` and `error.message`. Public responses do not include costs. A polling timeout does not prove that generation failed: keep the task ID and query it again instead of submitting another generation.

## Billing

The live rate depends on resolution and whether a video is supplied. Without video input, billed seconds equal output duration. With reference videos, billed seconds equal output duration plus the greater of output duration and the combined input duration rounded up. Editing bills twice the source duration rounded up. Audio is included. Failed requests are not charged.

For example, a five-second output with three seconds of reference video bills ten seconds. A ten-second source edit bills twenty seconds. Multiply billed seconds by the applicable [live rate](https://seedrouter.ai/models/seedance-2-5-flash#pricing).

See [task lifecycle](https://seedrouter.ai/docs/api/tasks) and [error codes](https://seedrouter.ai/docs/api/errors) for common responses and retry guidance.
