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

# Video generation

> Create an asynchronous video task, poll until it completes, and download the output.

Video is asynchronous. Submit a job, poll until `status` is terminal, then read `outputs[].url`.

1. `POST /v2/videos` — create a task
2. `GET /v2/videos/{id}` — poll status
3. When `status` is `completed`, download `outputs[].url`
4. Optional: `DELETE /v2/videos/{id}` — cancel a running task

Public task IDs look like `gen-...`. Query and cancel stay on the platform that created the task.

## Supported V2 models

All four models use `POST /v2/videos`, with polling and cancellation at `/v2/videos/{id}`. Send the exact model ID below. Fast is the variant sometimes referred to as “Flash”.

| Model | Request `model` | Duration | Resolution | Enabled inputs |
| - | - | - | - | - |
| Seedance 2.0 Mini | `doubao-seedance-2-0-mini-260615` | 4–15 seconds | 480p, 720p | Text, image, video and audio references |
| Seedance 2.0 | `seedance-2.0` | 4–15 seconds | 480p, 720p | Text and images |
| Seedance 2.0 Fast | `doubao-seedance-2-0-fast-260128` | 4–15 seconds | 480p, 720p | Text and images |
| Seedance 2.5 | `doubao-seedance-2-5-260628` | 4–30 seconds | 480p, 720p, 1080p | Text and images |

Defaults are `duration: 5`, `resolution: "480p"`, `aspect_ratio: "16:9"`, and `audio: false`. Standard, Fast and 2.5 accept up to 9 images; video and audio references are not enabled. None of these profiles accepts `provider_options`. These are the capabilities currently exposed by PipeLLM.

## Create a task

<CodeGroup>
  ```bash cURL theme={"dark"}
  curl https://api.pipellm.ai/v2/videos \
    -H "Authorization: Bearer $PIPELLM_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "seedance-2-0-mini",
      "prompt": "A golden retriever running along a wet beach at sunrise",
      "duration": 5,
      "aspect_ratio": "16:9",
      "resolution": "480p",
      "audio": false
    }'
  ```

  ```python Python theme={"dark"}
  import os
  import time
  import requests

  headers = {
      "Authorization": f"Bearer {os.environ['PIPELLM_API_KEY']}",
      "Content-Type": "application/json",
  }

  created = requests.post(
      "https://api.pipellm.ai/v2/videos",
      headers=headers,
      json={
          "model": "seedance-2-0-mini",
          "prompt": "A golden retriever running along a wet beach at sunrise",
          "duration": 5,
          "aspect_ratio": "16:9",
          "resolution": "480p",
          "audio": False,
      },
  )
  created.raise_for_status()
  task = created.json()
  task_id = task["id"]

  while True:
      poll = requests.get(
          f"https://api.pipellm.ai/v2/videos/{task_id}",
          headers=headers,
      )
      poll.raise_for_status()
      task = poll.json()
      status = task["status"]
      print(status, task.get("progress"))
      if status in {"completed", "failed", "cancelled", "expired"}:
          break
      time.sleep(5)

  if task["status"] == "completed":
      print(task["outputs"][0]["url"])
  else:
      print(task.get("error"))
  ```

  ```typescript TypeScript theme={"dark"}
  const headers = {
    Authorization: `Bearer ${process.env.PIPELLM_API_KEY}`,
    "Content-Type": "application/json",
  };

  const created = await fetch("https://api.pipellm.ai/v2/videos", {
    method: "POST",
    headers,
    body: JSON.stringify({
      model: "seedance-2-0-mini",
      prompt: "A golden retriever running along a wet beach at sunrise",
      duration: 5,
      aspect_ratio: "16:9",
      resolution: "480p",
      audio: false,
    }),
  });
  const task = await created.json();
  let current = task;

  while (true) {
    const poll = await fetch(`https://api.pipellm.ai/v2/videos/${current.id}`, {
      headers,
    });
    current = await poll.json();
    console.log(current.status, current.progress);
    if (["completed", "failed", "cancelled", "expired"].includes(current.status)) {
      break;
    }
    await new Promise((resolve) => setTimeout(resolve, 5000));
  }

  if (current.status === "completed") {
    console.log(current.outputs[0].url);
  } else {
    console.error(current.error);
  }
  ```
</CodeGroup>

Create returns the same task envelope as poll. `outputs` is empty until the job completes.

## Seedance 2.0 Mini

| | |
| - | - |
| Public name | `seedance-2-0-mini` |
| Aliases | `seedance-2.0-mini`, `doubao-seedance-2-0-mini-260615` |
| Duration | 4–15 seconds (default `5`) |
| Resolution | `480p`, `720p` (default `480p`) |
| Aspect ratio | default `16:9` |
| Audio | default `false` |
| Image inputs | `type=image_url` and `role=reference_image`, max 9 |
| Video inputs | `type=video_url`, optional `role=reference_video`, max 3 |
| Audio inputs | `type=audio_url`, optional `role=reference_audio`, max 3 |
| Reference video duration | each clip ≤ 15s; combined duration ≤ 15s |

`provider_options` is not supported on this model profile. Unknown JSON fields are rejected.

### Text to video

```json theme={"dark"}
{
  "model": "seedance-2-0-mini",
  "prompt": "A slow pan across a neon-lit alley in the rain",
  "duration": 5,
  "resolution": "480p"
}
```

### Reference images

```json theme={"dark"}
{
  "model": "seedance-2-0-mini",
  "prompt": "The same character walks through a forest",
  "inputs": [
    {
      "type": "image_url",
      "url": "https://example.com/character.png",
      "role": "reference_image"
    }
  ]
}
```

## Statuses

| Status | Meaning |
| - | - |
| `queued` | Accepted and waiting |
| `in_progress` | Generating |
| `completed` | Ready; read `outputs` |
| `failed` | Terminal error; read `error` |
| `cancelled` | Cancelled with `DELETE` |
| `expired` | No longer queryable upstream |

Poll every few seconds. Generation often takes tens of seconds to a few minutes.

## Billing

GET and DELETE do not add charges. Rates are frozen at creation. Mini and standard 2.0 are charged per second after acceptance, with background refunds for failed, cancelled or expired tasks. Fast and 2.5 settle only after completion using actual upstream `completion_tokens`; failed tasks are not charged.

Mini is priced in USD per second:

| Resolution | No video input | With video input |
| - | - | - |
| `480p` | \$0.06 / output second | \$0.0375 / (input + output) second |
| `720p` | \$0.12 / output second | \$0.075 / (input + output) second |

A 4-second `480p` text-to-video job is `$0.24`. Confirm current rates in the [console](https://console.pipellm.ai).

Standard 2.0 retains its existing **`$0.48 / output second`** rate. Fast costs **`$4.080882 / million video tokens`**. Seedance 2.5 costs **`$10.294118 / million video tokens`** at 480p / 720p and **`$11.323529`** at 1080p. These two token rates use **USD 1 = CNY 6.8**. Video tokens are not seconds or text tokens; final charges use actual generation usage.

## API reference

<Columns cols={3}>
  <Card title="Create" href="/api-reference/video/create">
    `POST /v2/videos`
  </Card>

  <Card title="Get" href="/api-reference/video/get">
    `GET /v2/videos/{id}`
  </Card>

  <Card title="Cancel" href="/api-reference/video/cancel">
    `DELETE /v2/videos/{id}`
  </Card>
</Columns>


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