Skip to content
Try out in chatDeveloper dashboardLogin

Responses

Create Responses
client.responses.create(ResponseCreateParams { input, background, cache_salt, 31 more } body, RequestOptionsoptions?): ResponseCreateResponse { id, created_at, model, 6 more }
POST/v1/responses
Retrieve Responses
client.responses.retrieve(stringresponseID, ResponseRetrieveParams { starting_after, stream } query?, RequestOptionsoptions?): ResponseRetrieveResponse
GET/v1/responses/{response_id}
Cancel Responses
client.responses.cancel(stringresponseID, RequestOptionsoptions?): ResponseCancelResponse
POST/v1/responses/{response_id}/cancel
ModelsExpand Collapse
ActionClick { button, type, x, y }

A click action.

button: "left" | "right" | "wheel" | 2 more
One of the following:
"left"
"right"
"wheel"
"back"
"forward"
type: "click"
x: number
y: number
ActionDoubleClick { type, x, y }

A double click action.

type: "double_click"
x: number
y: number
ActionDrag { path, type }

A drag action.

path: Array<Path>
x: number
y: number
type: "drag"
ActionFind { pattern, type, url }

Action type "find": Searches for a pattern within a loaded page.

pattern: string
type: "find"
url: string
ActionKeyDown { keys, type }

Press and hold a key.

keys: Array<string>
type: "key_down"
ActionKeyUp { keys, type }

Release a held key.

keys: Array<string>
type: "key_up"
ActionKeypress { keys, type }

A collection of keypresses the model would like to perform.

keys: Array<string>
type: "keypress"
ActionMouseDown { type, x, y }

Press and hold the left mouse button at a position.

type: "mouse_down"
x: number
y: number
ActionMouseUp { type, x, y }

Release the left mouse button at a position.

type: "mouse_up"
x: number
y: number
ActionMove { type, x, y }

A mouse move action.

type: "move"
x: number
y: number
ActionOpenPage { type, url }

Action type "open_page" - Opens a specific URL from search results.

type: "open_page"
url: string
ActionPointAndType { text, type, x, y }

Click at a position then type text.

text: string
type: "point_and_type"
x: number
y: number
ActionScreenshot { type }

A screenshot action.

type: "screenshot"
ActionScroll { scroll_x, scroll_y, type, 2 more }

A scroll action.

scroll_x: number
scroll_y: number
type: "scroll"
x: number
y: number
ActionSearchSource { type, url }

A source used in the search.

type: "url"
url: string
ActionType { text, type }

An action to type in text.

text: string
type: "type"
ActionWait { type }

A wait action.

type: "wait"
AnnotationContainerFileCitation { container_id, end_index, file_id, 3 more }

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

container_id: string
end_index: number
file_id: string
filename: string
start_index: number
type: "container_file_citation"
AnnotationFileCitation { file_id, filename, index, type }

A citation to a file.

file_id: string
filename: string
index: number
type: "file_citation"
AnnotationFilePath { file_id, index, type }

A path to a file.

file_id: string
index: number
type: "file_path"
AnnotationURLCitation { end_index, start_index, title, 2 more }

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

end_index: number
start_index: number
title: string
type: "url_citation"
url: string
Logprob { token, bytes, logprob, top_logprobs }

The log probability of a token.

token: string
bytes: Array<number>
logprob: number
top_logprobs: Array<TopLogprob>
token: string
bytes: Array<number>
logprob: number
McpApprovalRequest { id, arguments, name, 2 more }

A request for human approval of a tool invocation.

id: string
arguments: string
name: string
server_label: string
type: "mcp_approval_request"
OutputImage { type, url }

The image output from the code interpreter.

type: "image"
url: string
OutputLogs { logs, type }

The logs output from the code interpreter.

logs: string
type: "logs"
PendingSafetyCheck { id, code, message }

A pending safety check for the computer call.

id: string
code?: string | null
message?: string | null
ResponseComputerToolCall { id, action, call_id, 3 more }

A tool call to a computer use tool.

See the computer use guide for more information.

id: string
action: ActionClick { button, type, x, y } | ActionDoubleClick { type, x, y } | ActionDrag { path, type } | 11 more

A click action.

One of the following:
ActionClick { button, type, x, y }

A click action.

button: "left" | "right" | "wheel" | 2 more
One of the following:
"left"
"right"
"wheel"
"back"
"forward"
type: "click"
x: number
y: number
ActionDoubleClick { type, x, y }

A double click action.

type: "double_click"
x: number
y: number
ActionDrag { path, type }

A drag action.

path: Array<Path>
x: number
y: number
type: "drag"
ActionKeypress { keys, type }

A collection of keypresses the model would like to perform.

keys: Array<string>
type: "keypress"
ActionMove { type, x, y }

A mouse move action.

type: "move"
x: number
y: number
ActionScreenshot { type }

A screenshot action.

type: "screenshot"
ActionScroll { scroll_x, scroll_y, type, 2 more }

A scroll action.

