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

# Create a Seedance video

> Create a Seedance video task on CometAPI. The size field accepts exact WxH values and ratio preset labels. Use the documented Seedance resolution table for predictable results.

<Info>
  The `size` field accepts exact `WxH` values and ratio preset labels. Ratio preset labels map to the model-specific default `WxH` values in the table below. If you need a specific `720p` or `1080p` output, pass the exact `WxH` value instead of only a ratio preset. Exact `WxH` support remains model-dependent, so use a documented size entry for the target model when the rendered resolution must stay fixed.
</Info>

## Size support by model

The table below follows the official Seedance resolution mapping and keeps the published size values in one place.

For `1080p`, the rightmost column lists the documented `Seedance 1.5 Pro` and `Seedance 2.0` values. `Seedance 2.0 Fast` is not listed in that official `1080p` table.

| Resolution | Aspect ratio | Pixel values for Seedance 1.0 series | Pixel values for Seedance 1.5 Pro / Seedance 2.0 / Seedance 2.0 Fast |
| ---------- | ------------ | ------------------------------------ | -------------------------------------------------------------------- |
| `480p`     | `16:9`       | `864×480`                            | `864×496`                                                            |
|            | `4:3`        | `736×544`                            | `752×560`                                                            |
|            | `1:1`        | `640×640`                            | `640×640`                                                            |
|            | `3:4`        | `544×736`                            | `560×752`                                                            |
|            | `9:16`       | `480×864`                            | `496×864`                                                            |
|            | `21:9`       | `960×416`                            | `992×432`                                                            |
| `720p`     | `16:9`       | `1248×704`                           | `1280×720`                                                           |
|            | `4:3`        | `1120×832`                           | `1112×834`                                                           |
|            | `1:1`        | `960×960`                            | `960×960`                                                            |
|            | `3:4`        | `832×1120`                           | `834×1112`                                                           |
|            | `9:16`       | `704×1248`                           | `720×1280`                                                           |
|            | `21:9`       | `1504×640`                           | `1470×630`                                                           |
| `1080p`    | `16:9`       | `1920×1088`                          | `1920×1080`                                                          |
|            | `4:3`        | `1664×1248`                          | `1664×1248`                                                          |
|            | `1:1`        | `1440×1440`                          | `1440×1440`                                                          |
|            | `3:4`        | `1248×1664`                          | `1248×1664`                                                          |
|            | `9:16`       | `1088×1920`                          | `1080×1920`                                                          |
|            | `21:9`       | `2176×928`                           | `2206×946`                                                           |

## How ratio presets differ from exact WxH

Use a ratio preset when the model-specific default output size is acceptable. For the `doubao-seedance-1-5-pro` family, ratio-only requests use the `720p` row from the table above:

| Ratio preset | Default rendered size |
| ------------ | --------------------- |
| `16:9`       | `1280x720`            |
| `4:3`        | `1112x834`            |
| `1:1`        | `960x960`             |
| `3:4`        | `834x1112`            |
| `9:16`       | `720x1280`            |
| `21:9`       | `1470x630`            |

Use exact `WxH` when the rendered resolution must stay fixed. For example, `doubao-seedance-1-5-pro` can render `1920x1080` and `1080x1920` as requested. Exact `WxH` remains model-dependent. `doubao-seedance-2-0` can accept `1920x1080` and still render `1280x720`.


## OpenAPI

````yaml /api/openapi/video/seedance/post-seedance-create.openapi.json POST /v1/videos
openapi: 3.1.0
info:
  title: Seedance Video Generation API
  version: 1.0.0
  description: >-
    Create an asynchronous ByteDance Seedance video task through CometAPI. Set
    size to either an exact WxH value such as 1280x720 or a ratio preset label
    such as 16:9, 4:3, 1:1, 3:4, 9:16, or 21:9. Ratio preset labels map to
    model-specific default render sizes. If you need a fixed 720p or 1080p
    output, pass the exact WxH value instead of only a ratio preset. Exact WxH
    support remains model-dependent. For example, doubao-seedance-1-5-pro can
    render 1920x1080 as requested, while doubao-seedance-2-0 can accept
    1920x1080 and still render 1280x720. Save the returned id and poll GET
    /v1/videos/{id} until the status reaches completed.
servers:
  - url: https://api.cometapi.com
security:
  - bearerAuth: []
