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

# Seedance 2.0 Mini

> Generate videos using the Bytedance Seedance 2.0 Mini model.

## Endpoint

```http theme={null}
POST /api/v1/jobs/createTask
```

## Authentication

All API requests require a Bearer Token.

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Important Notes

* **Image-to-Video (First Frame)** and **Image-to-Video (First & Last Frames)** are mutually exclusive scenarios and cannot be used simultaneously.

## Request Body

The request body must be JSON.

### Top-level parameters

| Parameter | Type   | Required | Default                     | Description                                      |
| --------- | ------ | -------: | --------------------------- | ------------------------------------------------ |
| `model`   | string |      Yes | `bytedance/seedance-2-mini` | Model name. Must be `bytedance/seedance-2-mini`. |
| `input`   | object |      Yes | —                           | Input parameters for the generation task.        |

<ParamField body="model" type="string" required>
  Must be `bytedance/seedance-2-mini`.
</ParamField>

<ParamField body="input" type="object" required>
  ## Input Parameters

  The `input` object contains the parameters used to generate the video.

  <ParamField body="prompt" type="string">
    Use `prompt` to describe the video you want to generate.

    **Manimum length:** `3` characters. <br /> **Maximum length:** `20000` characters.
  </ParamField>

  <ParamField body="first_frame_url" type="string">
    Provide the URL of the image to be used as the first frame for video generation. The value must be an uploaded file URL, not the file content itself.

    Supported image formats:

    * `image/jpeg`
    * `image/png`
    * `image/jpg`
    * `image/webp`

    Maximum file size: `30 MB`
  </ParamField>

  <ParamField body="last_frame_url" type="string">
    Provide the URL of the image to be used as the last frame for video generation. The value must be an uploaded file URL, not the file content itself.

    Supported image formats:

    * `image/jpeg`
    * `image/png`
    * `image/jpg`
    * `image/webp`

    Maximum file size: `30 MB`
  </ParamField>

  <ParamField body="reference_image_urls" type="string[]">
    Enter the URL(s) of the reference image(s) to be used for video generation.

    Supported image formats:

    * `jpeg`
    * `png`
    * `webp`
    * `bmp`
    * `tiff`
    * `gif`

    Maximum file size: `30 MB` <br /> Maximum number of files: The sum of the number of frames at the beginning and end must not exceed `9`. <br /> Width and height (px): `(300, 6000)` <br /> Aspect ratio (width/height): `0.4` to `2.5`
  </ParamField>

  <ParamField body="reference_video_urls" type="string[]">
    Enter the URL(s) of the reference video(s) to be used for video generation.

    Maximum reference videos : `3` <br /> **Single video requirements** <br /> Supported video formats:

    * `mp4`
    * `mov`

    Supported resolution:

    * `480p`
    * `720p`

    Supported duration:

    * For single video duration beetween `2` and `15`.
    * Total duration of all videos not exceeding `15` seconds.

    Maximum size of single video : `50` MB. <br /> Width and height (px): `(300, 6000)` <br /> Aspect ratio (width/height): `0.4` to `2.5` <br /> Frame rate (FPS): \[24, 60] <br /> Total pixels: \[640×640=409600, 834×1112=927408]
  </ParamField>

  <ParamField body="reference_audio_urls" type="string[]">
    Enter the URL(s) of the reference audio(s) to be used for video generation.

    Maximum reference audios : `3` <br /> **Single audio requirements** <br /> Supported audio formats:

    * `wav`
    * `mp3`

    Supported duration:

    * For single audio duration beetween `2` and `15`.
    * Total duration of all audios not exceeding `15` seconds.

    Maximum size of single audio : `15` MB.
  </ParamField>

  <ParamField body="generate_audio" default="true" type="boolean">
    Whether to generate audio.

    **Default:** `true`
  </ParamField>

  <ParamField body="resolution" type="string">
    Specify the resolution of the generated video.

    Supported values:

    * `480p`
    * `720p`

    **Default:** `720p`
  </ParamField>

  <ParamField body="aspect_ratio" default="16:9" type="string">
    Applies to multi-image generation. In single-image mode, video dimensions follow the source image dimensions.

    Supported values: `3:4`, `4:3`, `1:1`, `16:9`, `9:16`, `21:9`, `adaptive`. **Default:** `16:9`
  </ParamField>

  <ParamField body="duration" type="number">
    Generated video duration in seconds.

    **Type:** `integer` <br /> Supported range: `4`–`15`, in one-second steps. **Default:** `5`
  </ParamField>

  <ParamField body="web_search" default="false" type="boolean">
    Use online search. Only available for text-to-video.

    **Default:** `false`
  </ParamField>
</ParamField>

## Example Request

```json theme={null}
{
  "model": "bytedance/seedance-2-mini",
  "input": {
    "prompt": "A serene beach at sunset with waves gently crashing on the shore, palm trees swaying in the breeze, and seagulls flying across the orange sky",
    "first_frame_url": "https://demo.com/example2.png",
    "last_frame_url": "https://demo.com/example3.png",
    "reference_image_urls": [
      "https://demo.com/example1.png"
    ],
    "reference_video_urls": [
      "https://demo.com/example1.mp4"
    ],
    "reference_audio_urls": [
      "https://demo.com/example1.mp3"
    ],
    "return_last_frame": false,
    "generate_audio": false,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "duration": 15,
    "web_search": false
  }
}
```

## Response

### Successful Response

<ResponseField name="code" type="number">
  Response status code.
</ResponseField>

<ResponseField name="msg" type="string">
  Response message. Contains the error description when the request fails.

  **Example:** `success`
</ResponseField>

<ResponseField name="data" type="object" required>
  The task data object containing task id.

  <ResponseField name="taskId" type="string" required>
    The unique identifier for this task.

    **Example:** `task_123456`
  </ResponseField>
</ResponseField>

## Query Task Status

After submitting a task, use the unified query endpoint to check the task progress and retrieve the generated results.

<Card title="Get Task Details" icon="search" href="/get-task-detail">
  Check task status, monitor generation progress, and retrieve results.
</Card>

### Error Response

```json theme={null}
{
  "code": 500,
  "msg": "Server Error - An unexpected error occurred while processing the request",
  "data": null
}
```

## Response Codes

|  Code | Meaning                                                                   |
| ----: | ------------------------------------------------------------------------- |
| `200` | Success — the request was successfully processed.                         |
| `401` | Unauthorized — authentication credentials are missing or invalid.         |
| `402` | Insufficient Credits — the account does not have enough credits.          |
| `404` | Not Found — the requested resource or interface does not exist.           |
| `408` | Upstream service issue — no result has been returned for over 10 minutes. |
| `422` | Validation Error — request parameters failed validation.                  |
| `429` | Rate Limited — request frequency limit has been exceeded.                 |
| `433` | Request Limit — sub-key usage exceeded the limit.                         |
| `455` | Service Unavailable — system is undergoing maintenance.                   |
| `500` | Server Error — an unexpected error occurred while processing the request. |
| `501` | Generation Failed — content generation failed.                            |
| `505` | Feature Disabled — the requested feature is disabled.                     |
