Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Responses

Cancel a response
POST/responses/{response_id}/cancel
Compact a response
POST/responses/compact
Delete a model response
DELETE/responses/{response_id}
Get a model response
GET/responses/{response_id}
ModelsExpand Collapse
CompactedResponse object { id, created_at, object, 2 more }
id: string

The unique identifier for the compacted response.

created_at: number

Unix timestamp (in seconds) when the compacted conversation was created.

formatunixtime
object: "response.compaction"

The object type. Always response.compaction.

output: array of Message { id, content, role, 3 more } or object { id, call_id, code, 2 more } or object { id, call_id, result, 2 more } or 25 more

The compacted list of output items.

One of the following:
Message object { id, content, role, 3 more }

A message to or from the model.

id: string

The unique ID of the message.

content: array of ResponseInputText { text, type, prompt_cache_breakpoint } or ResponseOutputText { annotations, logprobs, text, type } or TextContent { text, type } or 6 more

The content of the message

One of the following:
ResponseInputText object { text, type, prompt_cache_breakpoint }

A text input to the model.

text: string

The text input to the model.

type: "input_text"

The type of the input item. Always input_text.

prompt_cache_breakpoint: optional object { mode }

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode: "explicit"

The breakpoint mode. Always explicit.

ResponseOutputText object { annotations, logprobs, text, type }

A text output from the model.

annotations: array of object { file_id, filename, index, type } or object { end_index, start_index, title, 2 more } or object { container_id, end_index, file_id, 3 more } or object { file_id, index, type }

The annotations of the text output.

One of the following:
FileCitation object { file_id, filename, index, type }

A citation to a file.

file_id: string

The ID of the file.

filename: string

The filename of the file cited.

index: number

The index of the file in the list of files.

type: "file_citation"

The type of the file citation. Always file_citation.

URLCitation object { end_index, start_index, title, 2 more }

A citation for a web resource used to generate a model response.

end_index: number

The index of the last character of the URL citation in the message.

start_index: number

The index of the first character of the URL citation in the message.

title: string

The title of the web resource.

type: "url_citation"

The type of the URL citation. Always url_citation.

url: string

The URL of the web resource.

formaturi
ContainerFileCitation object { container_id, end_index, file_id, 3 more }

A citation for a container file used to generate a model response.

container_id: string

The ID of the container file.

end_index: number

The index of the last character of the container file citation in the message.

file_id: string

The ID of the file.

filename: string

The filename of the container file cited.

start_index: number

The index of the first character of the container file citation in the message.

type: "container_file_citation"

The type of the container file citation. Always container_file_citation.

FilePath object { file_id, index, type }

A path to a file.

file_id: string

The ID of the file.

index: number

The index of the file in the list of files.

type: "file_path"

The type of the file path. Always file_path.

logprobs: array of object { token, bytes, logprob, top_logprobs }
token: string
bytes: array of number
logprob: number
top_logprobs: array of object { token, bytes, logprob }
token: string
bytes: array of number
logprob: number
text: string

The text output from the model.

type: "output_text"

The type of the output text. Always output_text.

TextContent object { text, type }

A text content.

text: string
type: "text"
SummaryTextContent object { text, type }

A summary text from the model.

text: string

A summary of the reasoning output from the model so far.

type: "summary_text"

The type of the object. Always summary_text.

ReasoningText object { text, type }

Reasoning text from the model.

text: string

The reasoning text from the model.

type: "reasoning_text"

The type of the reasoning text. Always reasoning_text.

ResponseOutputRefusal object { refusal, type }

A refusal from the model.

refusal: string

The refusal explanation from the model.

type: "refusal"

The type of the refusal. Always refusal.

ResponseInputImage object { detail, type, file_id, 2 more }

An image input to the model. Learn about image inputs.

detail: ImageDetail

The detail level of the image to be sent to the model. One of high, low, auto, or original. Defaults to auto.

type: "input_image"

The type of the input item. Always input_image.

file_id: optional string or null

The ID of the file to be sent to the model.

image_url: optional string or null

The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.

formaturi
prompt_cache_breakpoint: optional object { mode }

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode: "explicit"

The breakpoint mode. Always explicit.

ComputerScreenshotContent object { detail, file_id, image_url, 2 more }

A screenshot of a computer.

detail: ImageDetail

The detail level of the screenshot image to be sent to the model. One of high, low, auto, or original. Defaults to auto.

file_id: string or null

The identifier of an uploaded file that contains the screenshot.

image_url: string or null

The URL of the screenshot image.

formaturi
type: "computer_screenshot"

Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot.

prompt_cache_breakpoint: optional object { mode }

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request’s prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode: "explicit"

The breakpoint mode. Always explicit.

ResponseInputFile object { type, detail, file_data, 4 more }

A file input to the model.

type: "input_file"

The type of the input item. Always input_file.

detail: optional "auto" or "low" or "high"

The detail level of the file to be sent to the model. Use auto to let the system select the detail level; for GPT-5.6 and later models, auto uses high-quality rendering, which may increase input token usage. Use low for lower-cost rendering, or high to render the file at higher quality. Defaults to auto.

One of the following:
"auto"
"low"
"high"
file_data: optional string

The content of the file to be sent to the model.

file_id: optional string or null

The ID of the file to be sent to the model.

file_url: optional string

The URL of the file to be sent to the model.

formaturi