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

# Phản hồi truy vấn (OpenAI Responses API)

> OpenAI Responses API giao diện truy vấn tác vụ bất đồng bộ. `response_id` Hãy sử dụng đầy đủ `id` được trả về khi tạo phản hồi, không cắt ngắn hoặc viết lại.

Truy vấn tác vụ hình ảnh bất đồng bộ của OpenAI Responses API. `response_id` Phải sử dụng đầy đủ `id` do `POST /v1/responses` trả về, ví dụ `resp_xxx`.

## Ví dụ truy vấn bất đồng bộ

```http
GET /v1/responses/resp_xxx
```

Giải thích tương đương của tham số đường dẫn:

```json
{
  "response_id": "resp_xxx"
}
```

Ví dụ phản hồi ở trạng thái hoàn tất:

```json
{
  "id": "resp_xxx",
  "created_at": 1780649146,
  "error": null,
  "incomplete_details": null,
  "instructions": null,
  "metadata": {},
  "model": "gpt-image-2-2k",
  "object": "response",
  "output": [
    {
      "id": "ig_010c31178d26436ca6194cde07931b33_0",
      "result": null,
      "status": "completed",
      "type": "image_generation_call",
      "url": "https://example.png"
    }
  ],
  "parallel_tool_calls": true,
  "temperature": null,
  "tool_choice": null,
  "tools": null,
  "top_p": null,
  "max_output_tokens": null,
  "previous_response_id": null,
  "reasoning": null,
  "status": "completed",
  "text": null,
  "truncation": null,
  "usage": null,
  "user": null,
  "store": null
}
```



## OpenAPI

````yaml api-reference/vi/openapi.json GET /v1/responses/{response_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:
  /v1/responses/{response_id}:
    get:
      tags:
        - Định dạng OpenAI (Responses)
      summary: Phản hồi truy vấn (OpenAI Responses API)
      description: >-
        OpenAI Responses API giao diện truy vấn tác vụ bất đồng bộ.
        `response_id` Hãy sử dụng đầy đủ `id` được trả về khi tạo phản hồi,
        không cắt ngắn hoặc viết lại.


        Truy vấn tác vụ hình ảnh bất đồng bộ của OpenAI Responses API.
        `response_id` Phải sử dụng đầy đủ `id` do `POST /v1/responses` trả về,
        ví dụ `resp_xxx`.


        ## Ví dụ truy vấn bất đồng bộ


        ```http

        GET /v1/responses/resp_xxx

        ```


        Giải thích tương đương của tham số đường dẫn:


        ```json

        {
          "response_id": "resp_xxx"
        }

        ```


        Ví dụ phản hồi ở trạng thái hoàn tất:


        ```json

        {
          "id": "resp_xxx",
          "created_at": 1780649146,
          "error": null,
          "incomplete_details": null,
          "instructions": null,
          "metadata": {},
          "model": "gpt-image-2-2k",
          "object": "response",
          "output": [
            {
              "id": "ig_010c31178d26436ca6194cde07931b33_0",
              "result": null,
              "status": "completed",
              "type": "image_generation_call",
              "url": "https://example.png"
            }
          ],
          "parallel_tool_calls": true,
          "temperature": null,
          "tool_choice": null,
          "tools": null,
          "top_p": null,
          "max_output_tokens": null,
          "previous_response_id": null,
          "reasoning": null,
          "status": "completed",
          "text": null,
          "truncation": null,
          "usage": null,
          "user": null,
          "store": null
        }

        ```
      parameters:
        - name: response_id
          in: path
          required: true
          schema:
            type: string
            example: resp_xxx
          description: Tạo id đầy đủ được trả về trong phản hồi.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: resp_xxx
                    description: Response ID。
                  object:
                    type: string
                    example: response
                  created_at:
                    type: integer
                  status:
                    type: string
                    example: in_progress
                    description: >-
                      Trạng thái tác vụ, thường là `queued`, `in_progress`,
                      `completed`, `failed`.
                  model:
                    type: string
                  output:
                    type: array
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                          description: URL hình ảnh sau khi tác vụ ảnh hoàn tất.
                  metadata:
                    type: object
                    properties:
                      task_id:
                        type: string
                        description: Siêu dữ liệu ID của tác vụ thượng nguồn.
                  error:
                    type: object
                    nullable: true
                    description: Đối tượng lỗi khi thất bại.
              examples:
                responses_image_async_completed:
                  summary: Kết quả trả về khi truy vấn bất đồng bộ tạo ảnh hoàn tất
                  value:
                    id: resp_xxx
                    created_at: 1780649146
                    error: null
                    incomplete_details: null
                    instructions: null
                    metadata: {}
                    model: gpt-image-2-2k
                    object: response
                    output:
                      - id: ig_010c31178d26436ca6194cde07931b33_0
                        result: null
                        status: completed
                        type: image_generation_call
                        url: https://example.png
                    parallel_tool_calls: true
                    temperature: null
                    tool_choice: null
                    tools: null
                    top_p: null
                    max_output_tokens: null
                    previous_response_id: null
                    reasoning: null
                    status: completed
                    text: null
                    truncation: null
                    usage: null
                    user: null
                    store: null
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |-
        Sử dụng xác thực Bearer Token.
        Định dạng: `Authorization: Bearer sk-xxxxxx`

````