/v1/agent/{id}Retrieve Agent ResponseRetrieve a response created earlier. Returns a JSON snapshot of the response. Only responses created with store omitted or true can be retrieved; store: false responses return a 404.
Parameters
idstringpathrequiredResponse id (`resp_<...>`)
Responses
ResponsesResponse
Non-streaming response returned when stream is false
created_atinteger · int64requiredUnix timestamp when the response was created
errorobjectError information returned when a request fails
Show child attributes
codestringError code
messagestringrequiredHuman-readable error message
typestringError type category
idstringrequiredUnique identifier for the response
modelstringrequiredModel used for generation
objectstringrequiredObject type in API responses
outputarray of valuerequiredArray of output items (messages, search results, tool calls)
Show child attributes
Show array items
oneOf · 10 options
MessageOutputItem
contentarray of objectrequiredShow child attributes
Show array items
annotationsarray of objectShow child attributes
Show array items
Text annotation (URL citation)
end_indexinteger · int32End character index of the annotated text
start_indexinteger · int32Start character index of the annotated text
titlestringTitle of the cited source
typestringAnnotation type (url_citation)
urlstringURL of the cited source
textstringrequiredtypestringrequiredType of a content part
idstringrequiredrolestringrequiredRole in a message
statusstringrequiredStatus of a response or output item
typestringrequiredSearchResultsOutputItem
queriesarray of stringShow child attributes
resultsarray of objectrequiredShow child attributes
Show array items
A single search result used in LLM responses
datestringPublication date of the result
idinteger · int64requiredUnique numeric identifier for the result
last_updatedstringDate the result was last updated
snippetstringrequiredText snippet from the search result
sourcestringSource of search results
titlestringrequiredTitle of the search result page
urlstringrequiredURL of the search result page
typestringrequiredFetchUrlResultsOutputItem
contentsarray of objectrequiredShow child attributes
Show array items
Content fetched from a URL
snippetstringrequiredThe fetched content snippet
titlestringrequiredThe title of the page
urlstringrequiredThe URL from which content was fetched
typestringrequiredFinanceResultsOutputItem
Intermediate output item emitted when the finance_search tool runs. One item is emitted per tool invocation; the requested categories and tickers are echoed at the envelope level alongside the per-result entries.
categoriesarray of stringFinance categories the tool was asked to retrieve for this invocation (for example, "quote").
Show child attributes
resultsarray of objectrequiredStructured finance results returned for the invocation.
Show child attributes
Show array items
A single structured finance result returned by the finance_search tool.
categorystringrequiredFinance category this result belongs to (for example, "quote").
contentstringrequiredStructured content for the result, typically a markdown-formatted table or snippet.
sourcesarray of stringSource URLs backing the structured content.
Show child attributes
tickersarray of stringTicker symbols this result pertains to.
Show child attributes
tickersarray of stringTicker symbols the tool was asked to retrieve for this invocation.
Show child attributes
typestringrequiredPeopleSearchResultsOutputItem
Intermediate output item emitted when the people_search tool runs. Mirrors the shape of search_results: the agent's generated queries plus a list of per-person result entries.
queriesarray of stringSearch queries the agent generated for this people_search invocation.
Show child attributes
resultsarray of objectrequiredPer-person result entries. Shape matches SearchResult (id, url, title, snippet, source, last_updated).
Show child attributes
typestringrequiredFunctionCallOutputItem
argumentsstringrequiredJSON string of arguments
call_idstringrequiredCorrelates with function_call_output input
idstringrequirednamestringrequiredstatusstringrequiredStatus of a response or output item
thought_signaturestringBase64-encoded opaque signature for thinking models
typestringrequiredSandboxResultsOutputItem
Result of a sandbox tool invocation. Contains the executed code and its output.
codestringThe code that was executed inside the sandbox.
duration_msinteger · int64Wall-clock duration of the sandbox execution, in milliseconds.
exit_codeinteger · int32Process exit code. Non-zero indicates a runtime error.
statusstringrequiredExecution status. One of `completed`, `timed_out`, `failed`.
stderrstringStandard error captured from the sandbox execution.
stdoutstringStandard output captured from the sandbox execution.
typestringrequiredMcpListToolsOutputItem
Tools discovered on one external MCP server when the request starts. Matches OpenAI's mcp_list_tools item.
connector_idstringPresent only when the item originated from a managed connector.
errorstringPresent only when the server's tools could not be listed. Absent on success.
idstringrequiredserver_labelstringrequiredtoolsarray of objectrequiredShow child attributes
Show array items
One tool discovered on a remote MCP server.
descriptionstringinput_schemaobjectrequiredThe server's JSON Schema for the tool, passed through unmodified.
namestringrequiredtypestringrequiredMcpCallOutputItem
One tool call executed against an external MCP server, modeled on OpenAI's mcp_call item.
argumentsstringrequiredJSON-encoded arguments the model passed.
connector_idstringPresent only when the item originated from a managed connector.
errornull | stringThe failure string when the call failed (also returned to the model in-band); null on success, matching OpenAI's mcp_call.
idstringrequirednamestringrequiredoutputstringTool output text; empty when the call failed.
server_labelstringrequiredtypestringrequiredToolSearchOutputItem
Complete public definitions matched by one hosted external-tool search.
argumentsstringExact argument text authored by the model for hosted search.
call_idnull | stringrequiredAlways null for hosted search.
executionstringrequiredExecution location. Currently `server`. Clients must tolerate unknown values.
idstringrequiredstatusstringrequiredCurrent execution status. Known values are `in_progress`, `completed`, and `incomplete`. Clients must tolerate unknown values.
toolsarray of objectrequiredShow child attributes
Show array items
A response-only namespace containing complete external tool definitions.
descriptionstringrequirednamestringrequiredtoolsarray of objectrequiredShow child attributes
Show array items
One function definition discovered by hosted external-tool search.
descriptionstringnamestringrequiredparametersobjectThe server's JSON Schema for the tool, passed through unmodified.
typestringrequiredtypestringrequiredtypestringrequiredstatusstringrequiredStatus of a response or output item
usageobjectToken usage and cost information for a Responses API request
Show child attributes
costobjectCost breakdown for a Responses API request
Show child attributes
cache_creation_costnumber · doubleCost for cache creation in USD
cache_read_costnumber · doubleCost for cache reads in USD
currencystringrequiredCurrency code for cost values
input_costnumber · doublerequiredCost for input tokens in USD
output_costnumber · doublerequiredCost for output tokens in USD
tool_calls_costnumber · doubleCost for tool call invocations in USD
total_costnumber · doublerequiredTotal cost for the request in USD
input_tokensinteger · int64requiredNumber of input tokens used
input_tokens_detailsobjectShow child attributes
cache_creation_input_tokensinteger · int64Tokens used for cache creation
cache_read_input_tokensinteger · int64Tokens read from cache
output_tokensinteger · int64requiredNumber of output tokens generated
tool_calls_detailsobjectDetails about tool call invocations
total_tokensinteger · int64requiredTotal tokens used (input + output)
{
"created_at": 0,
"error": {
"code": "string",
"message": "string",
"type": "string"
},
"id": "string",
"model": "string",
"object": "response",
"output": [
{
"contents": [
{
"snippet": "string",
"title": "string",
"url": "string"
}
],
"type": "fetch_url_results"
}
],
"status": "cancelled",
"usage": {
"cost": {
"cache_creation_cost": 0,
"cache_read_cost": 0,
"currency": "USD",
"input_cost": 0,
"output_cost": 0,
"tool_calls_cost": 0,
"total_cost": 0
},
"input_tokens": 0,
"input_tokens_details": {
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
},
"output_tokens": 0,
"tool_calls_details": {
"additionalProp1": {
"invocation": 0
}
},
"total_tokens": 0
}
}Error information returned when a request fails
{
"error": {
"code": "string",
"message": "string",
"type": "string"
}
}