curl --request POST \
--url https://api.egp.scale.com/v5/responses \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"model": "<string>",
"input": "<string>",
"include": [
"<string>"
],
"instructions": "<string>",
"max_output_tokens": 123,
"metadata": {},
"parallel_tool_calls": true,
"previous_response_id": "<string>",
"reasoning": {},
"store": true,
"stream": true,
"temperature": 1,
"text": {},
"tool_choice": "<string>",
"tools": [
{}
],
"top_p": 0.5
}
'import requests
url = "https://api.egp.scale.com/v5/responses"
payload = {
"model": "<string>",
"input": "<string>",
"include": ["<string>"],
"instructions": "<string>",
"max_output_tokens": 123,
"metadata": {},
"parallel_tool_calls": True,
"previous_response_id": "<string>",
"reasoning": {},
"store": True,
"stream": True,
"temperature": 1,
"text": {},
"tool_choice": "<string>",
"tools": [{}],
"top_p": 0.5
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
input: '<string>',
include: ['<string>'],
instructions: '<string>',
max_output_tokens: 123,
metadata: {},
parallel_tool_calls: true,
previous_response_id: '<string>',
reasoning: {},
store: true,
stream: true,
temperature: 1,
text: {},
tool_choice: '<string>',
tools: [{}],
top_p: 0.5
})
};
fetch('https://api.egp.scale.com/v5/responses', 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.egp.scale.com/v5/responses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'input' => '<string>',
'include' => [
'<string>'
],
'instructions' => '<string>',
'max_output_tokens' => 123,
'metadata' => [
],
'parallel_tool_calls' => true,
'previous_response_id' => '<string>',
'reasoning' => [
],
'store' => true,
'stream' => true,
'temperature' => 1,
'text' => [
],
'tool_choice' => '<string>',
'tools' => [
[
]
],
'top_p' => 0.5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.egp.scale.com/v5/responses"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"instructions\": \"<string>\",\n \"max_output_tokens\": 123,\n \"metadata\": {},\n \"parallel_tool_calls\": true,\n \"previous_response_id\": \"<string>\",\n \"reasoning\": {},\n \"store\": true,\n \"stream\": true,\n \"temperature\": 1,\n \"text\": {},\n \"tool_choice\": \"<string>\",\n \"tools\": [\n {}\n ],\n \"top_p\": 0.5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.egp.scale.com/v5/responses")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"instructions\": \"<string>\",\n \"max_output_tokens\": 123,\n \"metadata\": {},\n \"parallel_tool_calls\": true,\n \"previous_response_id\": \"<string>\",\n \"reasoning\": {},\n \"store\": true,\n \"stream\": true,\n \"temperature\": 1,\n \"text\": {},\n \"tool_choice\": \"<string>\",\n \"tools\": [\n {}\n ],\n \"top_p\": 0.5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v5/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"instructions\": \"<string>\",\n \"max_output_tokens\": 123,\n \"metadata\": {},\n \"parallel_tool_calls\": true,\n \"previous_response_id\": \"<string>\",\n \"reasoning\": {},\n \"store\": true,\n \"stream\": true,\n \"temperature\": 1,\n \"text\": {},\n \"tool_choice\": \"<string>\",\n \"tools\": [\n {}\n ],\n \"top_p\": 0.5\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": 123,
"model": "<string>",
"output": [
{
"id": "<string>",
"content": [
{
"annotations": [
"<unknown>"
],
"text": "<string>",
"type": "output_text",
"logprobs": [
{
"token": "<string>",
"bytes": [
123
],
"logprob": 123,
"top_logprobs": [
{
"token": "<string>",
"bytes": [
123
],
"logprob": 123
}
]
}
]
}
],
"role": "assistant",
"status": "in_progress",
"type": "message",
"phase": "commentary"
}
],
"parallel_tool_calls": true,
"tool_choice": "none",
"tools": [
{
"name": "<string>",
"type": "function",
"parameters": {},
"strict": true,
"description": "<string>"
}
],
"object": "response",
"error": {
"code": "server_error",
"message": "<string>"
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"instructions": "<string>",
"metadata": {},
"temperature": 123,
"top_p": 123,
"background": true,
"completed_at": 123,
"conversation": {
"id": "<string>"
},
"max_output_tokens": 123,
"max_tool_calls": 123,
"previous_response_id": "<string>",
"prompt": {
"id": "<string>",
"variables": {},
"version": "<string>"
},
"prompt_cache_key": "<string>",
"prompt_cache_retention": "in-memory",
"reasoning": {
"effort": "none",
"generate_summary": "auto",
"summary": "auto"
},
"safety_identifier": "<string>",
"service_tier": "auto",
"status": "completed",
"text": {
"format": {
"type": "text"
},
"verbosity": "low"
},
"top_logprobs": 123,
"truncation": "auto",
"usage": {
"input_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123
},
"output_tokens": 123,
"output_tokens_details": {
"reasoning_tokens": 123
},
"total_tokens": 123
},
"user": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Responses
curl --request POST \
--url https://api.egp.scale.com/v5/responses \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"model": "<string>",
"input": "<string>",
"include": [
"<string>"
],
"instructions": "<string>",
"max_output_tokens": 123,
"metadata": {},
"parallel_tool_calls": true,
"previous_response_id": "<string>",
"reasoning": {},
"store": true,
"stream": true,
"temperature": 1,
"text": {},
"tool_choice": "<string>",
"tools": [
{}
],
"top_p": 0.5
}
'import requests
url = "https://api.egp.scale.com/v5/responses"
payload = {
"model": "<string>",
"input": "<string>",
"include": ["<string>"],
"instructions": "<string>",
"max_output_tokens": 123,
"metadata": {},
"parallel_tool_calls": True,
"previous_response_id": "<string>",
"reasoning": {},
"store": True,
"stream": True,
"temperature": 1,
"text": {},
"tool_choice": "<string>",
"tools": [{}],
"top_p": 0.5
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
input: '<string>',
include: ['<string>'],
instructions: '<string>',
max_output_tokens: 123,
metadata: {},
parallel_tool_calls: true,
previous_response_id: '<string>',
reasoning: {},
store: true,
stream: true,
temperature: 1,
text: {},
tool_choice: '<string>',
tools: [{}],
top_p: 0.5
})
};
fetch('https://api.egp.scale.com/v5/responses', 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.egp.scale.com/v5/responses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'input' => '<string>',
'include' => [
'<string>'
],
'instructions' => '<string>',
'max_output_tokens' => 123,
'metadata' => [
],
'parallel_tool_calls' => true,
'previous_response_id' => '<string>',
'reasoning' => [
],
'store' => true,
'stream' => true,
'temperature' => 1,
'text' => [
],
'tool_choice' => '<string>',
'tools' => [
[
]
],
'top_p' => 0.5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.egp.scale.com/v5/responses"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"instructions\": \"<string>\",\n \"max_output_tokens\": 123,\n \"metadata\": {},\n \"parallel_tool_calls\": true,\n \"previous_response_id\": \"<string>\",\n \"reasoning\": {},\n \"store\": true,\n \"stream\": true,\n \"temperature\": 1,\n \"text\": {},\n \"tool_choice\": \"<string>\",\n \"tools\": [\n {}\n ],\n \"top_p\": 0.5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.egp.scale.com/v5/responses")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"instructions\": \"<string>\",\n \"max_output_tokens\": 123,\n \"metadata\": {},\n \"parallel_tool_calls\": true,\n \"previous_response_id\": \"<string>\",\n \"reasoning\": {},\n \"store\": true,\n \"stream\": true,\n \"temperature\": 1,\n \"text\": {},\n \"tool_choice\": \"<string>\",\n \"tools\": [\n {}\n ],\n \"top_p\": 0.5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v5/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"instructions\": \"<string>\",\n \"max_output_tokens\": 123,\n \"metadata\": {},\n \"parallel_tool_calls\": true,\n \"previous_response_id\": \"<string>\",\n \"reasoning\": {},\n \"store\": true,\n \"stream\": true,\n \"temperature\": 1,\n \"text\": {},\n \"tool_choice\": \"<string>\",\n \"tools\": [\n {}\n ],\n \"top_p\": 0.5\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": 123,
"model": "<string>",
"output": [
{
"id": "<string>",
"content": [
{
"annotations": [
"<unknown>"
],
"text": "<string>",
"type": "output_text",
"logprobs": [
{
"token": "<string>",
"bytes": [
123
],
"logprob": 123,
"top_logprobs": [
{
"token": "<string>",
"bytes": [
123
],
"logprob": 123
}
]
}
]
}
],
"role": "assistant",
"status": "in_progress",
"type": "message",
"phase": "commentary"
}
],
"parallel_tool_calls": true,
"tool_choice": "none",
"tools": [
{
"name": "<string>",
"type": "function",
"parameters": {},
"strict": true,
"description": "<string>"
}
],
"object": "response",
"error": {
"code": "server_error",
"message": "<string>"
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"instructions": "<string>",
"metadata": {},
"temperature": 123,
"top_p": 123,
"background": true,
"completed_at": 123,
"conversation": {
"id": "<string>"
},
"max_output_tokens": 123,
"max_tool_calls": 123,
"previous_response_id": "<string>",
"prompt": {
"id": "<string>",
"variables": {},
"version": "<string>"
},
"prompt_cache_key": "<string>",
"prompt_cache_retention": "in-memory",
"reasoning": {
"effort": "none",
"generate_summary": "auto",
"summary": "auto"
},
"safety_identifier": "<string>",
"service_tier": "auto",
"status": "completed",
"text": {
"format": {
"type": "text"
},
"verbosity": "low"
},
"top_logprobs": 123,
"truncation": "auto",
"usage": {
"input_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123
},
"output_tokens": 123,
"output_tokens_details": {
"reasoning_tokens": 123
},
"total_tokens": 123
},
"user": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Headers
Body
model specified as model_vendor/model, for example openai/gpt-4o
Which fields to include in the response
Instructions for the response generation
Maximum number of output tokens
Metadata for the response
Whether to enable parallel tool calls
ID of the previous response for chaining
Reasoning configuration for the response
Whether to store the response
Whether to stream the response
Sampling temperature for randomness control
0 <= x <= 2Text configuration parameters
Tool choice configuration
Tools available for the response
Top-p sampling parameter
0 <= x <= 1Truncation configuration
auto, disabled Response
Successful Response
- Response Post-V5-/V5/Responses
- ResponseAudioDeltaEvent
- ResponseAudioDoneEvent
- ResponseAudioTranscriptDeltaEvent
- ResponseAudioTranscriptDoneEvent
- ResponseCodeInterpreterCallCodeDeltaEvent
- ResponseCodeInterpreterCallCodeDoneEvent
- ResponseCodeInterpreterCallCompletedEvent
- ResponseCodeInterpreterCallInProgressEvent
- ResponseCodeInterpreterCallInterpretingEvent
- ResponseCompletedEvent
- ResponseContentPartAddedEvent
- ResponseContentPartDoneEvent
- ResponseCreatedEvent
- ResponseErrorEvent
- ResponseFileSearchCallCompletedEvent
- ResponseFileSearchCallInProgressEvent
- ResponseFileSearchCallSearchingEvent
- ResponseFunctionCallArgumentsDeltaEvent
- ResponseFunctionCallArgumentsDoneEvent
- ResponseInProgressEvent
- ResponseFailedEvent
- ResponseIncompleteEvent
- ResponseOutputItemAddedEvent
- ResponseOutputItemDoneEvent
- ResponseReasoningSummaryPartAddedEvent
- ResponseReasoningSummaryPartDoneEvent
- ResponseReasoningSummaryTextDeltaEvent
- ResponseReasoningSummaryTextDoneEvent
- ResponseReasoningTextDeltaEvent
- ResponseReasoningTextDoneEvent
- ResponseRefusalDeltaEvent
- ResponseRefusalDoneEvent
- ResponseTextDeltaEvent
- ResponseTextDoneEvent
- ResponseWebSearchCallCompletedEvent
- ResponseWebSearchCallInProgressEvent
- ResponseWebSearchCallSearchingEvent
- ResponseImageGenCallCompletedEvent
- ResponseImageGenCallGeneratingEvent
- ResponseImageGenCallInProgressEvent
- ResponseImageGenCallPartialImageEvent
- ResponseMcpCallArgumentsDeltaEvent
- ResponseMcpCallArgumentsDoneEvent
- ResponseMcpCallCompletedEvent
- ResponseMcpCallFailedEvent
- ResponseMcpCallInProgressEvent
- ResponseMcpListToolsCompletedEvent
- ResponseMcpListToolsFailedEvent
- ResponseMcpListToolsInProgressEvent
- ResponseOutputTextAnnotationAddedEvent
- ResponseQueuedEvent
- ResponseCustomToolCallInputDeltaEvent
- ResponseCustomToolCallInputDoneEvent
- GenericResponseEvent
An output message from the model.
- ResponseOutputMessage
- ResponseFileSearchToolCall
- ResponseFunctionToolCall
- ResponseFunctionWebSearch
- ResponseComputerToolCall
- ResponseReasoningItem
- ResponseCompactionItem
- ImageGenerationCall
- ResponseCodeInterpreterToolCall
- LocalShellCall
- ResponseFunctionShellToolCall
- ResponseFunctionShellToolCallOutput
- ResponseApplyPatchToolCall
- ResponseApplyPatchToolCallOutput
- McpCall
- McpListTools
- McpApprovalRequest
- ResponseCustomToolCall
Show child attributes
Show child attributes
none, auto, required Defines a function in your own code the model can choose to call.
Learn more about function calling.
- FunctionTool
- FileSearchTool
- ComputerTool
- WebSearchTool
- Mcp
- CodeInterpreter
- ImageGeneration
- LocalShell
- FunctionShellTool
- CustomTool
- WebSearchPreviewTool
- ApplyPatchTool
Show child attributes
Show child attributes
"response"An error object returned when the model fails to generate a Response.
Show child attributes
Show child attributes
Details about why the response is incomplete.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The conversation that this response belonged to.
Input items and output items from this response were automatically added to this conversation.
Show child attributes
Show child attributes
Reference to a prompt template and its variables. Learn more.
Show child attributes
Show child attributes
in-memory, 24h gpt-5 and o-series models only
Configuration options for reasoning models.
Show child attributes
Show child attributes
auto, default, flex, scale, priority completed, failed, in_progress, cancelled, queued, incomplete Configuration options for a text response from the model.
Can be plain text or structured JSON data. Learn more:
Show child attributes
Show child attributes
auto, disabled Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.
Show child attributes
Show child attributes

