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

# 提交 Seedance 1.5 Pro 任务

> POST Seedance 1.5 Pro 文生视频/图生视频提交，支持音频生成

## 提交任务

`prompt` 和 `type` 必填。`image-to-video` 需要一至两个公网 HTTP(S) 图片 URL，用于首帧或首尾帧控制；`text-to-video` 必须省略 `image_urls`。

```bash theme={null}
curl --fail-with-body --silent --show-error \
  -X POST https://api.wizzx.ai/api/v1/task/submit/seedance-1.5-pro \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  --data '{
    "prompt": "一只猫在弹钢琴，伴随着轻柔的爵士乐",
    "type": "text-to-video",
    "duration": 8,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "generate_audio": true
  }'
```

> [!WARNING]
>
> 当前 HTTP 合同只接受 `4`–`12` 秒和显式 `720p`。模型层虽然计划支持 `duration=-1` 和 `480p`，但公共网关 binding 目前会拒绝这两个值。`generate_audio` 默认 `true`，后端固定使用 24fps。


## OpenAPI

````yaml POST /api/v1/task/submit/seedance-1.5-pro
openapi: 3.0.3
info:
  title: Wizzx AI API
  version: 1.2.0
  description: >-
    Wizzx asynchronous image, video, and audio generation API. Model keys are
    placed in the submit URL. Submit returns a Wizzx task_id; poll that ID
    through /api/v1/task/status. Authentication uses a Wizzx API key in the
    Authorization: Bearer <key> header.
  license:
    name: MIT
    url: https://github.com/tonyljx/documentation/blob/main/LICENSE
servers:
  - url: https://api.wizzx.ai
    description: Production API
security: []
tags:
  - name: Discovery
    description: Public model and pricing discovery.
  - name: Credits
    description: Authenticated credit balance.
  - name: Image generation
    description: Asynchronous image tasks.
  - name: Video generation
    description: Asynchronous video tasks.
  - name: Audio generation
    description: Asynchronous music and audio tasks.
  - name: Tasks
    description: Asynchronous task status.
  - name: Legacy models
    description: >-
      Compatibility-only models hidden from /pricing. Do not select these
      automatically.
paths:
  /api/v1/task/submit/seedance-1.5-pro:
    post:
      tags:
        - Video generation
      summary: Submit Seedance 1.5 Pro task
      description: >-
        Creates one asynchronous paid task. Save data.task_id and poll the
        status endpoint. Do not automatically retry an ambiguous submit.
      operationId: submitSeedance15ProTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Seedance15ProSubmitRequest'
            example:
              prompt: Ocean waves at sunrise
              type: text-to-video
              duration: 5
              resolution: 720p
      responses:
        '200':
          description: Task accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskSubmitResponse'
        '400':
          description: Malformed JSON or binding validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing, invalid, or revoked API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '413':
          description: Request body exceeds the configured limit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Model-specific validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            X-Retry-After:
              description: Retry delay in seconds.
              schema:
                type: integer
                minimum: 0
        '500':
          description: Internal or upstream submission error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service or model temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    Seedance15ProSubmitRequest:
      type: object
      additionalProperties: false
      required:
        - prompt
        - type
      description: >-
        Current HTTP contract: duration is 4-12 seconds and explicit resolution
        is 720p. The model intends to support duration=-1 and 480p, but shared
        gateway binding currently rejects both. image-to-video requires 1-2
        images.
      properties:
        prompt:
          type: string
          minLength: 1
        type:
          type: string
          enum:
            - text-to-video
            - image-to-video
        image_urls:
          type: array
          maxItems: 2
          items:
            type: string
            format: uri
            pattern: ^https?://
            description: Publicly reachable HTTP(S) URL.
        duration:
          type: integer
          minimum: 4
          maximum: 12
          default: 5
        resolution:
          type: string
          enum:
            - 720p
          default: 720p
        aspect_ratio:
          type: string
          enum:
            - '16:9'
            - '4:3'
            - '1:1'
            - '3:4'
            - '9:16'
            - '21:9'
            - adaptive
          default: adaptive
        seed:
          type: integer
          minimum: -1
          maximum: 4294967295
        watermark:
          type: boolean
        camera_fixed:
          type: boolean
        generate_audio:
          type: boolean
          default: true
        return_last_frame:
          type: boolean
          default: false
      allOf:
        - oneOf:
            - properties:
                type:
                  type: string
                  enum:
                    - text-to-video
              not:
                required:
                  - image_urls
                properties:
                  image_urls: {}
            - required:
                - image_urls
              properties:
                type:
                  type: string
                  enum:
                    - image-to-video
                image_urls:
                  type: array
                  minItems: 1
                  maxItems: 2
                  items:
                    type: string
                    format: uri
                    pattern: ^https?://
                    description: Publicly reachable HTTP(S) URL.
    TaskSubmitResponse:
      type: object
      required:
        - code
        - message
        - data
        - request_id
      properties:
        code:
          type: integer
          enum:
            - 0
        message:
          type: string
          example: success
        data:
          $ref: '#/components/schemas/TaskSubmitData'
        request_id:
          type: string
          format: uuid
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
        request_id:
          type: string
          format: uuid
        retry_after:
          type: integer
          format: int64
          minimum: 0
          description: Retry delay in seconds. Present for rate-limit errors.
    TaskSubmitData:
      type: object
      required:
        - task_id
        - model_key
        - credits_deducted
      properties:
        task_id:
          type: string
          format: uuid
          description: Wizzx task ID used for status polling.
        model_key:
          type: string
        action:
          type: string
          description: Music action. Returned only by POST /api/v1/music/{action}.
        credits_deducted:
          type: integer
          minimum: 0
          description: Credits reserved when the task is accepted.
        provider_task_id:
          type: string
          description: Diagnostic field returned only when debug=1.
        provider_key:
          type: string
          description: Diagnostic field returned only when debug=1.
    ErrorDetail:
      type: object
      required:
        - message
        - type
        - param
        - code
      properties:
        message:
          type: string
        type:
          type: string
          enum:
            - invalid_request_error
            - authentication_error
            - insufficient_quota
            - permission_denied
            - not_found_error
            - conflict_error
            - unprocessable_entity_error
            - rate_limit_error
            - server_error
            - service_unavailable
        param:
          type: string
          nullable: true
        code:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Wizzx API key. This is not a JWT.

````

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