> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maxapi.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Seedance Video

> Seedance 2.5, 2.0 and 2.0 Mini request fields, generation modes, examples and pricing

Send a JSON body to `POST https://api.maxapi.io/api/v1/task/submit` with an [API key](https://docs.maxapi.io/api-reference/authentication.md) in the Authorization header.

## Models and limits

| Model | `model` | Output duration | Reference images | Reference videos | Reference audio clips |
| - | - | - | - | - | - |
| Seedance 2.5 | `seedance-2.5` | 4–30 s | 30 | 10, 30 s total | 10 |
| Seedance 2.0 | `seedance-2.0` | 4–15 s | 9 | 3, 15 s total | 3 |
| Seedance 2.0 Mini | `seedance-2.0-mini` | 4–15 s | 9 | 3, 15 s total | 3 |

Reference limits apply to `reference-to-video`. All three models support 720p and 1080p.

## Request fields

| Field | Type | Required / default | Description |
| - | - | - | - |
| `model` | string | Required | Exact model ID from the table above. |
| `input` | object | Required | Holds all generation settings below. |
| `input.prompt` | string | Required | Non-empty prompt describing the action, camera movement and any desired sound. In first/last-frame mode, describe what happens between the two images. |
| `input.mode` | string | Optional, inferred from media | `text-to-video`, `image-to-video`, `first-last-frame` or `reference-to-video`. See mode rules below. |
| `input.imageUrls` | string\[] | Optional, required for frame modes | One opening image, an ordered pair of start and end images, or reference images, depending on the mode. |
| `input.videoUrls` | string\[] | Optional | Reference mode only. Use MP4 or MOV links. MaxAPI reads the source duration before pricing. |
| `input.audioUrls` | string\[] | Optional | Reference mode only. Include at least one image or video when sending reference audio. |
| `input.duration` | integer | `5` | Output length in seconds. See the model-specific range above. |
| `input.resolution` | string | `720p` | `720p` or `1080p`. |
| `input.ratio` | string | Depends on mode | `16:9`, `9:16`, `4:3`, `3:4`, `1:1`, `21:9` or `adaptive`. When omitted, text mode uses `16:9`, the two frame modes use the opening image’s framing, and reference mode uses the model’s default. |
| `input.audio` | boolean | `true` | Controls generated audio in the output. Set `false` for a silent video. Pricing is the same. |
| `callBackUrl` | string | Optional | Top-level URL for [task webhooks](https://docs.maxapi.io/api-reference/webhook.md). |

## Media inputs

Pass each field as a JSON array of URL strings, even for a single file. For example, use `"imageUrls": ["https://cdn.example.com/start.jpg"]`. Each URL must point directly to a media file that MaxAPI can fetch over HTTP(S). Replace the sample URLs with your own. A signed URL can be used if it stays valid for the duration of the task and can be fetched without extra headers or cookies. Local paths, Base64 data URLs and file-sharing preview pages do not work as media links.

### `input.imageUrls`

* **Image to video:** Pass exactly one image in `imageUrls[0]`. It becomes the opening frame.
* **First and last frames:** Pass exactly two images. `imageUrls[0]` is the opening frame and `imageUrls[1]` is the closing frame. Set `mode` to `first-last-frame` and omit `videoUrls` and `audioUrls`.
* **Reference to video:** Use images to guide the subject, appearance or style. You can combine them with reference video and audio. The limit is 30 images for 2.5 and 9 for 2.0 or Mini. Reference images have no separate charge.

### `input.videoUrls`

* Use in `reference-to-video` to guide motion, camera movement or scene action. A video can be the only reference, or you can combine it with images and audio.
* Send direct MP4 or MOV links. For 2.5, use up to 10 clips with a combined duration of at most 30 seconds. For 2.0 or Mini, use up to 3 clips totaling at most 15 seconds.
* MaxAPI reads each source file to get its duration. The reference-video charge uses the sum of source durations. `input.duration` still sets the output length. If the durations cannot be read or their sum exceeds the limit, the submission returns HTTP 400.

### `input.audioUrls`

* Use in `reference-to-video` for an audio reference such as music, rhythm or ambience. Provide at least one image or video in the same request. For example, `imageUrls` can hold a product photo and `audioUrls` can hold a link to a rhythm track.
* Pass up to 10 audio URLs for 2.5 or up to 3 for 2.0 or Mini. Reference audio has no separate charge.
* `audioUrls` supplies source material. `input.audio` controls whether the generated video contains audio. Set `input.audio` to `false` for a silent output.

## Generation modes

| `input.mode` | What to send |
| - | - |
| `text-to-video` | Prompt only, with no input media. |
| `image-to-video` | Exactly one URL in `imageUrls`, used as the opening frame. Omit `videoUrls` and `audioUrls`. |
| `first-last-frame` | Exactly two URLs in `imageUrls`, ordered **opening frame, closing frame**. Omit `videoUrls` and `audioUrls`. |
| `reference-to-video` | At least one image or video. Audio can be added alongside either. The media guide the generation. |

If you omit `mode`, no media selects text-to-video, a single image by itself selects image-to-video, and other valid media combinations select reference-to-video. **Two images without a mode become references. Always set `mode` to `first-last-frame` to use them as the opening and closing frames.**

Switch between modes in the request examples. To use the first and last frames example with another Seedance model, change `model` to its ID from the table above.

```bash First and last frames theme={null}
curl --request POST 'https://api.maxapi.io/api/v1/task/submit' \
  --header "Authorization: Bearer ${MAXAPI_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "seedance-2.0",
  "input": {
    "mode": "first-last-frame",
    "prompt": "The camera slowly pushes in as the flower opens from a bud to full bloom.",
    "imageUrls": [
      "https://example.com/flower-closed.jpg",
      "https://example.com/flower-open.jpg"
    ],
    "duration": 5,
    "resolution": "720p",
    "audio": false
  }
}'
```

```bash Text to video theme={null}
curl --request POST 'https://api.maxapi.io/api/v1/task/submit' \
  --header "Authorization: Bearer ${MAXAPI_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "seedance-2.5",
  "input": {
    "mode": "text-to-video",
    "prompt": "A paper boat floats down a rain-soaked street at dusk, low tracking shot.",
    "ratio": "16:9"
  }
}'
```

```bash Image to video theme={null}
curl --request POST 'https://api.maxapi.io/api/v1/task/submit' \
  --header "Authorization: Bearer ${MAXAPI_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "seedance-2.0-mini",
  "input": {
    "mode": "image-to-video",
    "prompt": "The camera pans right as fog drifts across the lake.",
    "imageUrls": [
      "https://example.com/lake.jpg"
    ]
  }
}'
```

```bash Reference to video theme={null}
curl --request POST 'https://api.maxapi.io/api/v1/task/submit' \
  --header "Authorization: Bearer ${MAXAPI_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "seedance-2.5",
  "input": {
    "mode": "reference-to-video",
    "prompt": "Show the bicycle from the photo, using the tracking movement from the clip and the rhythm of the audio.",
    "imageUrls": [
      "https://example.com/bicycle.jpg"
    ],
    "videoUrls": [
      "https://example.com/tracking-shot.mp4"
    ],
    "audioUrls": [
      "https://example.com/rhythm.mp3"
    ]
  }
}'
```

```json 200 Task submitted theme={null}
{
  "code": 0,
  "msg": "ok",
  "data": {
    "taskId": "9db7d1ed-d1e5-4d11-9f3a-61f653b905ad"
  }
}
```

## Get the result

Read `data.taskId` from the submission response. Poll [Query Task](https://docs.maxapi.io/api-reference/query-task.md) or use a [webhook](https://docs.maxapi.io/api-reference/webhook.md). When `data.status` is `SUCCESS`, read the video URL from `data.result.urls[0]`. Stop polling on `SUCCESS`, `FAILURE`, `TIMEOUT` or `CANCELLED`.

```bash theme={null}
curl "https://api.maxapi.io/api/v1/task/${TASK_ID}" \
  --header "Authorization: Bearer ${MAXAPI_API_KEY}"
```

## Pricing

Rates are in USD per second. For a request with reference video, use the output rate in the fourth column and add the reference rate multiplied by the total reference video duration. Reference images and audio have no separate charge.

| Model | Resolution | Output rate without reference video | Output rate with reference video | Reference video rate |
| - | - | - | - | - |
| Seedance 2.5 | 720p | \$0.225 | \$0.21 | \$0.13 |
| Seedance 2.5 | 1080p | \$0.55 | \$0.44 | \$0.27 |
| Seedance 2.0 | 720p | \$0.147 | \$0.13 | \$0.05 |
| Seedance 2.0 | 1080p | \$0.365 | \$0.30 | \$0.15 |
| Seedance 2.0 Mini | 720p | \$0.071 | \$0.071 | \$0.02 |
| Seedance 2.0 Mini | 1080p | \$0.141 | \$0.141 | \$0.04 |

One credit is $0.01. Round the total cost up to a whole credit. A 5-second Seedance 2.5 request at 720p with a 5-second reference video costs 170 credits ($1.70).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.