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

# Kling 文生视频 查询状态

> 返回已持久化的 Kling 文生视频任务响应。task_id 路径参数为提交端点返回的公开任务 ID。



## OpenAPI

````yaml api-reference/zh-Hans/zmodelVideo/kling/text2video-status.json GET /kling/v1/videos/text2video/{task_id}
openapi: 3.0.1
info:
  title: Kling 文生视频任务 - 查询任务状态
  version: 1.0.0
  description: 通过 `/kling/v1/videos/text2video/{task_id}` 查询 Kling 文生视频任务状态。
servers:
  - url: https://api.powertokens.ai
    description: ''
security: []
tags:
  - name: Kling
    description: Kling 原生异步任务端点
paths:
  /kling/v1/videos/text2video/{task_id}:
    get:
      tags:
        - Kling
      summary: 查询 Kling 文生视频任务状态
      description: 返回已持久化的 Kling 文生视频任务响应。task_id 路径参数为提交端点返回的公开任务 ID。
      operationId: getKlingText2VideoStatus
      parameters:
        - name: Content-Type
          in: header
          required: true
          description: 数据交换格式
          schema:
            type: string
            default: application/json
        - name: task_id
          in: path
          required: true
          description: 文生视频的任务ID。直接在请求路径中填写值，task_id与external_task_id两种查询方式二选一
          schema:
            type: string
      responses:
        '200':
          description: 任务状态响应。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FetchResponse'
              example:
                code: 0
                message: string
                request_id: string
                data:
                  task_id: string
                  task_status: string
                  task_status_msg: string
                  task_info:
                    external_task_id: string
                  task_result:
                    videos:
                      - id: string
                        url: string
                        watermark_url: string
                        duration: string
                  watermark_info:
                    enabled: true
                  final_unit_deduction: string
                  created_at: 1722769557708
                  updated_at: 1722769557708
      security:
        - bearerAuth: []
components:
  schemas:
    FetchResponse:
      type: object
      properties:
        code:
          type: integer
          description: 错误码；具体定义见错误码。
        message:
          type: string
          description: 错误信息。
        request_id:
          type: string
          description: 请求ID，系统生成，用于跟踪请求、排查问题。
        data:
          type: object
          properties:
            task_id:
              type: string
              description: 任务ID，系统生成。
            task_status:
              type: string
              enum:
                - submitted
                - processing
                - succeed
                - failed
              description: 任务状态。枚举值：submitted（已提交）、processing（处理中）、succeed（成功）、failed（失败）。
            task_status_msg:
              type: string
              description: 任务状态信息，当任务失败时展示失败原因（如触发平台的内容风控等）。
            task_info:
              type: object
              description: 任务创建时的参数信息。
              properties:
                external_task_id:
                  type: string
                  description: 客户自定义任务ID。
            task_result:
              type: object
              description: 任务结果。
              properties:
                videos:
                  type: array
                  description: 生成的视频列表。
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: 生成的视频ID；全局唯一。
                      url:
                        type: string
                        description: 生成视频的URL（请注意，为保障信息安全，生成的图片/视频会在30天后被清理，请及时转存）。
                      watermark_url:
                        type: string
                        description: 含水印视频下载URL，防盗链格式。
                      duration:
                        type: string
                        description: 视频总时长，单位s。
            watermark_info:
              type: object
              description: 水印信息。
              properties:
                enabled:
                  type: boolean
                  description: 是否启用水印。
            final_unit_deduction:
              type: string
              description: 任务最终扣减积分数值。
            created_at:
              type: integer
              format: int64
              description: 任务创建时间，Unix时间戳、单位ms。
            updated_at:
              type: integer
              format: int64
              description: 任务更新时间，Unix时间戳、单位ms。
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: '在请求头中传入 `Authorization: Bearer <token>`。'

````