> ## 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兼容格式/创建视频)）。

查询 Kling 图生视频任务的状态和结果。



## OpenAPI

````yaml api-reference/cn/openapi.json GET /kling/v1/videos/image2video/{task_id}
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:
  /kling/v1/videos/image2video/{task_id}:
    get:
      tags:
        - 视频生成Kling格式
      summary: 获取 Kling 图生视频任务状态
      description: >-
        该系列支持OpenAI视频生成格式（详见链接
        [视频生成Sora兼容格式](/api-reference/cn/视频生成sora兼容格式/创建视频)）。


        查询 Kling 图生视频任务的状态和结果。
      operationId: getKlingImage2Video
      parameters:
        - name: task_id
          in: path
          description: 任务 ID
          required: true
          example: task-abc123
          schema:
            type: string
      responses:
        '200':
          description: 成功获取任务状态
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTaskResponse'
          headers: {}
        '404':
          description: 任务不存在
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    VideoTaskResponse:
      type: object
      description: 视频任务状态查询响应
      properties:
        task_id:
          type: string
          description: 任务 ID
          example: abcd1234efgh
        status:
          type: string
          description: 任务状态
          enum:
            - queued
            - in_progress
            - completed
            - failed
          example: completed
        url:
          type: string
          description: 视频资源 URL（成功时）
          example: https://example.com/video.mp4
        format:
          type: string
          description: 视频格式
          example: mp4
        metadata:
          $ref: '#/components/schemas/VideoTaskMetadata'
        error:
          $ref: '#/components/schemas/VideoTaskError'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: 错误信息
            type:
              type: string
              description: 错误类型
            param:
              type: string
              description: 相关参数
              nullable: true
            code:
              type: string
              description: 错误代码
              nullable: true
    VideoTaskMetadata:
      type: object
      description: 视频任务元数据
      properties:
        duration:
          type: number
          description: 实际生成的视频时长
          example: 5
        fps:
          type: integer
          description: 实际帧率
          example: 30
        width:
          type: integer
          description: 实际宽度
          example: 1280
        height:
          type: integer
          description: 实际高度
          example: 720
        seed:
          type: integer
          description: 使用的随机种子
          example: 20231234
    VideoTaskError:
      type: object
      description: 视频任务错误信息
      properties:
        code:
          type: integer
          description: 错误码
        message:
          type: string
          description: 错误信息
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |-
        使用 Bearer Token 认证。
        格式: `Authorization: Bearer sk-xxxxxx`

````