cURL
curl --request GET \
--url https://aigw.portkey.ai/v1/responses/{response_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://aigw.portkey.ai/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://aigw.portkey.ai/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://aigw.portkey.ai/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://aigw.portkey.ai/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://aigw.portkey.ai/v1/responses/{response_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://aigw.portkey.ai/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{
"metadata": {},
"temperature": 1,
"top_p": 1,
"model": "o1-pro",
"instructions": "<string>",
"tools": [
{
"type": "file_search",
"vector_store_ids": [
"<string>"
],
"max_num_results": 123,
"filters": {
"type": "eq",
"key": "<string>",
"value": "<string>"
},
"ranking_options": {
"ranker": "auto",
"score_threshold": 0
}
}
],
"tool_choice": "none",
"id": "<string>",
"object": "response",
"created_at": 123,
"error": {
"code": "server_error",
"message": "<string>"
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"output": [
{
"id": "<string>",
"type": "message",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "<string>",
"annotations": [
{
"type": "file_citation",
"index": 123,
"file_id": "<string>"
}
]
}
],
"status": "in_progress"
}
],
"parallel_tool_calls": true,
"user": "<string>",
"previous_response_id": "<string>",
"reasoning": {
"effort": "medium",
"generate_summary": "concise"
},
"max_output_tokens": 123,
"text": {
"format": {
"type": "text"
}
},
"truncation": "disabled",
"status": "completed",
"output_text": "<string>",
"usage": {
"input_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123
},
"output_tokens": 123,
"output_tokens_details": {
"reasoning_tokens": 123
},
"total_tokens": 123
}
}GET
/
responses
/
{response_id}
cURL
curl --request GET \
--url https://aigw.portkey.ai/v1/responses/{response_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://aigw.portkey.ai/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://aigw.portkey.ai/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://aigw.portkey.ai/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://aigw.portkey.ai/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://aigw.portkey.ai/v1/responses/{response_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://aigw.portkey.ai/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{
"metadata": {},
"temperature": 1,
"top_p": 1,
"model": "o1-pro",
"instructions": "<string>",
"tools": [
{
"type": "file_search",
"vector_store_ids": [
"<string>"
],
"max_num_results": 123,
"filters": {
"type": "eq",
"key": "<string>",
"value": "<string>"
},
"ranking_options": {
"ranker": "auto",
"score_threshold": 0
}
}
],
"tool_choice": "none",
"id": "<string>",
"object": "response",
"created_at": 123,
"error": {
"code": "server_error",
"message": "<string>"
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"output": [
{
"id": "<string>",
"type": "message",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "<string>",
"annotations": [
{
"type": "file_citation",
"index": 123,
"file_id": "<string>"
}
]
}
],
"status": "in_progress"
}
],
"parallel_tool_calls": true,
"user": "<string>",
"previous_response_id": "<string>",
"reasoning": {
"effort": "medium",
"generate_summary": "concise"
},
"max_output_tokens": 123,
"text": {
"format": {
"type": "text"
}
},
"truncation": "disabled",
"status": "completed",
"output_text": "<string>",
"usage": {
"input_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123
},
"output_tokens": 123,
"output_tokens_details": {
"reasoning_tokens": 123
},
"total_tokens": 123
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Available options:
file_search_call.results, message.input_image.image_url, computer_call_output.output.image_url Response
200 - application/json
Show child attributes
Show child attributes
Required range:
0 <= x <= 2Required range:
0 <= x <= 1Available options:
o1-pro, o1-pro-2025-03-19, computer-use-preview, computer-use-preview-2025-03-11 tools
(File search · object | Function · object | Computer use · object | Web search · object)[]
required
- File search
- Function
- Computer use
- Web search
Show child attributes
Show child attributes
Available options:
none, auto, required Available options:
response Show child attributes
Show child attributes
Show child attributes
Show child attributes
output
(Output message · object | File search tool call · object | Function tool call · object | Web search tool call · object | Computer tool call · object | Reasoning · object)[]
required
- Output message
- File search tool call
- Function tool call
- Web search tool call
- Computer tool call
- Reasoning
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
auto, disabled Available options:
completed, failed, in_progress, incomplete Show child attributes
Show child attributes
Last modified on September 17, 2026
Was this page helpful?

