Ответы на запрос (OpenAI Responses API)
curl --request GET \
--url https://api.aiid.edu.kg/v1/responses/{response_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aiid.edu.kg/v1/responses/{response_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aiid.edu.kg/v1/responses/{response_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aiid.edu.kg/v1/responses/{response_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aiid.edu.kg/v1/responses/{response_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aiid.edu.kg/v1/responses/{response_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiid.edu.kg/v1/responses/{response_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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
}Формат OpenAI (Responses)
Ответы на запрос (OpenAI Responses API)
OpenAI Responses API — интерфейс для асинхронного запроса задач. response_id Используйте полный id, возвращённый при создании ответа; не обрезайте и не переписывайте его.
Запрашивает асинхронные задачи изображений OpenAI Responses API. response_id Необходимо использовать полный id, возвращённый POST /v1/responses, например resp_xxx.
Пример асинхронного запроса
GET /v1/responses/resp_xxx
Эквивалентное описание параметров пути:
{
"response_id": "resp_xxx"
}
Пример ответа в состоянии завершения:
{
"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
}
GET
/
v1
/
responses
/
{response_id}
Ответы на запрос (OpenAI Responses API)
curl --request GET \
--url https://api.aiid.edu.kg/v1/responses/{response_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aiid.edu.kg/v1/responses/{response_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aiid.edu.kg/v1/responses/{response_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aiid.edu.kg/v1/responses/{response_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aiid.edu.kg/v1/responses/{response_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aiid.edu.kg/v1/responses/{response_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiid.edu.kg/v1/responses/{response_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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
}Авторизации
Используйте проверку подлинности Bearer Token.
Формат: Authorization: Bearer sk-xxxxxx
Параметры пути
Полный id, возвращаемый в ответе на создание.
Пример:
"resp_xxx"
Ответ
200 - application/json
OK
Response ID。
Пример:
"resp_xxx"
Пример:
"response"
Статус задачи, обычно: queued, in_progress, completed, failed.
Пример:
"in_progress"
Объект ошибки при сбое.
