# "Tác vụ truy vấn (đơn lẻ)"

Nguồn: https://docs.openaihub.net/api-45208992/

> API origin: `https://api.openaihub.net`. Chọn đúng nhóm API và model. Thông số dưới đây là bản tham chiếu kỹ thuật; chưa phải kết quả kiểm thử từng endpoint bằng tài khoản của bạn.


## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /kling/v1/videos/text2video/{task_id}:
    get:
      summary: Tác vụ truy vấn (đơn lẻ)
      deprecated: false
      description: >-
        Truy van trang thai va ket qua cua tac vu Vincent Video dua tren
        `task_id`.
      operationId: kling_get_text2video_task
      tags:
        - OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Video/Kling/văn bản thành video
        - Kling
      parameters:
        - name: task_id
          in: path
          description: task_id được trả về khi gửi một tác vụ
          required: true
          example: '1234567890123456'
          schema:
            type: string
      responses:
        '200':
          description: thành công
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: Mã trạng thái nghiệp vụ
                  data:
                    type: object
                    properties:
                      task_id:
                        type: string
                        description: ID tác vụ bất đồng bộ
                      task_result:
                        type: object
                        properties:
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  description: ID tài nguyên hoặc tác vụ
                                url:
                                  type: string
                                  description: URL tài nguyên
                              x-apifox-orders:
                                - id
                                - url
                              x-apidog-orders:
                                - id
                                - url
                            description: Danh sách URL hình ảnh hoặc chuỗi Base64
                          videos:
                            type: array
                            items:
                              type: object
                              properties:
                                duration:
                                  type: string
                                  description: >-
                                    Thời lượng (giây hoặc đơn vị do nền tảng quy
                                    định)
                                id:
                                  type: string
                                  description: ID tài nguyên hoặc tác vụ
                                url:
                                  type: string
                                  description: Tạo URL video
                              x-apifox-orders:
                                - duration
                                - id
                                - url
                              x-apidog-orders:
                                - duration
                                - id
                                - url
                            description: Danh sách video đã tạo
                        description: Đối tượng kết quả tác vụ
                        x-apifox-orders:
                          - images
                          - videos
                        x-apidog-orders:
                          - images
                          - videos
                      task_status:
                        type: string
                        enum:
                          - submitted
                          - processing
                          - succeed
                          - failed
                        description: Trạng thái tác vụ
                      task_status_msg:
                        type: string
                        description: Thông báo trạng thái tác vụ
                    description: >-
                      Phần dữ liệu (thường là Base64 hoặc một đối tượng có cấu
                      trúc)
                    x-apifox-orders:
                      - task_id
                      - task_result
                      - task_status
                      - task_status_msg
                    x-apidog-orders:
                      - task_id
                      - task_result
                      - task_status
                      - task_status_msg
                  message:
                    type: string
                    description: Vui lòng cung cấp nội dung tài liệu cần dịch.
                  request_id:
                    type: string
                    description: ID truy vết yêu cầu
                refName: KlingTaskQueryResponse
                x-apifox-orders:
                  - code
                  - data
                  - message
                  - request_id
                x-apidog-orders:
                  - code
                  - data
                  - message
                  - request_id
              examples:
                example:
                  summary: example
                  value:
                    code: 0
                    data:
                      task_id: chuỗi
                      task_result:
                        images:
                          - id: string
                            url: string
                        videos:
                          - duration: chuỗi
                            id: string
                            url: string
                      task_status: đã gửi
                      task_status_msg: chuỗi
                    message: chuỗi
                    request_id: chuỗi
          headers: {}
          x-apidog-name: thành công
        '401':
          description: Khóa API bị thiếu hoặc không hợp lệ
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - message
                      - type
                    properties:
                      message:
                        type: string
                        description: Thông báo lỗi (thường kết thúc bằng mã yêu cầu)
                      type:
                        type: string
                        description: Loại lỗi; các lỗi cổng cục bộ thường là new_api_error
                        examples:
                          - new_api_error
                    x-apifox-orders:
                      - message
                      - type
                    x-apidog-orders:
                      - message
                      - type
                refName: NewApiError
                x-apifox-orders:
                  - error
                x-apidog-orders:
                  - error
              examples:
                example:
                  summary: example
                  value:
                    error:
                      message: >-
                        Mã thông báo không hợp lệ (request id:
                        20260805120000123456789AbCdEfGh)
                      type: new_api_error
          headers: {}
          x-apidog-name: Khóa API bị thiếu hoặc không hợp lệ
      security: []
      x-apidog-folder: OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Video/Kling/văn bản thành video
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1218648/apis/api-45208992-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.openaihub.net
    description: Prod Env
security: []

```
