> ## 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.

# 提交 Kling v3 Omni 任务

> POST Kling v3 Omni 文生、首尾帧或多参考图视频任务

## 提交任务

`prompt` 与 `type` 必填。`image-to-video` 传 1–2 个公网 HTTP(S) 图片 URL（首帧、尾帧）；`reference-to-video` 传 1–7 张参考图，提示词中可用 `<<<image_1>>>` … `<<<image_N>>>` 引用；`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/kling-v3-omni \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  --data '{
    "prompt": "<<<image_1>>> 中的角色走进 <<<image_2>>> 中的场景",
    "type": "reference-to-video",
    "image_urls": [
      "https://example.com/character.jpg",
      "https://example.com/scene.jpg"
    ],
    "resolution": "720p",
    "duration": 5
  }'
```

网关按秒计费：720p = 130（有声 173）、1080p = 173（有声 216）积分/秒，参考图不另收费。具体积分以 `/pricing` 为准。


## OpenAPI

````yaml POST /api/v1/task/submit/kling-v3-omni
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/kling-v3-omni:
    post:
      tags:
        - Video generation
      summary: Submit Kling v3 Omni task
      description: >-
        Creates one asynchronous paid task. Save data.task_id and poll the
        status endpoint. Do not automatically retry an ambiguous submit.
      operationId: submitKlingV3OmniTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KlingV3OmniSubmitRequest'
            example:
              prompt: >-
                The character in <<<image_1>>> walks into the scene in
                <<<image_2>>>
              type: reference-to-video
              image_urls:
                - https://example.com/character.jpg
                - https://example.com/scene.jpg
              duration: 5
      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:
    KlingV3OmniSubmitRequest:
      type: object
      additionalProperties: false
      required:
        - prompt
        - type
      description: >-
        text-to-video must omit image_urls; image-to-video takes 1-2 frames
        (first, last); reference-to-video takes 1-7 reference images that the
        prompt can cite as <<<image_1>>> ... <<<image_N>>>. Reference images are
        not billed.
      properties:
        prompt:
          type: string
          minLength: 1
          maxLength: 2500
          description: Required prompt, at most 2500 Unicode characters.
        image_urls:
          type: array
          maxItems: 7
          items:
            type: string
            format: uri
            pattern: ^https?://
            description: Publicly reachable HTTP(S) URL.
        resolution:
          type: string
          enum:
            - 720p
            - 1080p
          default: 720p
          description: 720p (standard) or 1080p (professional). 4K is not offered.
        duration:
          type: integer
          minimum: 3
          maximum: 15
          default: 5
        aspect_ratio:
          type: string
          enum:
            - '16:9'
            - '9:16'
            - '1:1'
          description: >-
            Defaults to 16:9. In image-to-video the first frame's ratio may take
            precedence.
        generate_audio:
          type: boolean
          default: false
          description: Generate native audio. Audio selects a higher per-second rate.
        negative_prompt:
          type: string
          maxLength: 2500
        type:
          type: string
          enum:
            - text-to-video
            - image-to-video
            - reference-to-video
      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.
            - required:
                - image_urls
              properties:
                type:
                  type: string
                  enum:
                    - reference-to-video
                image_urls:
                  type: array
                  minItems: 1
                  maxItems: 7
                  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
        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.

````