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

# Seedance Video Generation

> Video generation API compatible with the official Seedance protocol, supporting text-to-video, image-to-video, reference media, and synchronized audio

This endpoint is fully compatible with the official Seedance protocol, so you can reuse the parameter structure from the official documentation. `model` must be a platform model identifier, which the gateway rewrites to the channel model name after routing. `callback_url` is overridden and injected by the gateway with a signed default callback address.

## Features

* The `content` element list supports five types: text, image, video, audio, and draft task
* Supports first frame / last frame / reference images (1-9 for the 2.0 series) / reference video / reference audio
* Supports synchronized audio via `generate_audio` (Seedance 2.0 series and 1.5 Pro only)
* Supports online/offline inference via `service_tier` and task timeout via `execution_expires_after`
* Supports draft mode `draft` (1.5 Pro only), last frame return `return_last_frame`, and task priority `priority` (2.0 only)
* Supports video editing (2.5 only), edit the visuals or audio of the original video, adding, deleting, or modifying objects in the video, or redrawing or repairing part of the frame.
* Supports Video extension (2.5 only), Extend the original video forward or backward.

## Authentication

Include the `Authorization` header in the format `Bearer YOUR_API_KEY`.

## Supported Video Models

| Model Identifier  | Model Type      | Model Description                                                                                                                             |
| ----------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| seedance-2.5      | Reference Video | seedance 2.5 is a next-generation video creation model with major improvements in long-form storytelling, multimodal referencing, and editing |
| seedance-2.0      | Reference Video | seedance 2.0 core video generation model                                                                                                      |
| seedance-2.0-mini | Reference Video | new generation high-cost-benefit video generation model                                                                                       |
| seedance-2.0-fast | Reference Video | inherited the core functions and advantages of seedance-2.0, faster speed                                                                     |

## Quick example

<CodeGroup>
  ```python Python theme={null}
  import requests

  url = "https://api.haitoken.ai/v1/seedance/video/generations"
  headers = {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json"
  }
  data = {
      "model": "seedance-2.0",
      "content": [
          {"type": "text", "text": "A golden retriever runs along the beach at sunset, camera slowly tracking"},
          {
              "type": "image_url",
              "image_url": {"url": "https://example.com/images/dog.png"},
              "role": "first_frame"
          }
      ],
      "duration": 5,
      "resolution": "720p",
      "ratio": "16:9",
      "generate_audio": True,
      "watermark": False
  }

  response = requests.post(url, json=data, headers=headers)
  print(response.json())
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.haitoken.ai/v1/seedance/video/generations', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      model: 'seedance-2.0',
      content: [
        { type: 'text', text: 'A golden retriever runs along the beach at sunset, camera slowly tracking' },
        {
          type: 'image_url',
          image_url: { url: 'https://example.com/images/dog.png' },
          role: 'first_frame'
        }
      ],
      duration: 5,
      resolution: '720p',
      ratio: '16:9',
      generate_audio: true,
      watermark: false
    })
  });

  const data = await response.json();
  console.log(data);
  ```

  ```curl cURL theme={null}
  curl -X POST 'https://api.haitoken.ai/v1/seedance/video/generations' \
    -H 'Authorization: Bearer YOUR_API_KEY' \
    -H 'Content-Type: application/json' \
    -d '{
      "model": "seedance-2.0",
      "content": [
        {"type": "text", "text": "A golden retriever runs along the beach at sunset, camera slowly tracking"},
        {
          "type": "image_url",
          "image_url": {"url": "https://example.com/images/dog.png"},
          "role": "first_frame"
        }
      ],
      "duration": 5,
      "resolution": "720p",
      "ratio": "16:9",
      "generate_audio": true,
      "watermark": false
    }'
  ```
</CodeGroup>

A successful creation returns the task ID:

```json theme={null}
{
  "id": "cgt-20260730120000-a1b2c3"
}
```

## Next steps

* See [Query Seedance video task](/docs/en/api-reference/video/seedance-status) to retrieve generation results
* See [Video generation](/docs/en/api-reference/video/generation) for the unified protocol
* See the [Wan protocol](/docs/en/api-reference/video/wan) for native Alibaba Wan parameters
* See the [model list](/docs/en/api-reference/models/list-models) for available video models


## OpenAPI

````yaml en/api-reference/video/seedance/openapi.json POST /v1/seedance/video/generations
openapi: 3.0.1
info:
  title: Default Module
  description: ''
  version: 1.0.0
servers: []
security: []
tags: []
paths:
  /v1/seedance/video/generations:
    post:
      tags: []
      summary: Create video generation task (seedance compatible protocol)
      description: >-
        <p>

        Body is identical to the official seedance API; model must be a platform
        model identifier (rewritten to the channel model name after routing),

        callback_url is overridden and injected by the gateway (with signature).
      parameters:
        - name: Authorization
          in: header
          description: API Key token (Bearer sk-xxx)
          required: true
          example: 'Bearer '
          schema:
            type: string
        - name: Content-Type
          in: header
          description: ''
          example: application/json
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SeedanceCreateTaskRequest'
              description: ''
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SeedanceCreateTaskResponse'
          headers: {}
      deprecated: false
      security: []
