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

# Lấy trạng thái tác vụ tạo video từ ảnh Kling

> Dòng này hỗ trợ định dạng tạo video OpenAI (xem chi tiết tại liên kết [Định dạng tương thích với Sora tạo video](/api-reference/vi/tao-video-dinh-dang-tuong-thich-sora/tao-video)).

Truy vấn trạng thái và kết quả của tác vụ tạo video từ ảnh Kling.



## OpenAPI

````yaml api-reference/vi/openapi.json GET /kling/v1/videos/image2video/{task_id}
openapi: 3.0.0
info:
  title: Tài liệu tham khảo API của 出海营
  version: 1.0.0
  description: Public AI Gateway API Reference
servers:
  - url: https://api.aiid.edu.kg
security:
  - BearerAuth: []
tags:
  - name: Định dạng OpenAI (Chat)
  - name: Định dạng OpenAI (Responses)
  - name: Định dạng Gemini cho tạo ảnh
  - name: Tạo hình ảnhOpenAI định dạng DALL-E
  - name: Lấy danh sách mô hình
  - name: Tạo video HappyHorse và Wan
  - name: Định dạngKling tạo video
  - name: Định dạng Video Generation Omni và Veo
  - name: Tạo video Seedance
  - name: Định dạng tương thích Sora cho tạo video
  - name: Tạo video Vidu
  - name: Định dạng tác vụ tạo nhạc
paths:
  /kling/v1/videos/image2video/{task_id}:
    get:
      tags:
        - Định dạngKling tạo video
      summary: Lấy trạng thái tác vụ tạo video từ ảnh Kling
      description: >-
        Dòng này hỗ trợ định dạng tạo video OpenAI (xem chi tiết tại liên kết
        [Định dạng tương thích với Sora tạo
        video](/api-reference/vi/tao-video-dinh-dang-tuong-thich-sora/tao-video)).


        Truy vấn trạng thái và kết quả của tác vụ tạo video từ ảnh Kling.
      operationId: getKlingImage2Video
      parameters:
        - name: task_id
          in: path
          description: ID nhiệm vụ
          required: true
          example: task-abc123
          schema:
            type: string
      responses:
        '200':
          description: Lấy trạng thái nhiệm vụ thành công
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTaskResponse'
          headers: {}
        '404':
          description: Nhiệm vụ không tồn tại
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    VideoTaskResponse:
      type: object
      description: Phản hồi truy vấn trạng thái tác vụ video
      properties:
        task_id:
          type: string
          description: ID nhiệm vụ
          example: abcd1234efgh
        status:
          type: string
          description: Trạng thái nhiệm vụ
          enum:
            - queued
            - in_progress
            - completed
            - failed
          example: completed
        url:
          type: string
          description: URL tài nguyên video (khi thành công)
          example: https://example.com/video.mp4
        format:
          type: string
          description: Định dạng video
          example: mp4
        metadata:
          $ref: '#/components/schemas/VideoTaskMetadata'
        error:
          $ref: '#/components/schemas/VideoTaskError'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: Thông báo lỗi
            type:
              type: string
              description: Loại lỗi
            param:
              type: string
              description: Các tham số liên quan
              nullable: true
            code:
              type: string
              description: Mã lỗi
              nullable: true
    VideoTaskMetadata:
      type: object
      description: Metadata của tác vụ video
      properties:
        duration:
          type: number
          description: Thời lượng video thực tế được tạo
          example: 5
        fps:
          type: integer
          description: Tốc độ khung hình thực tế
          example: 30
        width:
          type: integer
          description: Chiều rộng thực tế
          example: 1280
        height:
          type: integer
          description: Chiều cao thực tế
          example: 720
        seed:
          type: integer
          description: Seed ngẫu nhiên được sử dụng
          example: 20231234
    VideoTaskError:
      type: object
      description: Thông báo lỗi tác vụ video
      properties:
        code:
          type: integer
          description: Mã lỗi
        message:
          type: string
          description: Thông báo lỗi
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |-
        Sử dụng xác thực Bearer Token.
        Định dạng: `Authorization: Bearer sk-xxxxxx`

````