Create Responses
Create Responses
Body ParametersJSONExpand Collapse
input: string or array of object { content, role, type } or object { content, role, status, type } or object { id, content, role, 2 more } or 41 more
UnionMember1 = array of object { content, role, type } or object { content, role, status, type } or object { id, content, role, 2 more } or 41 more
EasyInputMessageParam = object { content, role, type } A message input to the model with a role indicating instruction following
hierarchy. Instructions given with the developer or system role take
precedence over instructions given with the user role. Messages with the
assistant role are presumed to have been generated by the model in previous
interactions.
A message input to the model with a role indicating instruction following
hierarchy. Instructions given with the developer or system role take
precedence over instructions given with the user role. Messages with the
assistant role are presumed to have been generated by the model in previous
interactions.
content: string or array of ResponseInputTextParam { text, type } or ResponseInputImageParam { detail, type, file_id, image_url } or ResponseInputFileParam { type, file_data, file_id, 2 more }
UnionMember1 = array of ResponseInputTextParam { text, type } or ResponseInputImageParam { detail, type, file_id, image_url } or ResponseInputFileParam { type, file_data, file_id, 2 more }
ResponseInputTextParam = object { text, type } A text input to the model.
A text input to the model.
ResponseInputImageParam = object { detail, type, file_id, image_url } An image input to the model.
Learn about image inputs.
An image input to the model.
Learn about image inputs.
detail: "low" or "high" or "auto"
ResponseInputFileParam = object { type, file_data, file_id, 2 more } A file input to the model.
A file input to the model.
role: "user" or "assistant" or "system" or "developer"
Message = object { content, role, status, type } A message input to the model with a role indicating instruction following
hierarchy. Instructions given with the developer or system role take
precedence over instructions given with the user role.
A message input to the model with a role indicating instruction following
hierarchy. Instructions given with the developer or system role take
precedence over instructions given with the user role.
content: array of ResponseInputTextParam { text, type } or ResponseInputImageParam { detail, type, file_id, image_url } or ResponseInputFileParam { type, file_data, file_id, 2 more }
ResponseInputTextParam = object { text, type } A text input to the model.
A text input to the model.
ResponseInputImageParam = object { detail, type, file_id, image_url } An image input to the model.
Learn about image inputs.
An image input to the model.
Learn about image inputs.
detail: "low" or "high" or "auto"
ResponseInputFileParam = object { type, file_data, file_id, 2 more } A file input to the model.
A file input to the model.
role: "user" or "system" or "developer"
status: optional "in_progress" or "completed" or "incomplete"
ResponseOutputMessageParam = object { id, content, role, 2 more } An output message from the model.
An output message from the model.
content: array of object { annotations, text, type, logprobs } or object { refusal, type }
ResponseOutputTextParam = object { annotations, text, type, logprobs } A text output from the model.
A text output from the model.
annotations: array of AnnotationFileCitation { file_id, filename, index, type } or AnnotationURLCitation { end_index, start_index, title, 2 more } or AnnotationContainerFileCitation { container_id, end_index, file_id, 3 more } or AnnotationFilePath { file_id, index, type }
AnnotationFileCitation = object { file_id, filename, index, type } A citation to a file.
A citation to a file.
AnnotationURLCitation = object { end_index, start_index, title, 2 more } A citation for a web resource used to generate a model response.
A citation for a web resource used to generate a model response.
AnnotationContainerFileCitation = object { container_id, end_index, file_id, 3 more } A citation for a container file used to generate a model response.
A citation for a container file used to generate a model response.
AnnotationFilePath = object { file_id, index, type } A path to a file.
A path to a file.
top_logprobs: array of object { token, bytes, logprob }
ResponseOutputRefusalParam = object { refusal, type } A refusal from the model.
A refusal from the model.
status: "in_progress" or "completed" or "incomplete"
ResponseFileSearchToolCallParam = object { id, queries, status, 2 more } The results of a file search tool call.
See the
file search guide for more information.
The results of a file search tool call.
See the file search guide for more information.
status: "in_progress" or "searching" or "completed" or 2 more
results: optional array of object { attributes, file_id, filename, 2 more }
attributes: optional map[string or number or boolean]
ResponseComputerToolCallParam = object { id, action, call_id, 3 more } A tool call to a computer use tool.
See the
computer use guide for more information.
A tool call to a computer use tool.
See the computer use guide for more information.
action: ActionClick { button, type, x, y } or ActionDoubleClick { type, x, y } or ActionDrag { path, type } or 11 moreA click action.
A click action.
ActionClick = object { button, type, x, y } A click action.
A click action.
button: "left" or "right" or "wheel" or 2 more
ActionDoubleClick = object { type, x, y } A double click action.
A double click action.
ActionDrag = object { path, type } A drag action.
A drag action.
path: array of object { x, y }
ActionKeypress = object { keys, type } A collection of keypresses the model would like to perform.
A collection of keypresses the model would like to perform.
ActionMove = object { type, x, y } A mouse move action.
A mouse move action.
ActionScreenshot = object { type } A screenshot action.
A screenshot action.
ActionScroll = object { scroll_x, scroll_y, type, 2 more } A scroll action.
A scroll action.
ActionType = object { text, type } An action to type in text.
An action to type in text.
ActionWait = object { type } A wait action.
A wait action.
ActionPointAndType = object { text, type, x, y } Click at a position then type text.
Click at a position then type text.
ActionMouseDown = object { type, x, y } Press and hold the left mouse button at a position.
Press and hold the left mouse button at a position.
ActionMouseUp = object { type, x, y } Release the left mouse button at a position.
Release the left mouse button at a position.
ActionKeyDown = object { keys, type } Press and hold a key.
Press and hold a key.
ActionKeyUp = object { keys, type } Release a held key.
Release a held key.
pending_safety_checks: array of object { id, code, message }
status: "in_progress" or "completed" or "incomplete"
ComputerCallOutput = object { call_id, output, type, 3 more } The output of a computer tool call.
The output of a computer tool call.
output: object { type, file_id, image_url } A computer screenshot image used with the computer use tool.
A computer screenshot image used with the computer use tool.
acknowledged_safety_checks: optional array of object { id, code, message }
status: optional "in_progress" or "completed" or "incomplete"
ResponseFunctionWebSearchParam = object { id, action, status, type } The results of a web search tool call.
See the
web search guide for more information.
The results of a web search tool call.
See the web search guide for more information.
action: object { query, type, queries, sources } or ActionOpenPage { type, url } or ActionFind { pattern, type, url } Action type "search" - Performs a web search query.
Action type "search" - Performs a web search query.
ActionSearch = object { query, type, queries, sources } Action type "search" - Performs a web search query.
Action type "search" - Performs a web search query.
ActionOpenPage = object { type, url } Action type "open_page" - Opens a specific URL from search results.
Action type "open_page" - Opens a specific URL from search results.
ActionFind = object { pattern, type, url } Action type "find": Searches for a pattern within a loaded page.
Action type "find": Searches for a pattern within a loaded page.
status: "in_progress" or "searching" or "completed" or "failed"
ResponseFunctionToolCallParam = object { arguments, call_id, name, 3 more } A tool call to run a function.
See the
function calling guide for more information.
A tool call to run a function.
See the function calling guide for more information.
status: optional "in_progress" or "completed" or "incomplete"
FunctionCallOutput = object { call_id, output, type, 2 more } The output of a function tool call.
The output of a function tool call.
output: string or array of object { text, type } or object { type, detail, file_id, image_url } or object { type, file_data, file_id, 2 more }
UnionMember1 = array of object { text, type } or object { type, detail, file_id, image_url } or object { type, file_data, file_id, 2 more }
ResponseInputTextContentParam = object { text, type } A text input to the model.
A text input to the model.
ResponseInputImageContentParam = object { type, detail, file_id, image_url } An image input to the model.
Learn about image inputs
An image input to the model.
Learn about image inputs
detail: optional "low" or "high" or "auto"
ResponseInputFileContentParam = object { type, file_data, file_id, 2 more } A file input to the model.
A file input to the model.
status: optional "in_progress" or "completed" or "incomplete"
ResponseReasoningItemParam = object { id, summary, type, 3 more } A description of the chain of thought used by a reasoning model while generating
a response. Be sure to include these items in your input to the Responses API
for subsequent turns of a conversation if you are manually
managing context.
A description of the chain of thought used by a reasoning model while generating
a response. Be sure to include these items in your input to the Responses API
for subsequent turns of a conversation if you are manually
managing context.
content: optional array of object { text, type }
status: optional "in_progress" or "completed" or "incomplete"
ResponseCompactionItemParamParam = object { encrypted_content, type, id } A compaction item generated by the v1/responses/compact API.
A compaction item generated by the v1/responses/compact API.
ImageGenerationCall = object { id, result, status, type } An image generation request made by the model.
An image generation request made by the model.
status: "in_progress" or "completed" or "generating" or "failed"
ResponseCodeInterpreterToolCallParam = object { id, code, container_id, 3 more } A tool call to run code.
A tool call to run code.
OutputLogs = object { logs, type } The logs output from the code interpreter.
The logs output from the code interpreter.
OutputImage = object { type, url } The image output from the code interpreter.
The image output from the code interpreter.
status: "in_progress" or "completed" or "incomplete" or 2 more
LocalShellCall = object { id, action, call_id, 2 more } A tool call to run a command on the local shell.
A tool call to run a command on the local shell.
action: object { command, env, type, 3 more } Execute a shell command on the server.
Execute a shell command on the server.
status: "in_progress" or "completed" or "incomplete"
LocalShellCallOutput = object { id, output, type, status } The output of a local shell tool call.
The output of a local shell tool call.
status: optional "in_progress" or "completed" or "incomplete"
ShellCall = object { action, call_id, type, 2 more } A tool representing a request to execute one or more shell commands.
A tool representing a request to execute one or more shell commands.
action: object { commands, max_output_length, timeout_ms } The shell commands and limits that describe how to run the tool call.
The shell commands and limits that describe how to run the tool call.
status: optional "in_progress" or "completed" or "incomplete"
ShellCallOutput = object { call_id, output, type, 2 more } The streamed output items emitted by a shell tool call.
The streamed output items emitted by a shell tool call.
output: array of object { outcome, stderr, stdout }
outcome: object { type } or object { exit_code, type } Indicates that the shell call exceeded its configured time limit.
Indicates that the shell call exceeded its configured time limit.
OutcomeTimeout = object { type } Indicates that the shell call exceeded its configured time limit.
Indicates that the shell call exceeded its configured time limit.
OutcomeExit = object { exit_code, type } Indicates that the shell commands finished and returned an exit code.
Indicates that the shell commands finished and returned an exit code.
ApplyPatchCall = object { call_id, operation, status, 2 more } A tool call representing a request to create, delete, or update files using diff patches.
A tool call representing a request to create, delete, or update files using diff patches.
operation: object { diff, path, type } or object { path, type } or object { diff, path, type } Instruction for creating a new file via the apply_patch tool.
Instruction for creating a new file via the apply_patch tool.
ApplyPatchCallOperationCreateFile = object { diff, path, type } Instruction for creating a new file via the apply_patch tool.
Instruction for creating a new file via the apply_patch tool.
ApplyPatchCallOperationDeleteFile = object { path, type } Instruction for deleting an existing file via the apply_patch tool.
Instruction for deleting an existing file via the apply_patch tool.
ApplyPatchCallOperationUpdateFile = object { diff, path, type } Instruction for updating an existing file via the apply_patch tool.
Instruction for updating an existing file via the apply_patch tool.
status: "in_progress" or "completed"
ApplyPatchCallOutput = object { call_id, status, type, 2 more } The streamed output emitted by an apply patch tool call.
The streamed output emitted by an apply patch tool call.
status: "completed" or "failed"
McpListTools = object { id, server_label, tools, 2 more } A list of tools available on an MCP server.
A list of tools available on an MCP server.
tools: array of object { input_schema, name, annotations, description }
McpApprovalRequest = object { id, arguments, name, 2 more } A request for human approval of a tool invocation.
A request for human approval of a tool invocation.
McpApprovalResponse = object { approval_request_id, approve, type, 2 more } A response to an MCP approval request.
A response to an MCP approval request.
McpCall = object { id, arguments, name, 6 more } An invocation of a tool on an MCP server.
An invocation of a tool on an MCP server.
status: optional "in_progress" or "completed" or "incomplete" or 2 more
ResponseCustomToolCallOutputParam = object { call_id, output, type, id } The output of a custom tool call from your code, being sent back to the model.
The output of a custom tool call from your code, being sent back to the model.
output: string or array of ResponseInputTextParam { text, type } or ResponseInputImageParam { detail, type, file_id, image_url } or ResponseInputFileParam { type, file_data, file_id, 2 more }
UnionMember1 = array of ResponseInputTextParam { text, type } or ResponseInputImageParam { detail, type, file_id, image_url } or ResponseInputFileParam { type, file_data, file_id, 2 more }
ResponseInputTextParam = object { text, type } A text input to the model.
A text input to the model.
ResponseInputImageParam = object { detail, type, file_id, image_url } An image input to the model.
Learn about image inputs.
An image input to the model.
Learn about image inputs.
detail: "low" or "high" or "auto"
ResponseInputFileParam = object { type, file_data, file_id, 2 more } A file input to the model.
A file input to the model.
ResponseCustomToolCallParam = object { call_id, input, name, 2 more } A call to a custom tool created by the model.
A call to a custom tool created by the model.
ItemReference = object { id, type } An internal identifier for an item to reference.
An internal identifier for an item to reference.
ResponseOutputMessage = object { id, content, role, 2 more } An output message from the model.
An output message from the model.
content: array of object { annotations, text, type, logprobs } or object { refusal, type }
ResponseOutputText = object { annotations, text, type, logprobs } A text output from the model.
A text output from the model.
annotations: array of AnnotationFileCitation { file_id, filename, index, type } or AnnotationURLCitation { end_index, start_index, title, 2 more } or AnnotationContainerFileCitation { container_id, end_index, file_id, 3 more } or AnnotationFilePath { file_id, index, type }
AnnotationFileCitation = object { file_id, filename, index, type } A citation to a file.
A citation to a file.
AnnotationURLCitation = object { end_index, start_index, title, 2 more } A citation for a web resource used to generate a model response.
A citation for a web resource used to generate a model response.
AnnotationContainerFileCitation = object { container_id, end_index, file_id, 3 more } A citation for a container file used to generate a model response.
A citation for a container file used to generate a model response.
AnnotationFilePath = object { file_id, index, type } A path to a file.
A path to a file.
top_logprobs: array of object { token, bytes, logprob }
ResponseOutputRefusal = object { refusal, type } A refusal from the model.
A refusal from the model.
status: "in_progress" or "completed" or "incomplete"
ResponseFileSearchToolCall = object { id, queries, status, 2 more } The results of a file search tool call.
See the
file search guide for more information.
The results of a file search tool call.
See the file search guide for more information.
status: "in_progress" or "searching" or "completed" or 2 more
results: optional array of object { attributes, file_id, filename, 2 more }
attributes: optional map[string or number or boolean]
ResponseFunctionToolCall = object { arguments, call_id, name, 3 more } A tool call to run a function.
See the
function calling guide for more information.
A tool call to run a function.
See the function calling guide for more information.
status: optional "in_progress" or "completed" or "incomplete"
ResponseFunctionWebSearch = object { id, action, status, type } The results of a web search tool call.
See the
web search guide for more information.
The results of a web search tool call.
See the web search guide for more information.
action: object { query, type, queries, sources } or ActionOpenPage { type, url } or ActionFind { pattern, type, url } Action type "search" - Performs a web search query.
Action type "search" - Performs a web search query.
ActionSearch = object { query, type, queries, sources } Action type "search" - Performs a web search query.
Action type "search" - Performs a web search query.
ActionOpenPage = object { type, url } Action type "open_page" - Opens a specific URL from search results.
Action type "open_page" - Opens a specific URL from search results.
ActionFind = object { pattern, type, url } Action type "find": Searches for a pattern within a loaded page.
Action type "find": Searches for a pattern within a loaded page.
status: "in_progress" or "searching" or "completed" or "failed"
ResponseComputerToolCall = object { id, action, call_id, 3 more } A tool call to a computer use tool.
See the
computer use guide for more information.
A tool call to a computer use tool.
See the computer use guide for more information.
action: ActionClick { button, type, x, y } or ActionDoubleClick { type, x, y } or ActionDrag { path, type } or 11 moreA click action.
A click action.
ActionClick = object { button, type, x, y } A click action.
A click action.
button: "left" or "right" or "wheel" or 2 more
ActionDoubleClick = object { type, x, y } A double click action.
A double click action.
ActionDrag = object { path, type } A drag action.
A drag action.
path: array of object { x, y }
ActionKeypress = object { keys, type } A collection of keypresses the model would like to perform.
A collection of keypresses the model would like to perform.
ActionMove = object { type, x, y } A mouse move action.
A mouse move action.
ActionScreenshot = object { type } A screenshot action.
A screenshot action.
ActionScroll = object { scroll_x, scroll_y, type, 2 more } A scroll action.
A scroll action.
ActionType = object { text, type } An action to type in text.
An action to type in text.
ActionWait = object { type } A wait action.
A wait action.
ActionPointAndType = object { text, type, x, y } Click at a position then type text.
Click at a position then type text.
ActionMouseDown = object { type, x, y } Press and hold the left mouse button at a position.
Press and hold the left mouse button at a position.
ActionMouseUp = object { type, x, y } Release the left mouse button at a position.
Release the left mouse button at a position.
ActionKeyDown = object { keys, type } Press and hold a key.
Press and hold a key.
ActionKeyUp = object { keys, type } Release a held key.
Release a held key.
pending_safety_checks: array of object { id, code, message }
status: "in_progress" or "completed" or "incomplete"
ResponseReasoningItem = object { id, summary, type, 3 more } A description of the chain of thought used by a reasoning model while generating
a response. Be sure to include these items in your input to the Responses API
for subsequent turns of a conversation if you are manually
managing context.
A description of the chain of thought used by a reasoning model while generating
a response. Be sure to include these items in your input to the Responses API
for subsequent turns of a conversation if you are manually
managing context.
content: optional array of object { text, type }
status: optional "in_progress" or "completed" or "incomplete"
ResponseCompactionItem = object { id, encrypted_content, type, created_by } A compaction item generated by the v1/responses/compact API.
A compaction item generated by the v1/responses/compact API.
ImageGenerationCall = object { id, status, type, result } An image generation request made by the model.
An image generation request made by the model.
status: "in_progress" or "completed" or "generating" or "failed"
ResponseCodeInterpreterToolCall = object { id, container_id, status, 3 more } A tool call to run code.
A tool call to run code.
status: "in_progress" or "completed" or "incomplete" or 2 more
OutputLogs = object { logs, type } The logs output from the code interpreter.
The logs output from the code interpreter.
OutputImage = object { type, url } The image output from the code interpreter.
The image output from the code interpreter.
LocalShellCall = object { id, action, call_id, 2 more } A tool call to run a command on the local shell.
A tool call to run a command on the local shell.
action: object { command, env, type, 3 more } Execute a shell command on the server.
Execute a shell command on the server.
status: "in_progress" or "completed" or "incomplete"
ResponseFunctionShellToolCall = object { id, action, call_id, 3 more } A tool call that executes one or more shell commands in a managed environment.
A tool call that executes one or more shell commands in a managed environment.
action: object { commands, max_output_length, timeout_ms } The shell commands and limits that describe how to run the tool call.
The shell commands and limits that describe how to run the tool call.
status: "in_progress" or "completed" or "incomplete"
ResponseFunctionShellToolCallOutput = object { id, call_id, output, 4 more } The output of a shell tool call that was emitted.
The output of a shell tool call that was emitted.
output: array of object { outcome, stderr, stdout, created_by }
outcome: object { type } or object { exit_code, type } Indicates that the shell call exceeded its configured time limit.
Indicates that the shell call exceeded its configured time limit.
OutputOutcomeTimeout = object { type } Indicates that the shell call exceeded its configured time limit.
Indicates that the shell call exceeded its configured time limit.
OutputOutcomeExit = object { exit_code, type } Indicates that the shell commands finished and returned an exit code.
Indicates that the shell commands finished and returned an exit code.
status: "in_progress" or "completed" or "incomplete"
ResponseApplyPatchToolCall = object { id, call_id, operation, 3 more } A tool call that applies file diffs by creating, deleting, or updating files.
A tool call that applies file diffs by creating, deleting, or updating files.
operation: object { diff, path, type } or object { path, type } or object { diff, path, type } Instruction describing how to create a file via the apply_patch tool.
Instruction describing how to create a file via the apply_patch tool.
OperationCreateFile = object { diff, path, type } Instruction describing how to create a file via the apply_patch tool.
Instruction describing how to create a file via the apply_patch tool.
OperationDeleteFile = object { path, type } Instruction describing how to delete a file via the apply_patch tool.
Instruction describing how to delete a file via the apply_patch tool.
OperationUpdateFile = object { diff, path, type } Instruction describing how to update a file via the apply_patch tool.
Instruction describing how to update a file via the apply_patch tool.
status: "in_progress" or "completed"
ResponseApplyPatchToolCallOutput = object { id, call_id, status, 3 more } The output emitted by an apply patch tool call.
The output emitted by an apply patch tool call.
status: "completed" or "failed"
McpCall = object { id, arguments, name, 6 more } An invocation of a tool on an MCP server.
An invocation of a tool on an MCP server.
status: optional "in_progress" or "completed" or "incomplete" or 2 more
McpListTools = object { id, server_label, tools, 2 more } A list of tools available on an MCP server.
A list of tools available on an MCP server.
tools: array of object { input_schema, name, annotations, description }
McpApprovalRequest = object { id, arguments, name, 2 more } A request for human approval of a tool invocation.
A request for human approval of a tool invocation.
ResponseCustomToolCall = object { call_id, input, name, 2 more } A call to a custom tool created by the model.
A call to a custom tool created by the model.
If specified, the prefix cache will be salted with the provided string to prevent an attacker to guess prompts in multi-user environments. The salt should be random, protected from access by 3rd parties, and long enough to be unpredictable (e.g., 43 characters base64-encoded, corresponding to 256 bit).
Dictates whether or not to return messages as part of the response object. Currently only supported fornon-background and gpt-oss only.
include: optional array of "code_interpreter_call.outputs" or "computer_call_output.output.image_url" or "file_search_call.results" or 3 more
Additional kwargs to pass to the HF processor.
previous_input_messages: optional array of Message { author, channel, content, 2 more } or map[unknown]
Message = object { author, channel, content, 2 more }
author: object { role, name }
role: "user" or "assistant" or "system" or 2 moreThe role of a message author (mirrors chat::Role).
The role of a message author (mirrors chat::Role).
The priority of the request (lower means earlier handling; default: 0). Any priority other than 0 will raise an error if the served model does not use priority scheduling.
prompt: optional object { id, variables, version } Reference to a prompt template and its variables.
Learn more.
Reference to a prompt template and its variables. Learn more.
variables: optional map[string or object { text, type } or object { detail, type, file_id, image_url } or object { type, file_data, file_id, 2 more } ]
ResponseInputText = object { text, type } A text input to the model.
A text input to the model.
ResponseInputImage = object { detail, type, file_id, image_url } An image input to the model.
Learn about image inputs.
An image input to the model.
Learn about image inputs.
detail: "low" or "high" or "auto"
ResponseInputFile = object { type, file_data, file_id, 2 more } A file input to the model.
A file input to the model.
A key that was used to read from or write to the prompt cache.Note: This field has not been implemented yet and vLLM will ignore it.
reasoning: optional object { effort, generate_summary, summary } gpt-5 and o-series models only
Configuration options for
reasoning models.
gpt-5 and o-series models only
Configuration options for reasoning models.
effort: optional "none" or "minimal" or "low" or 3 more
generate_summary: optional "auto" or "concise" or "detailed"
summary: optional "auto" or "concise" or "detailed"
The request_id related to this request. If the caller does not set it, a random_uuid will be generated. This id is used through out the inference process and return in response.
service_tier: optional "auto" or "default" or "flex" or 2 more
text: optional object { format, verbosity } Configuration options for a text response from the model.
Can be plain
text or structured JSON data. Learn more:
Configuration options for a text response from the model.
Can be plain text or structured JSON data. Learn more:
format: optional object { type } or object { name, schema, type, 2 more } or object { type } Default response format. Used to generate text responses.
Default response format. Used to generate text responses.
ResponseFormatText = object { type } Default response format. Used to generate text responses.
Default response format. Used to generate text responses.
ResponseFormatTextJsonSchemaConfig = object { name, schema, type, 2 more } JSON Schema response format.
Used to generate structured JSON responses.
Learn more about Structured Outputs.
JSON Schema response format.
Used to generate structured JSON responses. Learn more about Structured Outputs.
ResponseFormatJsonObject = object { type } JSON object response format.
An older method of generating JSON responses.
Using json_schema is recommended for models that support it. Note that the
model will not generate JSON without a system or user message instructing it
to do so.
JSON object response format.
An older method of generating JSON responses.
Using json_schema is recommended for models that support it. Note that the
model will not generate JSON without a system or user message instructing it
to do so.
verbosity: optional "low" or "medium" or "high"
tool_choice: optional "none" or "auto" or "required" or object { mode, tools, type } or object { type } or 2 moreConstrains the tools available to the model to a pre-defined set.
Constrains the tools available to the model to a pre-defined set.
UnionMember0 = "none" or "auto" or "required"
ToolChoiceAllowed = object { mode, tools, type } Constrains the tools available to the model to a pre-defined set.
Constrains the tools available to the model to a pre-defined set.
mode: "auto" or "required"
ToolChoiceTypes = object { type } Indicates that the model should use a built-in tool to generate a response.
Learn more about built-in tools.
Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.
ToolChoiceFunction = object { name, type } Use this option to force the model to call a specific function.
Use this option to force the model to call a specific function.
ToolChoiceCustom = object { name, type } Use this option to force the model to call a specific custom tool.
Use this option to force the model to call a specific custom tool.
tools: optional array of object { name, type, description, 2 more } or object { name, type, description, format } or object { display_height, display_width, environment, type }
FunctionTool = object { name, type, description, 2 more } Defines a function in your own code the model can choose to call.
Learn more about function calling.
Defines a function in your own code the model can choose to call.
Learn more about function calling.
CustomTool = object { name, type, description, format } A custom tool that processes input using a specified format.
Learn more about custom tools
A custom tool that processes input using a specified format.
Learn more about custom tools
format: optional object { type } or object { definition, syntax, type } Unconstrained free-form text.
Unconstrained free-form text.
Text = object { type } Unconstrained free-form text.
Unconstrained free-form text.
Grammar = object { definition, syntax, type } A grammar defined by the user.
A grammar defined by the user.
syntax: "lark" or "regex"
ComputerTool = object { display_height, display_width, environment, type } A tool that controls a virtual computer.
Learn more about the computer tool.
A tool that controls a virtual computer.
Learn more about the computer tool.
environment: "windows" or "mac" or "linux" or 2 more
truncation: optional "auto" or "disabled"
ReturnsExpand Collapse
output: array of object { id, content, role, 2 more } or object { arguments, call_id, name, 3 more } or object { id, action, call_id, 3 more } or map[unknown]
ResponseOutputMessage = object { id, content, role, 2 more } An output message from the model.
An output message from the model.
content: array of object { annotations, text, type, logprobs } or object { refusal, type }
ResponseOutputText = object { annotations, text, type, logprobs } A text output from the model.
A text output from the model.
annotations: array of AnnotationFileCitation { file_id, filename, index, type } or AnnotationURLCitation { end_index, start_index, title, 2 more } or AnnotationContainerFileCitation { container_id, end_index, file_id, 3 more } or AnnotationFilePath { file_id, index, type }
AnnotationFileCitation = object { file_id, filename, index, type } A citation to a file.
A citation to a file.
AnnotationURLCitation = object { end_index, start_index, title, 2 more } A citation for a web resource used to generate a model response.
A citation for a web resource used to generate a model response.
AnnotationContainerFileCitation = object { container_id, end_index, file_id, 3 more } A citation for a container file used to generate a model response.
A citation for a container file used to generate a model response.
AnnotationFilePath = object { file_id, index, type } A path to a file.
A path to a file.
top_logprobs: array of object { token, bytes, logprob }
ResponseOutputRefusal = object { refusal, type } A refusal from the model.
A refusal from the model.
status: "in_progress" or "completed" or "incomplete"
ResponseFunctionToolCall = object { arguments, call_id, name, 3 more } A tool call to run a function.
See the
function calling guide for more information.
A tool call to run a function.
See the function calling guide for more information.
status: optional "in_progress" or "completed" or "incomplete"
ResponseComputerToolCall = object { id, action, call_id, 3 more } A tool call to a computer use tool.
See the
computer use guide for more information.
A tool call to a computer use tool.
See the computer use guide for more information.
action: ActionClick { button, type, x, y } or ActionDoubleClick { type, x, y } or ActionDrag { path, type } or 11 moreA click action.
A click action.
ActionClick = object { button, type, x, y } A click action.
A click action.
button: "left" or "right" or "wheel" or 2 more
ActionDoubleClick = object { type, x, y } A double click action.
A double click action.
ActionDrag = object { path, type } A drag action.
A drag action.
path: array of object { x, y }
ActionKeypress = object { keys, type } A collection of keypresses the model would like to perform.
A collection of keypresses the model would like to perform.
ActionMove = object { type, x, y } A mouse move action.
A mouse move action.
ActionScreenshot = object { type } A screenshot action.
A screenshot action.
ActionScroll = object { scroll_x, scroll_y, type, 2 more } A scroll action.
A scroll action.
ActionType = object { text, type } An action to type in text.
An action to type in text.
ActionWait = object { type } A wait action.
A wait action.
ActionPointAndType = object { text, type, x, y } Click at a position then type text.
Click at a position then type text.
ActionMouseDown = object { type, x, y } Press and hold the left mouse button at a position.
Press and hold the left mouse button at a position.
ActionMouseUp = object { type, x, y } Release the left mouse button at a position.
Release the left mouse button at a position.
ActionKeyDown = object { keys, type } Press and hold a key.
Press and hold a key.
ActionKeyUp = object { keys, type } Release a held key.
Release a held key.
pending_safety_checks: array of object { id, code, message }
status: "in_progress" or "completed" or "incomplete"
status: "completed" or "failed" or "in_progress" or 2 more
usage: optional object { input_tokens, output_tokens, total_tokens }
Create Responses
curl https://api.tzafon.ai/v1/responses \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $TZAFON_API_KEY" \
-d '{
"input": "string"
}'{
"id": "id",
"created_at": 0,
"model": "model",
"object": "response",
"output": [
{
"id": "id",
"content": [
{
"annotations": [
{
"file_id": "file_id",
"filename": "filename",
"index": 0,
"type": "file_citation"
}
],
"text": "text",
"type": "output_text",
"logprobs": [
{
"token": "token",
"bytes": [
0
],
"logprob": 0,
"top_logprobs": [
{
"token": "token",
"bytes": [
0
],
"logprob": 0
}
]
}
]
}
],
"role": "assistant",
"status": "in_progress",
"type": "message"
}
],
"status": "completed",
"error": {
"foo": "bar"
},
"tools": [
{
"foo": "bar"
}
],
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0
}
}Returns Examples
{
"id": "id",
"created_at": 0,
"model": "model",
"object": "response",
"output": [
{
"id": "id",
"content": [
{
"annotations": [
{
"file_id": "file_id",
"filename": "filename",
"index": 0,
"type": "file_citation"
}
],
"text": "text",
"type": "output_text",
"logprobs": [
{
"token": "token",
"bytes": [
0
],
"logprob": 0,
"top_logprobs": [
{
"token": "token",
"bytes": [
0
],
"logprob": 0
}
]
}
]
}
],
"role": "assistant",
"status": "in_progress",
"type": "message"
}
],
"status": "completed",
"error": {
"foo": "bar"
},
"tools": [
{
"foo": "bar"
}
],
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0
}
}