components:
  schemas:
    SeedanceCreateTaskRequest:
      type: object
      properties:
        callback_url:
          type: string
          description: >-
            Result callback URL (the upstream POSTs notifications on task status
            changes; when the gateway has a callback configured, it overrides
            and injects a signed default address)
        return_last_frame:
          type: boolean
          description: >-
            Whether to return the last frame image of the generated video (PNG,
            same resolution as the video, no watermark), default false;

            can be used as the first frame of the next task to quickly generate
            multiple consecutive video segments
        service_tier:
          type: string
          description: >-
            Service tier: default online inference (default) / flex offline
            inference (50% of the online price);

            the Seedance 2.0 series only supports online inference and does not
            support this parameter
        execution_expires_after:
          type: integer
          description: >-
            Task timeout threshold (seconds), counted from created_at, range
            [3600, 259200], default 172800 (48 hours);

            the task is automatically terminated and marked as expired after
            timeout
        camera_fixed:
          type: boolean
          description: >-
            Whether to fix the camera, default false; not supported in reference
            image scenarios and the Seedance 2.0 series
        generate_audio:
          type: boolean
          description: >-
            Whether to generate audio synchronized with the visuals (voice/sound
            effects/background music), default true;

            only supported by the Seedance 2.0 series and 1.5 Pro
        safety_identifier:
          type: string
          description: >-
            Unique end-user identifier (for platform security audit, English
            only, max 64 characters;

            it is recommended to pass a hash of the username/user ID/email to
            avoid leaking privacy)
        model:
          type: string
          description: >-
            Platform model identifier (e.g. seedance-2.0), rewritten to the
            channel model name by the gateway after routing
        content:
          type: array
          items:
            $ref: '#/components/schemas/ContentItem'
            description: Content element
          description: >-
            Content element list (text prompt / image / video / audio / draft
            task ID)
        resolution:
          type: string
          description: >-
            Generated video resolution: 480p / 720p / 1080p / 4k;

            the Seedance 2.0 series and 1.5 Pro default to 720p, 1.0 Pro / Pro
            Fast default to 1080p;

            1080p is not supported by 2.0 Fast / 2.0 Mini, 4k is only supported
            by Seedance 2.0
        ratio:
          type: string
          description: >-
            Generated video aspect ratio: 16:9 / 4:3 / 1:1 / 3:4 / 9:16 / 21:9 /
            adaptive (intelligently selected based on the input)
        duration:
          type: integer
          description: >-
            Generated video duration (integer seconds); choose either duration
            or frames, frames takes precedence, default 5;

            Seedance 1.0 Pro / Pro Fast: [2, 12]; 1.5 Pro: [4, 12] or -1 (model
            intelligently selects the duration);

            Seedance 2.0 series: [4, 15] or -1
        frames:
          type: integer
          description: >-
            Generated video frame count (choose either duration or frames,
            frames takes precedence), used to generate fractional-second
            durations;

            only supported by Seedance 1.0 Pro / Pro Fast (not supported by the
            2.0 series and 1.5 Pro),

            range [29, 289] and must satisfy 25 + 4n (frame rate 24, frames =
            seconds x 24)
        seed:
          type: integer
          description: >-
            Random seed, range [-1, 2^32-1], default -1 (random); not supported
            by the Seedance 2.0 series
          format: int64
        watermark:
          type: boolean
          description: >-
            Whether the generated video carries an "AI Generated" watermark,
            default false
        draft:
          type: boolean
          description: >-
            Whether to enable draft mode (480p preview video at a lower cost for
            quick validation), default false;

            only supported by Seedance 1.5 Pro; draft mode does not support last
            frame return or offline inference
        priority:
          type: integer
          description: >-
            Task execution priority 0-9, higher values queue earlier, default 0;

            only supported by Seedance 2.0, only affects the queue order of the
            same Endpoint, not supported for offline inference (flex)
      required:
        - model
    SeedanceCreateTaskResponse:
      type: object
      properties:
        id:
          type: string
          description: Task ID
    ContentItem:
      type: object
      properties:
        image_url:
          $ref: '#/components/schemas/MediaRef'
          description: >-
            Image input (type=image_url, url supports public URL / base64 data
            URI / asset://<ASSET_ID>)
        video_url:
          $ref: '#/components/schemas/MediaRef'
          description: >-
            Video input (type=video_url, only supported by the Seedance 2.0
            series; url supports public URL / asset://<ASSET_ID>)
        audio_url:
          $ref: '#/components/schemas/MediaRef'
          description: >-
            Audio input (type=audio_url, only supported by the Seedance 2.0
            series; audio cannot be provided alone,

            at least 1 reference video or image is required)
        draft_task:
          $ref: '#/components/schemas/DraftTaskRef'
          description: >-
            Draft task input (type=draft_task, only supported by Seedance 1.5
            Pro;

            reuses the draft task's inputs to generate the final video)
        type:
          type: string
          description: 'Element type: text / image_url / video_url / audio_url / draft_task'
        text:
          type: string
          description: Text prompt (type=text, recommended within 1000 words)
        role:
          type: string
          description: >-
            Position/purpose of the media element (conditionally required):
            first_frame / last_frame /

            reference_image (1-9 images for the 2.0 series) / reference_video /
            reference_audio
      required:
        - type
    MediaRef:
      type: object
      properties:
        url:
          type: string
          description: >-
            Public media URL / base64 data URI (base64 is stored to OBS by the
            gateway and replaced) / asset://<ASSET_ID>
      required:
        - url
    DraftTaskRef:
      type: object
      properties:
        id:
          type: string
          description: >-
            Draft task ID (ModelArk automatically reuses the draft task's model
            / text / image_url /

            generate_audio / seed / ratio / duration / camera_fixed inputs to
            generate the final video)
      required:
        - id

````