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

# Batch Query Kling Tasks

> This series supports OpenAI video generation formats (see the link [Video generation Sora compatible formats](/api-reference/en/video-generation-sora-compatible-format/create-video)).

Use the platform task IDs returned by the create endpoint. task_ids must be 1 to 100 unique comma-separated IDs; only Kling 4.0 tasks belonging to the user associated with the current token can be queried. A 404 is returned for the entire request if any ID does not exist, does not belong to the current user, or is not a Kling 4.0 task. data is always an array, and outputs contains the video URL after completion. external_task_ids and list queries via POST /tasks are not supported.



## OpenAPI

````yaml api-reference/en/openapi.json GET /tasks
openapi: 3.0.0
info:
  title: Overseas Expansion Camp API Reference Documentation
  version: 1.0.0
  description: Public AI Gateway API Reference
servers:
  - url: https://api.aiid.edu.kg
security:
  - BearerAuth: []
tags:
  - name: OpenAI format (Chat)
  - name: OpenAI Format (Responses)
  - name: Gemini Format for Image Generation
  - name: Image generationOpenAI DALL-E format
  - name: List models
  - name: Video generationHappyHorse and Wan
  - name: Video generation Kling format
  - name: Video generation Omni and Veo formats
  - name: Video generation Seedance
  - name: Video generation Sora compatible formats
  - name: Video generation Vidu
  - name: Music generation task format
paths:
  /tasks:
    get:
      tags:
        - Video generation Kling format
      summary: Batch Query Kling Tasks
      description: >-
        This series supports OpenAI video generation formats (see the link
        [Video generation Sora compatible
        formats](/api-reference/en/video-generation-sora-compatible-format/create-video)).


        Use the platform task IDs returned by the create endpoint. task_ids must
        be 1 to 100 unique comma-separated IDs; only Kling 4.0 tasks belonging
        to the user associated with the current token can be queried. A 404 is
        returned for the entire request if any ID does not exist, does not
        belong to the current user, or is not a Kling 4.0 task. data is always
        an array, and outputs contains the video URL after completion.
        external_task_ids and list queries via POST /tasks are not supported.
      operationId: query_kling4_native_tasks
      parameters:
        - name: task_ids
          in: query
          required: true
          schema:
            type: string
            example: task_example_1,task_example_2
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - message
                  - request_id
                  - data
                properties:
                  code:
                    type: integer
                    example: 0
                  message:
                    type: string
                  request_id:
                    type: string
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Task ID on this site. Pass it as-is when querying.
                        status:
                          type: string
                          enum:
                            - submitted
                            - processing
                            - succeeded
                            - failed
                        create_time:
                          type: integer
                          format: int64
                          description: Creation time, in Unix milliseconds.
                        update_time:
                          type: integer
                          format: int64
                          description: Update time, in Unix milliseconds.
                        external_id:
                          type: string
                          maxLength: 0
                        message:
                          type: string
                          description: >-
                            Task status description; if the task fails, this
                            contains the error reason.
                        outputs:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - video
                              id:
                                type: string
                              url:
                                type: string
                                format: uri
                              duration:
                                type: string
                                description: Video duration, in seconds.
              examples:
                success:
                  summary: Success
                  value:
                    code: 0
                    message: SUCCEED
                    request_id: request_example
                    data:
                      - id: task_example
                        status: succeeded
                        create_time: 1792710000000
                        update_time: 1792710000000
                        external_id: ''
                        message: ''
                        outputs:
                          - type: video
                            id: video_example
                            url: https://example.com/result.mp4
                            duration: '10'
        '400':
          description: task_ids are missing or the parameters are invalid.
        '404':
          description: The task does not exist or is inaccessible.
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |-
        Use Bearer Token authentication.
        Format: `Authorization: Bearer sk-xxxxxx`

````

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