scroll_x: number
scroll_y: number
type: "scroll"
x: number
y: number
ActionType { text, type }

An action to type in text.

text: string
type: "type"
ActionWait { type }

A wait action.

type: "wait"
ActionPointAndType { text, type, x, y }

Click at a position then type text.

text: string
type: "point_and_type"
x: number
y: number
ActionMouseDown { type, x, y }

Press and hold the left mouse button at a position.

type: "mouse_down"
x: number
y: number
ActionMouseUp { type, x, y }

Release the left mouse button at a position.

type: "mouse_up"
x: number
y: number
ActionKeyDown { keys, type }

Press and hold a key.

keys: Array<string>
type: "key_down"
ActionKeyUp { keys, type }

Release a held key.

keys: Array<string>
type: "key_up"
call_id: string
pending_safety_checks: Array<PendingSafetyCheck { id, code, message } >
id: string
code?: string | null
message?: string | null
status: "in_progress" | "completed" | "incomplete"
One of the following:
"in_progress"
"completed"
"incomplete"
type: "computer_call"
ResponseFunctionToolCall { arguments, call_id, name, 3 more }

A tool call to run a function.

See the function calling guide for more information.

arguments: string
call_id: string
name: string
type: "function_call"
id?: string | null
status?: "in_progress" | "completed" | "incomplete" | null
One of the following:
"in_progress"
"completed"
"incomplete"
ResponseInputFileParam { type, file_data, file_id, 2 more }

A file input to the model.

type: "input_file"
file_data?: string
file_id?: string | null
file_url?: string
filename?: string
ResponseInputImageParam { detail, type, file_id, image_url }

An image input to the model.

Learn about image inputs.

detail: "low" | "high" | "auto"
One of the following:
"low"
"high"
"auto"
type: "input_image"
file_id?: string | null
image_url?: string | null
ResponseInputTextParam { text, type }

A text input to the model.

text: string
type: "input_text"
ResponseOutputMessage { id, content, role, 2 more }

An output message from the model.

id: string
content: Array<ResponseOutputText { annotations, text, type, logprobs } | ResponseOutputRefusal { refusal, type } >
One of the following:
ResponseOutputText { annotations, text, type, logprobs }

A text output from the model.

annotations: Array<AnnotationFileCitation { file_id, filename, index, type } | AnnotationURLCitation { end_index, start_index, title, 2 more } | AnnotationContainerFileCitation { container_id, end_index, file_id, 3 more } | AnnotationFilePath { file_id, index, type } >
One of the following:
AnnotationFileCitation { file_id, filename, index, type }

A citation to a file.

file_id: string
filename: string
index: number
type: "file_citation"
AnnotationURLCitation { end_index, start_index, title, 2 more }

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

end_index: number
start_index: number
title: string
type: "url_citation"
url: string
AnnotationContainerFileCitation { container_id, end_index, file_id, 3 more }

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

container_id: string
end_index: number
file_id: string
filename: string
start_index: number
type: "container_file_citation"
AnnotationFilePath { file_id, index, type }

A path to a file.

file_id: string
index: number
type: "file_path"
text: string
type: "output_text"
logprobs?: Array<Logprob { token, bytes, logprob, top_logprobs } > | null
token: string
bytes: Array<number>
logprob: number
top_logprobs: Array<TopLogprob>
token: string
bytes: Array<number>
logprob: number
ResponseOutputRefusal { refusal, type }

A refusal from the model.

refusal: string
type: "refusal"
role: "assistant"
status: "in_progress" | "completed" | "incomplete"
One of the following:
"in_progress"
"completed"
"incomplete"
type: "message"
ResponseOutputRefusal { refusal, type }

A refusal from the model.

refusal: string
type: "refusal"
ResponseOutputText { annotations, text, type, logprobs }

A text output from the model.

annotations: Array<AnnotationFileCitation { file_id, filename, index, type } | AnnotationURLCitation { end_index, start_index, title, 2 more } | AnnotationContainerFileCitation { container_id, end_index, file_id, 3 more } | AnnotationFilePath { file_id, index, type } >
One of the following:
AnnotationFileCitation { file_id, filename, index, type }

A citation to a file.

file_id: string
filename: string
index: number
type: "file_citation"
AnnotationURLCitation { end_index, start_index, title, 2 more }

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

end_index: number
start_index: number
title: string
type: "url_citation"
url: string
AnnotationContainerFileCitation { container_id, end_index, file_id, 3 more }

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

container_id: string
end_index: number
file_id: string
filename: string
start_index: number
type: "container_file_citation"
AnnotationFilePath { file_id, index, type }

A path to a file.

file_id: string
index: number
type: "file_path"
text: string
type: "output_text"
logprobs?: Array<Logprob { token, bytes, logprob, top_logprobs } > | null
token: string
bytes: Array<number>
logprob: number
top_logprobs: Array<TopLogprob>
token: string
bytes: Array<number>
logprob: number
Summary { text, type }

A summary text from the model.

text: string
type: "summary_text"