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

# Kling Videos



## OpenAPI

````yaml /openapi/kling.json post /kling/videos
openapi: 3.0.0
info:
  title: Kling video generation
  version: 1.0.0
  description: API reference for Kling video generation on Ace Data Cloud.
servers:
  - url: https://api.acedata.cloud
    description: Ace Data Cloud API
security:
  - bearerAuth: []
paths:
  /kling/videos:
    post:
      summary: Kling Videos
      parameters:
        - in: header
          name: accept
          schema:
            enum:
              - application/json
            type: string
          required: false
          description: Kling Videos Param Accept
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - action
              properties:
                mode:
                  enum:
                    - std
                    - pro
                    - 4k
                  type: string
                  description: Kling Videos Mode
                model:
                  enum:
                    - kling-v1
                    - kling-v1-6
                    - kling-v2-master
                    - kling-v2-1-master
                    - kling-v2-5-turbo
                    - kling-v2-6
                    - kling-v3
                    - kling-v3-omni
                    - kling-o1
                  type: string
                  description: Kling Videos Model
                action:
                  enum:
                    - text2video
                    - image2video
                    - extend
                  type: string
                  description: Kling Videos Action
                prompt:
                  type: string
                  example: >-
                    White ceramic coffee mug on glossy marble countertop with
                    morning window light. Camera slowly rotates 360 degrees
                    around the mug, pausing briefly at the handle.
                  description: Kling Videos Prompt
                duration:
                  type: number
                  description: Kling Videos Duration
                generate_audio:
                  type: boolean
                  description: Kling Videos Generate Audio
                video_id:
                  type: string
                  description: Kling Videos Video Id
                cfg_scale:
                  type: number
                  minimum: 0
                  maximum: 1
                  description: Kling Videos Cfg Scale
                aspect_ratio:
                  enum:
                    - '16:9'
                    - '9:16'
                    - '1:1'
                  type: string
                  description: Kling Videos Aspect Ratio
                callback_url:
                  type: string
                  description: Kling Videos Callback Url
                async:
                  type: boolean
                  description: Kling Videos Async
                end_image_url:
                  type: string
                  description: Kling Videos End Image Url
                camera_control:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - simple
                        - down_back
                        - forward_up
                        - left_turn_forward
                        - right_turn_forward
                    config:
                      type: object
                      additionalProperties:
                        type: number
                        minimum: -1
                        maximum: 1
                  description: Kling Videos Camera Control
                image_list:
                  type: array
                  minItems: 1
                  maxItems: 7
                  items:
                    type: object
                    required:
                      - image_url
                    properties:
                      image_url:
                        type: string
                        format: uri
                      type:
                        type: string
                        enum:
                          - first_frame
                          - end_frame
                  description: Kling Videos Image List
                video_list:
                  type: array
                  minItems: 1
                  maxItems: 1
                  items:
                    type: object
                    required:
                      - video_url
                    properties:
                      video_url:
                        type: string
                        format: uri
                      refer_type:
                        type: string
                        enum:
                          - base
                          - feature
                      keep_original_sound:
                        type: string
                        enum:
                          - 'yes'
                          - 'no'
                  description: Kling Videos Video List
                negative_prompt:
                  type: string
                  description: Kling Videos Negative Prompt
                start_image_url:
                  type: string
                  description: Kling Videos Start Image Url
            example:
              action: text2video
              prompt: >-
                White ceramic coffee mug on glossy marble countertop with
                morning window light. Camera slowly rotates 360 degrees around
                the mug, pausing briefly at the handle.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  video_id: '900798310464749610'
                  video_url: >-
                    https://platform2.cdn.acedata.cloud/kling/6c68c267-065b-4423-b66b-a0e4c59ee0d5.mp4
                  duration: '5.041'
                  state: succeed
                  task_id: 6c68c267-065b-4423-b66b-a0e4c59ee0d5
                properties:
                  data:
                    type: object
                    description: Kling Videos Response 200 Data
                  success:
                    type: boolean
                    description: Kling Videos Response 200 Success
          description: Kling Videos Response 200
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: token_mismatched
                        message: The specified token is not matched with API.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: token_mismatched
                            description: Kling Videos Response 400 Error Code
                          message:
                            type: string
                            example: The specified token is not matched with API.
                            description: Kling Videos Response 400 Error Message
                      trace_id:
                        type: string
                        description: Kling Videos Response 400 Trace Id
                  - type: object
                    example:
                      error:
                        code: api_not_implemented
                        message: The API is not implemented.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: api_not_implemented
                            description: Kling Videos Response 400 Error Code 2
                          message:
                            type: string
                            example: The API is not implemented.
                            description: Kling Videos Response 400 Error Message 2
                      trace_id:
                        type: string
                        description: Kling Videos Response 400 Trace Id 2
                  - type: object
                    example:
                      error:
                        code: disabled
                        message: >-
                          Your application has been disabled by Ace Data Cloud
                          due to abnormal usage behavior, please contact our
                          support to get more information.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: disabled
                            description: Kling Videos Response 400 Error Code 3
                          message:
                            type: string
                            example: >-
                              Your application has been disabled by Ace Data
                              Cloud due to abnormal usage behavior, please
                              contact our support to get more information.
                            description: Kling Videos Response 400 Error Message 3
                      trace_id:
                        type: string
                        description: Kling Videos Response 400 Trace Id 3
                  - type: object
                    example:
                      error:
                        code: bad_request
                        message: model is invalid.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: bad_request
                            description: Kling Videos Response 400 Error Code 4
                          message:
                            type: string
                            example: model is invalid.
                            description: Kling Videos Response 400 Error Message 4
                      trace_id:
                        type: string
                        description: Kling Videos Response 400 Trace Id 4
                  - type: object
                    example:
                      error:
                        code: no_token
                        message: No token specified for the request.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: no_token
                            description: Kling Videos Response 400 Error Code 5
                          message:
                            type: string
                            example: No token specified for the request.
                            description: Kling Videos Response 400 Error Message 5
                      trace_id:
                        type: string
                        description: Kling Videos Response 400 Trace Id 5
          description: Kling Videos Response 400
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: invalid_token
                        message: The specified token is invalid or wrong.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: invalid_token
                            description: Kling Videos Response 401 Error Code
                          message:
                            type: string
                            example: The specified token is invalid or wrong.
                            description: Kling Videos Response 401 Error Message
                      trace_id:
                        type: string
                        description: Kling Videos Response 401 Trace Id
                  - type: object
                    example:
                      error:
                        code: token_expired
                        message: token expired.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: token_expired
                            description: Kling Videos Response 401 Error Code 2
                          message:
                            type: string
                            example: token expired.
                            description: Kling Videos Response 401 Error Message 2
                      trace_id:
                        type: string
                        description: Kling Videos Response 401 Trace Id 2
                  - type: object
                    example:
                      error:
                        code: token_mismatched
                        message: token and api does not match.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: token_mismatched
                            description: Kling Videos Response 401 Error Code 3
                          message:
                            type: string
                            example: token and api does not match.
                            description: Kling Videos Response 401 Error Message 3
                      trace_id:
                        type: string
                        description: Kling Videos Response 401 Trace Id 3
          description: Kling Videos Response 401
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: used_up
                        message: >-
                          Your balance is not sufficient for current request,
                          please buy more in Ace Data Cloud.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: used_up
                            description: Kling Videos Response 403 Error Code
                          message:
                            type: string
                            example: >-
                              Your balance is not sufficient for current
                              request, please buy more in Ace Data Cloud.
                            description: Kling Videos Response 403 Error Message
                      trace_id:
                        type: string
                        description: Kling Videos Response 403 Trace Id
          description: Kling Videos Response 403
        '404':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: no_api
                        message: API does not exist, please make sure url is correct.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: no_api
                            description: Kling Videos Response 404 Error Code
                          message:
                            type: string
                            example: >-
                              API does not exist, please make sure url is
                              correct.
                            description: Kling Videos Response 404 Error Message
                      trace_id:
                        type: string
                        description: Kling Videos Response 404 Trace Id
          description: Kling Videos Response 404
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: too_many_requests
                        message: You have exceeded the rate limit.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: too_many_requests
                            description: Kling Videos Response 429 Error Code
                          message:
                            type: string
                            example: You have exceeded the rate limit.
                            description: Kling Videos Response 429 Error Message
                      trace_id:
                        type: string
                        description: Kling Videos Response 429 Trace Id
          description: Kling Videos Response 429
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: api_error
                        message: Internal server error.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: api_error
                            description: Kling Videos Response 500 Error Code
                          message:
                            type: string
                            example: Internal server error.
                            description: Kling Videos Response 500 Error Message
                      trace_id:
                        type: string
                        description: Kling Videos Response 500 Trace Id
          description: Kling Videos Response 500
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API token from https://platform.acedata.cloud

````