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

# 批量查询 Kling 任务

> 该系列支持OpenAI视频生成格式（详见链接 [视频生成Sora兼容格式](/api-reference/cn/视频生成sora兼容格式/创建视频)）。

使用创建接口返回的本站任务ID。task_ids为逗号分隔的1至100个唯一ID；只查询当前令牌所属用户的Kling 4.0任务。任意ID不存在、不属于当前用户或不是Kling 4.0任务时整体返回404。data始终为数组，完成后的outputs包含视频URL。不支持external_task_ids或POST /tasks列表查询。



## OpenAPI

````yaml api-reference/cn/openapi.json GET /tasks
openapi: 3.0.0
info:
  title: 出海营 API 参考文档
  version: 1.0.0
  description: Public AI Gateway API Reference
servers:
  - url: https://api.aiid.edu.kg
security:
  - BearerAuth: []
tags:
  - name: OpenAI格式(Chat)
  - name: OpenAI格式(Responses)
  - name: 图片生成Gemini格式
  - name: 图片生成OpenAI DALL-E格式
  - name: 获取模型列表
  - name: 视频生成HappyHorse与Wan
  - name: 视频生成Kling格式
  - name: 视频生成Omni与Veo格式
  - name: 视频生成Seedance格式
  - name: 视频生成Sora兼容格式
  - name: 视频生成Vidu格式
  - name: 音乐生成任务格式
paths:
  /tasks:
    get:
      tags:
        - 视频生成Kling格式
      summary: 批量查询 Kling 任务
      description: >-
        该系列支持OpenAI视频生成格式（详见链接
        [视频生成Sora兼容格式](/api-reference/cn/视频生成sora兼容格式/创建视频)）。


        使用创建接口返回的本站任务ID。task_ids为逗号分隔的1至100个唯一ID；只查询当前令牌所属用户的Kling
        4.0任务。任意ID不存在、不属于当前用户或不是Kling
        4.0任务时整体返回404。data始终为数组，完成后的outputs包含视频URL。不支持external_task_ids或POST
        /tasks列表查询。
      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: 成功
          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: 本站任务ID，查询时原样传入。
                        status:
                          type: string
                          enum:
                            - submitted
                            - processing
                            - succeeded
                            - failed
                        create_time:
                          type: integer
                          format: int64
                          description: 创建时间，Unix毫秒。
                        update_time:
                          type: integer
                          format: int64
                          description: 更新时间，Unix毫秒。
                        external_id:
                          type: string
                          maxLength: 0
                        message:
                          type: string
                          description: 任务状态说明，失败时为错误原因。
                        outputs:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - video
                              id:
                                type: string
                              url:
                                type: string
                                format: uri
                              duration:
                                type: string
                                description: 视频时长，秒。
              examples:
                success:
                  summary: 成功
                  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缺失或参数无效。
        '404':
          description: 任务不存在或不可访问。
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |-
        使用 Bearer Token 认证。
        格式: `Authorization: Bearer sk-xxxxxx`

````

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