paths:
  /v1/videos:
    post:
      summary: Create a Seedance video task
      description: >-
        Submit a text-to-video or image-to-video job for any Seedance model
        family. The request body is multipart/form-data so that the optional
        input_reference image can be uploaded in the same call. Set size to
        either a ratio preset label or an exact WxH value. Ratio preset labels
        map to model-specific default render sizes. If you need a fixed 720p or
        1080p output, pass the exact WxH value instead of only a ratio preset.
        Exact WxH support remains model-dependent. For example,
        doubao-seedance-1-5-pro can render 1920x1080 as requested, while
        doubao-seedance-2-0 can accept 1920x1080 and still render 1280x720.
        Ratio-label support differs by model: doubao-seedance-1-0-pro and
        doubao-seedance-1-5-pro support 16:9, 4:3, 1:1, 3:4, 9:16, and 21:9;
        doubao-seedance-2-0 supports 16:9, 4:3, 1:1, 3:4, and 21:9;
        doubao-seedance-2-0-fast supports 4:3, 3:4, 9:16, and 21:9.
        Image-to-video is supported only by the Seedance 2.0 models
        (doubao-seedance-2-0, doubao-seedance-2-0-fast); the 1.0 Pro and 1.5 Pro
        models accept text prompts only. The endpoint returns immediately with a
        task id; use GET /v1/videos/{id} to read the final result.
      operationId: seedance_create_video
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - prompt
                - model
              properties:
                prompt:
                  type: string
                  description: Text prompt that describes the video. Required.
                  example: >-
                    A slow cinematic camera push across a coastal landscape at
                    sunrise.
                model:
                  type: string
                  description: >-
                    Seedance model id. Only the two 2.0 models accept
                    input_reference.
                  enum:
                    - doubao-seedance-2-0
                    - doubao-seedance-2-0-fast
                    - doubao-seedance-1-5-pro
                    - doubao-seedance-1-0-pro
                  example: doubao-seedance-2-0
                seconds:
                  type: integer
                  description: >-
                    Video duration in seconds. The accepted range depends on the
                    model: doubao-seedance-2-0 and doubao-seedance-2-0-fast
                    accept 4 to 15, doubao-seedance-1-5-pro accepts 4 to 12, and
                    doubao-seedance-1-0-pro accepts 2 to 10. The default is 5
                    for every model.
                  minimum: 2
                  maximum: 15
                  default: 5
                  example: 5
                size:
                  type: string
                  description: >-
                    Output size. Use either a ratio preset label such as 16:9,
                    4:3, 1:1, 3:4, 9:16, or 21:9, or an exact WxH value such as
                    1280x720. Ratio preset labels map to model-specific default
                    render sizes. If you need a fixed 720p or 1080p output, pass
                    the exact WxH value instead of only a ratio preset. Exact
                    WxH support remains model-dependent, and an undocumented or
                    unsupported raw WxH value can normalize to another size or
                    fail.
                  pattern: ^(16:9|4:3|1:1|3:4|9:16|21:9|[1-9]\d{2,3}x[1-9]\d{2,3})$
                  examples:
                    - '16:9'
                    - 1280x720
                    - 1920x1080
                    - '4:3'
                    - 1112x834
                    - '1:1'
                    - 960x960
                    - '3:4'
                    - 834x1112
                    - '9:16'
                    - 720x1280
                    - 1080x1920
                    - '21:9'
                    - 1470x630
                  example: 1280x720
                input_reference:
                  type: string
                  format: binary
                  description: >-
                    Optional reference image. When included, the job runs in
                    image-to-video mode and uses the image as the visual anchor.
                    Only doubao-seedance-2-0 and doubao-seedance-2-0-fast accept
                    this field; sending it with a 1.0 Pro or 1.5 Pro model
                    returns HTTP 400.
            encoding:
              input_reference:
                contentType: image/jpeg, image/png, image/webp
      responses:
        '200':
          description: Task created. Save the returned id and poll GET /v1/videos/{id}.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateVideoResponse'
              example:
                id: task_abc123
                task_id: task_abc123
                object: video
                model: doubao-seedance-2-0
                status: queued
                progress: 0
                created_at: 1776681149
        '400':
          description: >-
            The request is missing a required field or contains an out-of-range
            value.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                missing_prompt:
                  summary: prompt field missing
                  value:
                    code: invalid_request
                    message: prompt is required
                missing_model:
                  summary: model field missing
                  value:
                    error:
                      code: ''
                      message: model name is required
                      type: comet_api_error
                invalid_duration:
                  summary: seconds outside the per-model range
                  value:
                    code: InvalidParameter
                    message: >-
                      the parameter duration specified in the request is not
                      valid
                i2v_not_supported:
                  summary: input_reference sent with a 1.0 Pro or 1.5 Pro model
                  value:
                    code: InvalidParameter
                    message: >-
                      The parameter task_type specified in the request is not
                      valid: the specified task_type r2v does not support model
                      seedance-1-5-pro
        '401':
          description: The API key is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_token:
                  summary: Bearer token rejected
                  value:
                    error:
                      code: ''
                      message: invalid token
                      type: comet_api_error
      x-codeSamples:
        - lang: Shell
          label: Text-to-video (Seedance 2.0, ratio 16:9)
          source: |-
            curl https://api.cometapi.com/v1/videos \
              -H "Authorization: Bearer <COMETAPI_KEY>" \
              -F 'prompt="A slow cinematic camera push across a coastal landscape at sunrise"' \
              -F 'model="doubao-seedance-2-0"' \
              -F 'seconds="4"' \
              -F 'size="16:9"'
        - lang: Shell
          label: Text-to-video (Seedance 1.5 Pro, exact 1920x1080)
          source: |-
            curl https://api.cometapi.com/v1/videos \
              -H "Authorization: Bearer <COMETAPI_KEY>" \
              -F 'prompt="A slow cinematic camera push across a coastal landscape at sunrise"' \
              -F 'model="doubao-seedance-1-5-pro"' \
              -F 'seconds="4"' \
              -F 'size="1920x1080"'
        - lang: Python
          label: Text-to-video (Seedance 2.0, ratio 16:9)
          source: |
            import requests

            response = requests.post(
                "https://api.cometapi.com/v1/videos",
                headers={"Authorization": "Bearer <COMETAPI_KEY>"},
                data={
                    "prompt": "A slow cinematic camera push across a coastal landscape at sunrise",
                    "model": "doubao-seedance-2-0",
                    "seconds": "4",
                    "size": "16:9",
                },
                timeout=30,
            )

            response.raise_for_status()
            print(response.json())
        - lang: Python
          label: Text-to-video (Seedance 2.0, request 1920x1080)
          source: |
            import requests

            response = requests.post(
                "https://api.cometapi.com/v1/videos",
                headers={"Authorization": "Bearer <COMETAPI_KEY>"},
                data={
                    "prompt": "A slow cinematic camera push across a coastal landscape at sunrise",
                    "model": "doubao-seedance-2-0",
                    "seconds": "4",
                    "size": "1920x1080",
                },
                timeout=30,
            )

            response.raise_for_status()
            print(response.json())
        - lang: JavaScript
          label: Text-to-video (Seedance 2.0, ratio 16:9)
          source: >
            const form = new FormData();

            form.append("prompt", "A slow cinematic camera push across a coastal
            landscape at sunrise");

            form.append("model", "doubao-seedance-2-0");

            form.append("seconds", "4");

            form.append("size", "16:9");


            const response = await fetch("https://api.cometapi.com/v1/videos", {
              method: "POST",
              headers: { Authorization: "Bearer <COMETAPI_KEY>" },
              body: form,
            });


            const result = await response.json();

            console.log(result);
        - lang: JavaScript
          label: Text-to-video (Seedance 1.5 Pro, exact 1920x1080)
          source: >
            const form = new FormData();

            form.append("prompt", "A slow cinematic camera push across a coastal
            landscape at sunrise");

            form.append("model", "doubao-seedance-1-5-pro");

            form.append("seconds", "4");

            form.append("size", "1920x1080");


            const response = await fetch("https://api.cometapi.com/v1/videos", {
              method: "POST",
              headers: { Authorization: "Bearer <COMETAPI_KEY>" },
              body: form,
            });


            const result = await response.json();

            console.log(result);
components:
  schemas:
    CreateVideoResponse:
      type: object
      required:
        - id
        - object
        - model
        - status
        - progress
        - created_at
      properties:
        id:
          type: string
          description: Task id. Use it as the path parameter for GET /v1/videos/{id}.
        task_id:
          type: string
          description: Alias of id returned for compatibility. The value matches id.
        object:
          type: string
          description: Object type, always video.
        model:
          type: string
          description: Echo of the requested model id.
        status:
          type: string
          description: Initial task status. Newly created tasks are returned as queued.
          enum:
            - queued
            - in_progress
            - completed
            - failed
            - error
        progress:
          type: integer
          minimum: 0
          maximum: 100
          description: Completion percentage. 0 at creation.
        created_at:
          type: integer
          description: Task creation time as a Unix timestamp in seconds.
      additionalProperties: true
    ErrorResponse:
      description: >-
        Error body. The endpoint returns one of two shapes depending on where
        the validation fails.
      oneOf:
        - type: object
          properties:
            code:
              type:
                - string
                - 'null'
              description: Short error code such as invalid_request or InvalidParameter.
            message:
              type: string
              description: Human-readable error message.
          required:
            - message
          additionalProperties: true
        - type: object
          properties:
            error:
              type: object
              properties:
                code:
                  type:
                    - string
                    - 'null'
                message:
                  type: string
                type:
                  type: string
                  description: Error category, for example comet_api_error.
              required:
                - message
                - type
              additionalProperties: true
          required:
            - error
          additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication. Use your CometAPI key.

````