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

# API 2.0 · 按 ID 查询

> 仅查询当前用户创建的 API 2.0 任务

`task_ids` 与 `external_task_ids` 二选一，多个 ID 用英文逗号分隔。`task_ids` 支持上游 `id`、平台 `platform_id`（`video_<ULID>`）及混合输入；`external_task_ids` 仍使用业务外部 ID。每个 `data[]` 项返回与创建时一致的 `platform_id`，保留上游 `id`。新版成功状态为 `succeeded`，任务字段为 `id`、`status`、`outputs`。

游标列表使用平台已保存的任务快照。续页只需上页 `next_cursor`，原时间窗口与筛选条件会保留；需要即时状态时使用按 ID 查询。旧格式游标需重新发起首查询。


## OpenAPI

````yaml GET /kling/tasks
openapi: 3.0.3
info:
  title: Kling API
  version: '2026-09-07'
  description: API 2.0 与 Legacy 分开定义；请求使用 Kapon Token。
servers:
  - url: https://models.kapon.cloud
security:
  - BearerAuth: []
paths:
  /kling/tasks:
    get:
      tags:
        - Kling API 2.0
      summary: Query Kling API 2.0 tasks by ID
      description: 每个 data[] 项保留上游 id 并追加 platform_id；两种任务 ID 均限定当前用户的 API 2.0 任务。
      parameters:
        - description: >-
            Comma-separated upstream IDs or platform_id (video_<ULID>); mixed
            IDs supported
          name: task_ids
          in: query
          schema:
            type: string
        - description: Comma-separated external task IDs
          name: external_task_ids
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/router.swaggerKlingAPI2TasksResponse'
              example:
                code: 0
                message: success
                request_id: request-id
                data:
                  - id: upstream-task-id
                    status: succeeded
                    create_time: 1781080778802
                    update_time: 1781080778802
                    outputs:
                      - type: video
                        id: video-id
                        url: https://example.com/result.mp4
                        duration: '5'
      security:
        - BearerAuth: []
components:
  schemas:
    router.swaggerKlingAPI2TasksResponse:
      type: object
      properties:
        code:
          type: integer
        data:
          type: array
          items:
            $ref: '#/components/schemas/kling.KlingAPI2Task'
        message:
          type: string
        request_id:
          type: string
    kling.KlingAPI2Task:
      type: object
      properties:
        billing:
          type: array
          items:
            type: object
        create_time:
          type: integer
        external_id:
          type: string
        id:
          type: string
        message:
          type: string
        outputs:
          type: array
          items:
            $ref: '#/components/schemas/kling.KlingAPI2Output'
        platform_id:
          description: OneHub 平台任务 ID（video_<ULID>），来自本地任务。
          type: string
        status:
          type: string
          enum:
            - submitted
            - processing
            - succeeded
            - failed
        update_time:
          type: integer
    kling.KlingAPI2Output:
      type: object
      properties:
        duration:
          type: string
        id:
          type: string
        type:
          type: string
        url:
          type: string
        watermark_url:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````