# "Tác vụ truy vấn OpenAI"

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

> 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:
  /v1/videos/{id}:
    get:
      summary: Tác vụ truy vấn OpenAI
      deprecated: false
      description: >-
        Truy vấn trạng thái tác vụ Grok Imagine (`GET /v1/videos/{id}`). Dùng
        chung tuyến vật lý với Sora; phân biệt bằng ID tác vụ / mô hình.

        Thăm dò các tác vụ được gửi qua `POST /v1/videos/generations` hoặc `POST
        /v1/videos/edits`.
      operationId: grok_v1_videos
      tags:
        - >-
          OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Video/sora/Định dạng video chính thức
          của OpenAI
        - Grok
      parameters:
        - name: id
          in: path
          description: ID tài nguyên / tác vụ trong đường dẫn
          required: true
          example: sora-2:task_01k81e7r1mf0qtvp3ett3mr4jm
          schema:
            type: string
        - name: Content-Type
          in: header
          description: Content-Type của phần thân yêu cầu, thường là application/json
          required: true
          example: application/json
          schema:
            type: string
        - name: Accept
          in: header
          description: Content-Type dự kiến của phản hồi
          required: true
          example: application/json
          schema:
            type: string
        - name: Authorization
          in: header
          description: Khóa API Bearer
          required: false
          example: Bearer {{YOUR_API_KEY}}
          schema:
            type: string
        - name: X-Forwarded-Host
          in: header
          description: Host gốc được chuyển tiếp (trường hợp proxy)
          required: false
          example: localhost:5173
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties: {}
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - status
                properties:
                  enhanced_prompt:
                    type: string
                    description: Lời nhắc nâng cao
                  id:
                    type: string
                    description: ID tài nguyên hoặc tác vụ
                  status:
                    type: string
                    description: Trạng thái
                  status_update_time:
                    type: integer
                    description: Thời điểm cập nhật trạng thái
                  video_url:
                    type: string
                    description: URL video
                refName: GetV1VideosIdResponse
                x-apifox-orders:
                  - enhanced_prompt
                  - id
                  - status
                  - status_update_time
                  - video_url
                x-apidog-orders:
                  - enhanced_prompt
                  - id
                  - status
                  - status_update_time
                  - video_url
              examples:
                '1':
                  summary: '1'
                  value: '[long payload omitted: 1,869 units]'
                '2':
                  summary: '2'
                  value:
                    completed_at: 1761622385
                    created_at: 1761622232
                    enhanced_prompt: ''
                    id: video_5c6a605a-30c0-4a6a-9dbd-d1d6cfdd9980
                    model: sora-2
                    object: video
                    progress: 100
                    seconds: '10'
                    size: 1280x720
                    status: completed
                    status_update_time: 1761622385
                    video_url: >-
                      https://midjourney-plus.oss-us-west-1.aliyuncs.com/sora/cc4fb429-22a5-4747-a6f9-a6badccf8f42.mp4
          headers: {}
          x-apidog-name: ''
        '400':
          description: Yêu cầu không hợp lệ hoặc xác thực thất bại
          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: >-
                        Yêu cầu không hợp lệ (mã yêu cầu:
                        20260805120000123456789AbCdEfGh)
                      type: new_api_error
          headers: {}
          x-apidog-name: Yêu cầu không hợp lệ hoặc xác thực thất bại
        '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/sora/Định dạng video chính thức
        của OpenAI
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1218648/apis/api-45209057-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.openaihub.net
    description: Prod Env
security: []

```
