Skip to main content
POST
/
v5
/
responses
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,
  "truncation": "auto"
}
'
{
  "id": "<string>",
  "created_at": 123,
  "model": "<string>",
  "output": [
    {
      "id": "<string>",
      "content": [
        {
          "annotations": [
            "<unknown>"
          ],
          "text": "<string>",
          "type": "<string>",
          "logprobs": [
            {
              "token": "<string>",
              "bytes": [
                123
              ],
              "logprob": 123,
              "top_logprobs": [
                {
                  "token": "<string>",
                  "bytes": [
                    123
                  ],
                  "logprob": 123
                }
              ]
            }
          ]
        }
      ],
      "role": "<string>",
      "status": "in_progress",
      "type": "<string>"
    }
  ],
  "parallel_tool_calls": true,
  "tool_choice": "none",
  "tools": [
    {
      "name": "<string>",
      "type": "<string>",
      "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,
  "max_output_tokens": 123,
  "max_tool_calls": 123,
  "previous_response_id": "<string>",
  "prompt": {
    "id": "<string>",
    "variables": {},
    "version": "<string>"
  },
  "prompt_cache_key": "<string>",
  "reasoning": {
    "effort": "minimal",
    "generate_summary": "auto",
    "summary": "auto"
  },
  "safety_identifier": "<string>",
  "service_tier": "auto",
  "status": "completed",
  "text": {
    "format": {
      "type": "<string>"
    },
    "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>"
}

Authorizations

x-api-key
string
header
required

Headers

x-selected-account-id
string | null

Body

application/json
model
string
required

model specified as model_vendor/model, for example openai/gpt-4o

input
required
include
string[]

Which fields to include in the response

instructions
string

Instructions for the response generation

max_output_tokens
integer

Maximum number of output tokens

metadata
Metadata · object

Metadata for the response

parallel_tool_calls
boolean

Whether to enable parallel tool calls

previous_response_id
string

ID of the previous response for chaining

reasoning
Reasoning · object

Reasoning configuration for the response

store
boolean

Whether to store the response

stream
boolean

Whether to stream the response

temperature
number

Sampling temperature for randomness control

Required range: 0 <= x <= 2
text
Text · object

Text configuration parameters

tool_choice

Tool choice configuration

tools
Tools · object[]

Tools available for the response

top_p
number

Top-p sampling parameter

Required range: 0 <= x <= 1
truncation
enum<string>

Truncation configuration

Available options:
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
id
string
required
created_at
number
required
model
required
output
(ResponseOutputMessage · object | ResponseFileSearchToolCall · object | ResponseFunctionToolCall · object | ResponseFunctionWebSearch · object | ResponseComputerToolCall · object | ResponseReasoningItem · object | ImageGenerationCall · object | ResponseCodeInterpreterToolCall · object | LocalShellCall · object | McpCall · object | McpListTools · object | McpApprovalRequest · object | ResponseCustomToolCall · object)[]
required
  • ResponseOutputMessage
  • ResponseFileSearchToolCall
  • ResponseFunctionToolCall
  • ResponseFunctionWebSearch
  • ResponseComputerToolCall
  • ResponseReasoningItem
  • ImageGenerationCall
  • ResponseCodeInterpreterToolCall
  • LocalShellCall
  • McpCall
  • McpListTools
  • McpApprovalRequest
  • ResponseCustomToolCall
parallel_tool_calls
boolean
required
tool_choice
required
Available options:
none,
auto,
required
tools
(FunctionTool · object | FileSearchTool · object | WebSearchTool · object | ComputerTool · object | Mcp · object | CodeInterpreter · object | ImageGeneration · object | LocalShell · object | CustomTool · object)[]
required
  • FunctionTool
  • FileSearchTool
  • WebSearchTool
  • ComputerTool
  • Mcp
  • CodeInterpreter
  • ImageGeneration
  • LocalShell
  • CustomTool
object
string
default:response
Allowed value: "response"
error
ResponseError · object
incomplete_details
IncompleteDetails · object
instructions
metadata
Metadata · object
temperature
number
top_p
number
background
boolean
max_output_tokens
integer
max_tool_calls
integer
previous_response_id
string
prompt
ResponsePrompt · object
prompt_cache_key
string
reasoning
Reasoning · object
safety_identifier
string
service_tier
enum<string>
Available options:
auto,
default,
flex,
scale,
priority
status
enum<string>
Available options:
completed,
failed,
in_progress,
cancelled,
queued,
incomplete
text
ResponseTextConfig · object
top_logprobs
integer
truncation
enum<string>
Available options:
auto,
disabled
usage
ResponseUsage · object
user
string