openapi: 3.1.0
info:
  title: Seedance 2.0 Fast
  version: '1.0'
  description: Seedance 2.0 Fast video generation model (with or without audio). A lightweight, faster variant of Seedance 2.0 with identical parameters and capabilities.
servers:
- url: https://openapi.imini.ai/imini/router
components:
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: |
        Pass `Authorization: Bearer <YOUR_API_KEY>` in the request header. Go to the [API Keys management page](https://imini.ai/api-keys) to create and manage API Keys.
security:
- ApiKeyAuth: []
paths:
  /v1/videos/generate:
    post:
      summary: Seedance 2.0 Fast
      operationId: generateSeedance20Fast
      security:
      - ApiKeyAuth: []
      description: |
        Submit an asynchronous video generation task. You will need to poll the query endpoint to retrieve the result.

        > Model ID: `doubao/seedance-2.0-fast` · Underlying: Seedance 2.0 Fast

        Capabilities, parameters, and input modes are identical to `doubao/seedance-2.0`, but generation is faster and cheaper — ideal for use cases where inference latency matters.

        **Supported input modes**:
        - **Text-to-video**: pass `prompt` only
        - **Image-to-video (first frame)**: 1 image with `first_frame`
        - **Image-to-video (first + last frame)**: 1 `first_frame` + 1 `last_frame`
        - **Multimodal reference-to-video**: any combination of reference images (1–9 with `reference_type=asset`) + reference videos (0–3 clips) + reference audios (0–3 clips); audio cannot be used alone

        > The three scenarios (first frame / first + last frame / multimodal reference) are **mutually exclusive** and cannot be mixed.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - model
              properties:
                model:
                  type: string
                  description: Fixed value `doubao/seedance-2.0-fast`.
                prompt:
                  type: string
                  description: |
                    The prompt. Supports Chinese, English, Japanese, Indonesian, Spanish, and Portuguese.

                    > We recommend ≤ 500 Chinese characters or ≤ 1000 English words; overly long prompts may cause the model to ignore some details.
                  example: A slow pan across a misty mountain valley at sunrise, cinematic
                resolution:
                  type: string
                  description: Output resolution. Defaults to `720P`.
                  default: 720P
                  enum:
                  - 480P
                  - 720P
                aspect_ratio:
                  type: string
                  description: |
                    Output aspect ratio. Defaults to `adaptive` (auto-adapted by the model based on the input assets or prompt).
                  default: adaptive
                  enum:
                  - '16:9'
                  - '4:3'
                  - '1:1'
                  - '3:4'
                  - '9:16'
                  - '21:9'
                  - adaptive
                duration:
                  type: integer
                  description: Video duration in seconds. Defaults to `5`; integer in the range `4 ~ 15`.
                  default: 5
                  minimum: 4
                  maximum: 15
                generate_audio:
                  type: boolean
                  description: Whether to generate audio in sync with the video. Defaults to `true`. Generated audio is mono.
                  default: true
                reference_images:
                  type: array
                  description: |
                    Reference image list. Up to **9** images. The input mode is determined by the `reference_type` combination:
                    - **Image-to-video (first frame)**: 1 `first_frame`
                    - **Image-to-video (first + last frame)**: 1 `first_frame` + 1 `last_frame`
                    - **Multimodal reference-to-video**: 1–9 with `asset`; may be combined with `reference_videos` / `reference_audios`

                    > Image requirements: formats `jpeg` / `png` / `webp` / `bmp` / `tiff` / `gif`; ≤ 30 MB per image; total request body ≤ 64 MB (avoid base64 for large files); width/height 300–6000 px; aspect ratio between 1:2.5 and 2.5:1.
                  maxItems: 9
                  items:
                    type: object
                    required:
                    - url
                    properties:
                      url:
                        type: string
                        description: |
                          Image address, in one of two forms:
                          **1)** A publicly accessible URL (`http://` or `https://`);
                          **2)** A Data URI base64 encoding (starting with `data:image/`).
                      reference_type:
                        type: string
                        description: |-
                          Reference type:
                          - `asset` — multimodal reference (default)
                          - `first_frame` — first frame
                          - `last_frame` — last frame

                          Omitted, null, empty or unknown strings are treated as asset.
                        default: asset
                        enum:
                        - asset
                        - first_frame
                        - last_frame
                reference_videos:
                  type: array
                  description: |
                    Reference video list. Up to **3** clips; total duration across all videos ≤ 15 seconds; public URL only.

                    > Video requirements: formats `mp4` / `mov`; resolution 480P / 720P; 2–15 seconds per clip, ≤ 50 MB each; width/height 300–6000 px; aspect ratio between 1:2.5 and 2.5:1; pixel-product range [640×640, 834×1112]; FPS 24–60.
                  maxItems: 3
                  items:
                    type: object
                    required:
                    - url
                    properties:
                      url:
                        type: string
                        description: Publicly accessible video URL. base64 is not supported.
                      reference_type:
                        type: string
                        description: |-
                          asset: reference video (default); edit_source: the single editing target, with optional asset images, videos and audios.
                          Omitted, null, empty or unknown strings are treated as asset.
                        default: asset
                        enum:
                        - asset
                        - edit_source
                reference_audios:
                  type: array
                  description: |
                    Reference audio list. Up to **3** clips; total duration across all audios ≤ 15 seconds. **Cannot be used alone** — must be accompanied by at least one `reference_image` or `reference_video`.

                    > Audio requirements: formats `wav` / `mp3`; 2–15 seconds per clip, ≤ 15 MB each; total request body ≤ 64 MB (avoid base64 for large files).
                  maxItems: 3
                  items:
                    type: object
                    required:
                    - url
                    properties:
                      url:
                        type: string
                        description: |
                          Audio address, in one of two forms:
                          **1)** A publicly accessible URL (`http://` or `https://`);
                          **2)** A Data URI base64 encoding (starting with `data:audio/`).
                      reference_type:
                        type: string
                        description: |-
                          asset: reference audio.
                          Omitted, null, empty or unknown strings are treated as asset.
                        default: asset
                        enum:
                        - asset
                extra_params:
                  type: object
                  description: |
                    Supports Seedance's official extension parameters. All optional:
                    - `seed` — integer in `[-1, 2^32-1]`. `-1` or omitted uses a random seed; the same seed yields similar (but not guaranteed identical) outputs.
                    - `watermark` — boolean, defaults to `false`. Whether to add a watermark to the generated video.
                    - `return_last_frame` — boolean, defaults to `false`. When enabled, you can retrieve the generated video's last-frame image (PNG, no watermark, same dimensions as the video) via the query endpoint, useful for chaining multiple continuous video segments.
                  additionalProperties: true
            examples:
              "Text to Video":
                summary: Text to Video
                value:
                  model: doubao/seedance-2.0-fast
                  prompt: A slow pan across a misty mountain valley at sunrise, cinematic
                  resolution: 720P
                  aspect_ratio: 16:9
                  duration: 5
              "Image to Video (first frame)":
                summary: Image to Video - First Frame
                value:
                  model: doubao/seedance-2.0-fast
                  prompt: The mountain comes alive as birds fly past
                  reference_images:
                  - url: https://example.com/first.jpg
                    reference_type: first_frame
                  resolution: 720P
                  aspect_ratio: adaptive
                  duration: 5
              "Multimodal Reference":
                summary: Multimodal Reference (images + video + audio)
                value:
                  model: doubao/seedance-2.0-fast
                  prompt: The apple from [image 1] and the fruit-tea cup from [image 2], with background music
                  reference_images:
                  - url: https://example.com/apple.jpg
                    reference_type: asset
                  - url: https://example.com/cup.jpg
                    reference_type: asset
                  reference_videos:
                  - url: https://example.com/reference.mp4
                    reference_type: asset
                  reference_audios:
                  - url: https://example.com/bgm.mp3
                    reference_type: asset
                  resolution: 720P
                  aspect_ratio: adaptive
                  duration: 6
                  generate_audio: true
                  extra_params:
                    seed: 42
                    watermark: false
      responses:
        '200':
          description: Submitted successfully (asynchronous mode)
          content:
            application/json:
              schema:
                type: object
                properties:
                  task_id:
                    type: string
                    description: Unique task ID, used for subsequent polling
                    example: task_2044275355061448704
                  model:
                    type: string
                    description: The model ID used for this task
                    example: doubao/seedance-2.0-fast
                  created_at:
                    type: string
                    description: Task creation time (ISO 8601)
                    example: '2026-04-15T04:43:20.233Z'
                  request_id:
                    type: string
                    description: Unique request ID
                    example: 67e2e394-cf6f-4998-b293-ebf20d14dc26
        '400':
          description: Validation Error (e.g. invalid parameter, invalid prompt)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Error code
                        example: INVALID_PARAMETER
                      message:
                        type: string
                        description: Error message details
                        example: reference_audios must be accompanied by at least one reference_image or reference_video
                      status:
                        type: integer
                        description: HTTP status code
                        example: 400
                      request_id:
                        type: string
                        description: Unique request identifier
                        example: req_abc123
