Skip to content

Run OpenAI Responses API (OpenAI only)

client.Responses.New(ctx, body) (*ResponseNewResponseUnion, error)
POST/v5/responses

Runs inference using the OpenAI Responses API contract, taking an input rather than a chat messages array.

This endpoint is restricted to OpenAI-vendor models: requests whose model (vendor/name) resolves to any other vendor are rejected with an unsupported-vendor error, unlike /v5/chat/completions and /v5/inference which support many vendors. Use it when you specifically need Responses API features such as previous_response_id chaining, instructions, or store; use /v5/chat/completions for the standard messages-based chat contract. When stream is set the response streams as server-sent events; otherwise a single response object is returned.

ParametersExpand Collapse
body ResponseNewParams
Input param.Field[ResponseNewParamsInputUnion]
string
type ResponseNewParamsInputInputItems []ResponseNewParamsInputInputItemUnion
One of the following:
type ResponseNewParamsInputInputItemEasyInputMessageParam struct{…}

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 ResponseNewParamsInputInputItemEasyInputMessageParamContentUnion
One of the following:
string
type ResponseNewParamsInputInputItemEasyInputMessageParamContentInputItems []ResponseNewParamsInputInputItemEasyInputMessageParamContentInputItemUnion
One of the following:
type OpenAIResponseInputTextParamResp struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImageParamResp struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageParamDetail
One of the following:
const OpenAIResponseInputImageParamDetailLow OpenAIResponseInputImageParamDetail = "low"
const OpenAIResponseInputImageParamDetailHigh OpenAIResponseInputImageParamDetail = "high"
const OpenAIResponseInputImageParamDetailAuto OpenAIResponseInputImageParamDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFileParamResp struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Role string
One of the following:
const ResponseNewParamsInputInputItemEasyInputMessageParamRoleUser ResponseNewParamsInputInputItemEasyInputMessageParamRole = "user"
const ResponseNewParamsInputInputItemEasyInputMessageParamRoleAssistant ResponseNewParamsInputInputItemEasyInputMessageParamRole = "assistant"
const ResponseNewParamsInputInputItemEasyInputMessageParamRoleSystem ResponseNewParamsInputInputItemEasyInputMessageParamRole = "system"
const ResponseNewParamsInputInputItemEasyInputMessageParamRoleDeveloper ResponseNewParamsInputInputItemEasyInputMessageParamRole = "developer"
Phase stringOptional
One of the following:
const ResponseNewParamsInputInputItemEasyInputMessageParamPhaseCommentary ResponseNewParamsInputInputItemEasyInputMessageParamPhase = "commentary"
const ResponseNewParamsInputInputItemEasyInputMessageParamPhaseFinalAnswer ResponseNewParamsInputInputItemEasyInputMessageParamPhase = "final_answer"
Type stringOptional
type ResponseNewParamsInputInputItemMessage struct{…}

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 []ResponseNewParamsInputInputItemMessageContentUnion
One of the following:
type OpenAIResponseInputTextParamResp struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImageParamResp struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageParamDetail
One of the following:
const OpenAIResponseInputImageParamDetailLow OpenAIResponseInputImageParamDetail = "low"
const OpenAIResponseInputImageParamDetailHigh OpenAIResponseInputImageParamDetail = "high"
const OpenAIResponseInputImageParamDetailAuto OpenAIResponseInputImageParamDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFileParamResp struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Role string
One of the following:
const ResponseNewParamsInputInputItemMessageRoleUser ResponseNewParamsInputInputItemMessageRole = "user"
const ResponseNewParamsInputInputItemMessageRoleSystem ResponseNewParamsInputInputItemMessageRole = "system"
const ResponseNewParamsInputInputItemMessageRoleDeveloper ResponseNewParamsInputInputItemMessageRole = "developer"
Status stringOptional
One of the following:
const ResponseNewParamsInputInputItemMessageStatusInProgress ResponseNewParamsInputInputItemMessageStatus = "in_progress"
const ResponseNewParamsInputInputItemMessageStatusCompleted ResponseNewParamsInputInputItemMessageStatus = "completed"
const ResponseNewParamsInputInputItemMessageStatusIncomplete ResponseNewParamsInputInputItemMessageStatus = "incomplete"
Type stringOptional
type ResponseNewParamsInputInputItemResponseOutputMessageParam struct{…}

An output message from the model.

ID string
Content []ResponseNewParamsInputInputItemResponseOutputMessageParamContentUnion
One of the following:
type ResponseNewParamsInputInputItemResponseOutputMessageParamContentResponseOutputTextParam struct{…}

A text output from the model.

Annotations []ResponseNewParamsInputInputItemResponseOutputMessageParamContentResponseOutputTextParamAnnotationUnion
One of the following:
type ResponseNewParamsInputInputItemResponseOutputMessageParamContentResponseOutputTextParamAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type ResponseNewParamsInputInputItemResponseOutputMessageParamContentResponseOutputTextParamAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type ResponseNewParamsInputInputItemResponseOutputMessageParamContentResponseOutputTextParamAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type ResponseNewParamsInputInputItemResponseOutputMessageParamContentResponseOutputTextParamAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []ResponseNewParamsInputInputItemResponseOutputMessageParamContentResponseOutputTextParamLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []ResponseNewParamsInputInputItemResponseOutputMessageParamContentResponseOutputTextParamLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type ResponseNewParamsInputInputItemResponseOutputMessageParamContentResponseOutputRefusalParam struct{…}

A refusal from the model.

Refusal string
Type Refusal
Role Assistant
Status string
One of the following:
const ResponseNewParamsInputInputItemResponseOutputMessageParamStatusInProgress ResponseNewParamsInputInputItemResponseOutputMessageParamStatus = "in_progress"
const ResponseNewParamsInputInputItemResponseOutputMessageParamStatusCompleted ResponseNewParamsInputInputItemResponseOutputMessageParamStatus = "completed"
const ResponseNewParamsInputInputItemResponseOutputMessageParamStatusIncomplete ResponseNewParamsInputInputItemResponseOutputMessageParamStatus = "incomplete"
Type Message
Phase stringOptional
One of the following:
const ResponseNewParamsInputInputItemResponseOutputMessageParamPhaseCommentary ResponseNewParamsInputInputItemResponseOutputMessageParamPhase = "commentary"
const ResponseNewParamsInputInputItemResponseOutputMessageParamPhaseFinalAnswer ResponseNewParamsInputInputItemResponseOutputMessageParamPhase = "final_answer"
type ResponseNewParamsInputInputItemResponseFileSearchToolCallParam struct{…}

The results of a file search tool call.

See the file search guide for more information.

ID string
Queries []string
Status string
One of the following:
const ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatusInProgress ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatus = "in_progress"
const ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatusSearching ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatus = "searching"
const ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatusCompleted ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatus = "completed"
const ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatusIncomplete ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatus = "incomplete"
const ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatusFailed ResponseNewParamsInputInputItemResponseFileSearchToolCallParamStatus = "failed"
Type FileSearchCall
Results []ResponseNewParamsInputInputItemResponseFileSearchToolCallParamResultOptional
Attributes map[string, ResponseNewParamsInputInputItemResponseFileSearchToolCallParamResultAttributeUnion]Optional
One of the following:
string
float64
bool
FileID stringOptional
Filename stringOptional
Score float64Optional
Text stringOptional
type ResponseNewParamsInputInputItemResponseComputerToolCallParam struct{…}

A tool call to a computer use tool.

See the computer use guide for more information.

ID string
Action ResponseNewParamsInputInputItemResponseComputerToolCallParamActionUnion

A click action.

One of the following:
type ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClick struct{…}

A click action.

Button string
One of the following:
const ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButtonLeft ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButton = "left"
const ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButtonRight ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButton = "right"
const ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButtonWheel ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButton = "wheel"
const ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButtonBack ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButton = "back"
const ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButtonForward ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionClickButton = "forward"
Type Click
X int64
Y int64
type ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionDoubleClick struct{…}

A double click action.

Type DoubleClick
X int64
Y int64
type ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionDrag struct{…}

A drag action.

Path []ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionDragPath
X int64
Y int64
Type Drag
type ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string
Type Keypress
type ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionMove struct{…}

A mouse move action.

Type Move
X int64
Y int64
type ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionScreenshot struct{…}

A screenshot action.

Type Screenshot
type ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionScroll struct{…}

A scroll action.

ScrollX int64
ScrollY int64
Type Scroll
X int64
Y int64
type ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionType struct{…}

An action to type in text.

Text string
Type Type
type ResponseNewParamsInputInputItemResponseComputerToolCallParamActionActionWait struct{…}

A wait action.

Type Wait
CallID string
PendingSafetyChecks []ResponseNewParamsInputInputItemResponseComputerToolCallParamPendingSafetyCheck
ID string
Code stringOptional
Message stringOptional
Status string
One of the following:
const ResponseNewParamsInputInputItemResponseComputerToolCallParamStatusInProgress ResponseNewParamsInputInputItemResponseComputerToolCallParamStatus = "in_progress"
const ResponseNewParamsInputInputItemResponseComputerToolCallParamStatusCompleted ResponseNewParamsInputInputItemResponseComputerToolCallParamStatus = "completed"
const ResponseNewParamsInputInputItemResponseComputerToolCallParamStatusIncomplete ResponseNewParamsInputInputItemResponseComputerToolCallParamStatus = "incomplete"
Type ComputerCall
type ResponseNewParamsInputInputItemComputerCallOutput struct{…}

The output of a computer tool call.

CallID string
Output ResponseNewParamsInputInputItemComputerCallOutputOutput

A computer screenshot image used with the computer use tool.

Type ComputerScreenshot
FileID stringOptional
ImageURL stringOptional
Type ComputerCallOutput
ID stringOptional
AcknowledgedSafetyChecks []ResponseNewParamsInputInputItemComputerCallOutputAcknowledgedSafetyCheckOptional
ID string
Code stringOptional
Message stringOptional
Status stringOptional
One of the following:
const ResponseNewParamsInputInputItemComputerCallOutputStatusInProgress ResponseNewParamsInputInputItemComputerCallOutputStatus = "in_progress"
const ResponseNewParamsInputInputItemComputerCallOutputStatusCompleted ResponseNewParamsInputInputItemComputerCallOutputStatus = "completed"
const ResponseNewParamsInputInputItemComputerCallOutputStatusIncomplete ResponseNewParamsInputInputItemComputerCallOutputStatus = "incomplete"
type ResponseNewParamsInputInputItemResponseFunctionWebSearchParam struct{…}

The results of a web search tool call.

See the web search guide for more information.

ID string
Action ResponseNewParamsInputInputItemResponseFunctionWebSearchParamActionUnion

Action type “search” - Performs a web search query.

One of the following:
type ResponseNewParamsInputInputItemResponseFunctionWebSearchParamActionActionSearch struct{…}

Action type “search” - Performs a web search query.

Query string
Type Search
Queries []stringOptional
Sources []ResponseNewParamsInputInputItemResponseFunctionWebSearchParamActionActionSearchSourceOptional
Type URL
URL string
type ResponseNewParamsInputInputItemResponseFunctionWebSearchParamActionActionOpenPage struct{…}

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

Type OpenPage
URL stringOptional
type ResponseNewParamsInputInputItemResponseFunctionWebSearchParamActionActionFind struct{…}

Action type “find_in_page”: Searches for a pattern within a loaded page.

Pattern string
Type FindInPage
URL string
Status string
One of the following:
const ResponseNewParamsInputInputItemResponseFunctionWebSearchParamStatusInProgress ResponseNewParamsInputInputItemResponseFunctionWebSearchParamStatus = "in_progress"
const ResponseNewParamsInputInputItemResponseFunctionWebSearchParamStatusSearching ResponseNewParamsInputInputItemResponseFunctionWebSearchParamStatus = "searching"
const ResponseNewParamsInputInputItemResponseFunctionWebSearchParamStatusCompleted ResponseNewParamsInputInputItemResponseFunctionWebSearchParamStatus = "completed"
const ResponseNewParamsInputInputItemResponseFunctionWebSearchParamStatusFailed ResponseNewParamsInputInputItemResponseFunctionWebSearchParamStatus = "failed"
Type WebSearchCall
type ResponseNewParamsInputInputItemResponseFunctionToolCallParam struct{…}

A tool call to run a function.

See the function calling guide for more information.

Arguments string
CallID string
Name string
Type FunctionCall
ID stringOptional
Status stringOptional
One of the following:
const ResponseNewParamsInputInputItemResponseFunctionToolCallParamStatusInProgress ResponseNewParamsInputInputItemResponseFunctionToolCallParamStatus = "in_progress"
const ResponseNewParamsInputInputItemResponseFunctionToolCallParamStatusCompleted ResponseNewParamsInputInputItemResponseFunctionToolCallParamStatus = "completed"
const ResponseNewParamsInputInputItemResponseFunctionToolCallParamStatusIncomplete ResponseNewParamsInputInputItemResponseFunctionToolCallParamStatus = "incomplete"
type ResponseNewParamsInputInputItemFunctionCallOutput struct{…}

The output of a function tool call.

CallID string
Output ResponseNewParamsInputInputItemFunctionCallOutputOutputUnion
One of the following:
string
type ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentList []ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemUnion
One of the following:
type ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemResponseInputTextContentParam struct{…}

A text input to the model.

Text string
Type InputText
type ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentParam struct{…}

An image input to the model.

Learn about image inputs

Type InputImage
Detail stringOptional
One of the following:
const ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentParamDetailLow ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentParamDetail = "low"
const ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentParamDetailHigh ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentParamDetail = "high"
const ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentParamDetailAuto ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentParamDetail = "auto"
FileID stringOptional
ImageURL stringOptional
type ResponseNewParamsInputInputItemFunctionCallOutputOutputOutputContentListItemResponseInputFileContentParam struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Type FunctionCallOutput
ID stringOptional
Status stringOptional
One of the following:
const ResponseNewParamsInputInputItemFunctionCallOutputStatusInProgress ResponseNewParamsInputInputItemFunctionCallOutputStatus = "in_progress"
const ResponseNewParamsInputInputItemFunctionCallOutputStatusCompleted ResponseNewParamsInputInputItemFunctionCallOutputStatus = "completed"
const ResponseNewParamsInputInputItemFunctionCallOutputStatusIncomplete ResponseNewParamsInputInputItemFunctionCallOutputStatus = "incomplete"
type ResponseNewParamsInputInputItemResponseReasoningItemParam struct{…}

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.

ID string
Summary []ResponseNewParamsInputInputItemResponseReasoningItemParamSummary
Text string
Type SummaryText
Type Reasoning
Content []ResponseNewParamsInputInputItemResponseReasoningItemParamContentOptional
Text string
Type ReasoningText
EncryptedContent stringOptional
Status stringOptional
One of the following:
const ResponseNewParamsInputInputItemResponseReasoningItemParamStatusInProgress ResponseNewParamsInputInputItemResponseReasoningItemParamStatus = "in_progress"
const ResponseNewParamsInputInputItemResponseReasoningItemParamStatusCompleted ResponseNewParamsInputInputItemResponseReasoningItemParamStatus = "completed"
const ResponseNewParamsInputInputItemResponseReasoningItemParamStatusIncomplete ResponseNewParamsInputInputItemResponseReasoningItemParamStatus = "incomplete"
type ResponseNewParamsInputInputItemResponseCompactionItemParamParam struct{…}

A compaction item generated by the v1/responses/compact API.

EncryptedContent string
Type Compaction
ID stringOptional
type ResponseNewParamsInputInputItemImageGenerationCall struct{…}

An image generation request made by the model.

ID string
Result string
Status string
One of the following:
const ResponseNewParamsInputInputItemImageGenerationCallStatusInProgress ResponseNewParamsInputInputItemImageGenerationCallStatus = "in_progress"
const ResponseNewParamsInputInputItemImageGenerationCallStatusCompleted ResponseNewParamsInputInputItemImageGenerationCallStatus = "completed"
const ResponseNewParamsInputInputItemImageGenerationCallStatusGenerating ResponseNewParamsInputInputItemImageGenerationCallStatus = "generating"
const ResponseNewParamsInputInputItemImageGenerationCallStatusFailed ResponseNewParamsInputInputItemImageGenerationCallStatus = "failed"
Type ImageGenerationCall
type ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParam struct{…}

A tool call to run code.

ID string
Code string
ContainerID string
Outputs []ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamOutputUnion
One of the following:
type ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamOutputOutputLogs struct{…}

The logs output from the code interpreter.

Logs string
Type Logs
type ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamOutputOutputImage struct{…}

The image output from the code interpreter.

Type Image
URL string
Status string
One of the following:
const ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatusInProgress ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatus = "in_progress"
const ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatusCompleted ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatus = "completed"
const ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatusIncomplete ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatus = "incomplete"
const ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatusInterpreting ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatus = "interpreting"
const ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatusFailed ResponseNewParamsInputInputItemResponseCodeInterpreterToolCallParamStatus = "failed"
Type CodeInterpreterCall
type ResponseNewParamsInputInputItemLocalShellCall struct{…}

A tool call to run a command on the local shell.

ID string
Action ResponseNewParamsInputInputItemLocalShellCallAction

Execute a shell command on the server.

Command []string
Env map[string, string]
Type Exec
TimeoutMs int64Optional
User stringOptional
WorkingDirectory stringOptional
CallID string
Status string
One of the following:
const ResponseNewParamsInputInputItemLocalShellCallStatusInProgress ResponseNewParamsInputInputItemLocalShellCallStatus = "in_progress"
const ResponseNewParamsInputInputItemLocalShellCallStatusCompleted ResponseNewParamsInputInputItemLocalShellCallStatus = "completed"
const ResponseNewParamsInputInputItemLocalShellCallStatusIncomplete ResponseNewParamsInputInputItemLocalShellCallStatus = "incomplete"
Type LocalShellCall
type ResponseNewParamsInputInputItemLocalShellCallOutput struct{…}

The output of a local shell tool call.

ID string
Output string
Type LocalShellCallOutput
Status stringOptional
One of the following:
const ResponseNewParamsInputInputItemLocalShellCallOutputStatusInProgress ResponseNewParamsInputInputItemLocalShellCallOutputStatus = "in_progress"
const ResponseNewParamsInputInputItemLocalShellCallOutputStatusCompleted ResponseNewParamsInputInputItemLocalShellCallOutputStatus = "completed"
const ResponseNewParamsInputInputItemLocalShellCallOutputStatusIncomplete ResponseNewParamsInputInputItemLocalShellCallOutputStatus = "incomplete"
type ResponseNewParamsInputInputItemShellCall struct{…}

A tool representing a request to execute one or more shell commands.

Action ResponseNewParamsInputInputItemShellCallAction

The shell commands and limits that describe how to run the tool call.

Commands []string
MaxOutputLength int64Optional
TimeoutMs int64Optional
CallID string
Type ShellCall
ID stringOptional
Environment ResponseNewParamsInputInputItemShellCallEnvironmentUnionOptional
One of the following:
type LocalEnvironmentParamResp struct{…}
Type Local
Skills []LocalEnvironmentParamSkillRespOptional
Description string
Name string
Path string
type ContainerReferenceParamResp struct{…}
ContainerID string
Type ContainerReference
Status stringOptional
One of the following:
const ResponseNewParamsInputInputItemShellCallStatusInProgress ResponseNewParamsInputInputItemShellCallStatus = "in_progress"
const ResponseNewParamsInputInputItemShellCallStatusCompleted ResponseNewParamsInputInputItemShellCallStatus = "completed"
const ResponseNewParamsInputInputItemShellCallStatusIncomplete ResponseNewParamsInputInputItemShellCallStatus = "incomplete"
type ResponseNewParamsInputInputItemShellCallOutput struct{…}

The streamed output items emitted by a shell tool call.

CallID string
Output []ResponseNewParamsInputInputItemShellCallOutputOutput
Outcome ResponseNewParamsInputInputItemShellCallOutputOutputOutcomeUnion

Indicates that the shell call exceeded its configured time limit.

One of the following:
type ResponseNewParamsInputInputItemShellCallOutputOutputOutcomeOutcomeTimeout struct{…}

Indicates that the shell call exceeded its configured time limit.

Type Timeout
type ResponseNewParamsInputInputItemShellCallOutputOutputOutcomeOutcomeExit struct{…}

Indicates that the shell commands finished and returned an exit code.

ExitCode int64
Type Exit
Stderr string
Stdout string
Type ShellCallOutput
ID stringOptional
MaxOutputLength int64Optional
Status stringOptional
One of the following:
const ResponseNewParamsInputInputItemShellCallOutputStatusInProgress ResponseNewParamsInputInputItemShellCallOutputStatus = "in_progress"
const ResponseNewParamsInputInputItemShellCallOutputStatusCompleted ResponseNewParamsInputInputItemShellCallOutputStatus = "completed"
const ResponseNewParamsInputInputItemShellCallOutputStatusIncomplete ResponseNewParamsInputInputItemShellCallOutputStatus = "incomplete"
type ResponseNewParamsInputInputItemApplyPatchCall struct{…}

A tool call representing a request to create, delete, or update files using diff patches.

CallID string
Operation ResponseNewParamsInputInputItemApplyPatchCallOperationUnion

Instruction for creating a new file via the apply_patch tool.

One of the following:
type ResponseNewParamsInputInputItemApplyPatchCallOperationApplyPatchCallOperationCreateFile struct{…}

Instruction for creating a new file via the apply_patch tool.

Diff string
Path string
Type CreateFile
type ResponseNewParamsInputInputItemApplyPatchCallOperationApplyPatchCallOperationDeleteFile struct{…}

Instruction for deleting an existing file via the apply_patch tool.

Path string
Type DeleteFile
type ResponseNewParamsInputInputItemApplyPatchCallOperationApplyPatchCallOperationUpdateFile struct{…}

Instruction for updating an existing file via the apply_patch tool.

Diff string
Path string
Type UpdateFile
Status string
One of the following:
const ResponseNewParamsInputInputItemApplyPatchCallStatusInProgress ResponseNewParamsInputInputItemApplyPatchCallStatus = "in_progress"
const ResponseNewParamsInputInputItemApplyPatchCallStatusCompleted ResponseNewParamsInputInputItemApplyPatchCallStatus = "completed"
Type ApplyPatchCall
ID stringOptional
type ResponseNewParamsInputInputItemApplyPatchCallOutput struct{…}

The streamed output emitted by an apply patch tool call.

CallID string
Status string
One of the following:
const ResponseNewParamsInputInputItemApplyPatchCallOutputStatusCompleted ResponseNewParamsInputInputItemApplyPatchCallOutputStatus = "completed"
const ResponseNewParamsInputInputItemApplyPatchCallOutputStatusFailed ResponseNewParamsInputInputItemApplyPatchCallOutputStatus = "failed"
Type ApplyPatchCallOutput
ID stringOptional
Output stringOptional
type ResponseNewParamsInputInputItemMcpListTools struct{…}

A list of tools available on an MCP server.

ID string
ServerLabel string
Tools []ResponseNewParamsInputInputItemMcpListToolsTool
InputSchema any
Name string
Annotations anyOptional
Description stringOptional
Type McpListTools
Error stringOptional
type McpApprovalRequest struct{…}

A request for human approval of a tool invocation.

ID string
Arguments string
Name string
ServerLabel string
Type McpApprovalRequest
type ResponseNewParamsInputInputItemMcpApprovalResponse struct{…}

A response to an MCP approval request.

ApprovalRequestID string
Approve bool
Type McpApprovalResponse
ID stringOptional
Reason stringOptional
type ResponseNewParamsInputInputItemMcpCall struct{…}

An invocation of a tool on an MCP server.

ID string
Arguments string
Name string
ServerLabel string
Type McpCall
ApprovalRequestID stringOptional
Error stringOptional
Output stringOptional
Status stringOptional
One of the following:
const ResponseNewParamsInputInputItemMcpCallStatusInProgress ResponseNewParamsInputInputItemMcpCallStatus = "in_progress"
const ResponseNewParamsInputInputItemMcpCallStatusCompleted ResponseNewParamsInputInputItemMcpCallStatus = "completed"
const ResponseNewParamsInputInputItemMcpCallStatusIncomplete ResponseNewParamsInputInputItemMcpCallStatus = "incomplete"
const ResponseNewParamsInputInputItemMcpCallStatusCalling ResponseNewParamsInputInputItemMcpCallStatus = "calling"
const ResponseNewParamsInputInputItemMcpCallStatusFailed ResponseNewParamsInputInputItemMcpCallStatus = "failed"
type ResponseNewParamsInputInputItemResponseCustomToolCallOutputParam struct{…}

The output of a custom tool call from your code, being sent back to the model.

CallID string
Output ResponseNewParamsInputInputItemResponseCustomToolCallOutputParamOutputUnion
One of the following:
string
type ResponseNewParamsInputInputItemResponseCustomToolCallOutputParamOutputOutputContentList []ResponseNewParamsInputInputItemResponseCustomToolCallOutputParamOutputOutputContentListItemUnion
One of the following:
type OpenAIResponseInputTextParamResp struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImageParamResp struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageParamDetail
One of the following:
const OpenAIResponseInputImageParamDetailLow OpenAIResponseInputImageParamDetail = "low"
const OpenAIResponseInputImageParamDetailHigh OpenAIResponseInputImageParamDetail = "high"
const OpenAIResponseInputImageParamDetailAuto OpenAIResponseInputImageParamDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFileParamResp struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Type CustomToolCallOutput
ID stringOptional
type ResponseNewParamsInputInputItemResponseCustomToolCallParam struct{…}

A call to a custom tool created by the model.

CallID string
Input string
Name string
Type CustomToolCall
ID stringOptional
type ResponseNewParamsInputInputItemItemReference struct{…}

An internal identifier for an item to reference.

ID string
Type stringOptional
Model param.Field[string]

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

Include param.Field[[]string]Optional

Which fields to include in the response

Instructions param.Field[string]Optional

Instructions for the response generation

MaxOutputTokens param.Field[int64]Optional

Maximum number of output tokens

Metadata param.Field[map[string, any]]Optional

Metadata for the response

ParallelToolCalls param.Field[bool]Optional

Whether to enable parallel tool calls

PreviousResponseID param.Field[string]Optional

ID of the previous response for chaining

Reasoning param.Field[map[string, any]]Optional

Reasoning configuration for the response

Store param.Field[bool]Optional

Whether to store the response

Stream param.Field[bool]Optional

Whether to stream the response

Temperature param.Field[float64]Optional

Sampling temperature for randomness control

maximum2
minimum0
Text param.Field[map[string, any]]Optional

Text configuration parameters

ToolChoice param.Field[ResponseNewParamsToolChoiceUnion]Optional

Tool choice configuration

string
type ResponseNewParamsToolChoiceMap map[string, any]
Tools param.Field[[]map[string, any]]Optional

Tools available for the response

TopP param.Field[float64]Optional

Top-p sampling parameter

maximum1
minimum0
Truncation param.Field[ResponseNewParamsTruncation]Optional

Truncation configuration

const ResponseNewParamsTruncationAuto ResponseNewParamsTruncation = "auto"
const ResponseNewParamsTruncationDisabled ResponseNewParamsTruncation = "disabled"
ReturnsExpand Collapse
type ResponseNewResponseUnion interface{…}

Emitted when there is a partial audio response.

One of the following:
type OpenAIResponse struct{…}
ID string
CreatedAt float64
Model OpenAIResponseModel
One of the following:
type OpenAIResponseModel string
One of the following:
const OpenAIResponseModelGpt5_2 OpenAIResponseModel = "gpt-5.2"
const OpenAIResponseModelGpt5_2_2025_12_11 OpenAIResponseModel = "gpt-5.2-2025-12-11"
const OpenAIResponseModelGpt5_2ChatLatest OpenAIResponseModel = "gpt-5.2-chat-latest"
const OpenAIResponseModelGpt5_2Pro OpenAIResponseModel = "gpt-5.2-pro"
const OpenAIResponseModelGpt5_2Pro2025_12_11 OpenAIResponseModel = "gpt-5.2-pro-2025-12-11"
const OpenAIResponseModelGpt5_1 OpenAIResponseModel = "gpt-5.1"
const OpenAIResponseModelGpt5_1_2025_11_13 OpenAIResponseModel = "gpt-5.1-2025-11-13"
const OpenAIResponseModelGpt5_1Codex OpenAIResponseModel = "gpt-5.1-codex"
const OpenAIResponseModelGpt5_1Mini OpenAIResponseModel = "gpt-5.1-mini"
const OpenAIResponseModelGpt5_1ChatLatest OpenAIResponseModel = "gpt-5.1-chat-latest"
const OpenAIResponseModelGpt5 OpenAIResponseModel = "gpt-5"
const OpenAIResponseModelGpt5Mini OpenAIResponseModel = "gpt-5-mini"
const OpenAIResponseModelGpt5Nano OpenAIResponseModel = "gpt-5-nano"
const OpenAIResponseModelGpt5_2025_08_07 OpenAIResponseModel = "gpt-5-2025-08-07"
const OpenAIResponseModelGpt5Mini2025_08_07 OpenAIResponseModel = "gpt-5-mini-2025-08-07"
const OpenAIResponseModelGpt5Nano2025_08_07 OpenAIResponseModel = "gpt-5-nano-2025-08-07"
const OpenAIResponseModelGpt5ChatLatest OpenAIResponseModel = "gpt-5-chat-latest"
const OpenAIResponseModelGpt4_1 OpenAIResponseModel = "gpt-4.1"
const OpenAIResponseModelGpt4_1Mini OpenAIResponseModel = "gpt-4.1-mini"
const OpenAIResponseModelGpt4_1Nano OpenAIResponseModel = "gpt-4.1-nano"
const OpenAIResponseModelGpt4_1_2025_04_14 OpenAIResponseModel = "gpt-4.1-2025-04-14"
const OpenAIResponseModelGpt4_1Mini2025_04_14 OpenAIResponseModel = "gpt-4.1-mini-2025-04-14"
const OpenAIResponseModelGpt4_1Nano2025_04_14 OpenAIResponseModel = "gpt-4.1-nano-2025-04-14"
const OpenAIResponseModelO4Mini OpenAIResponseModel = "o4-mini"
const OpenAIResponseModelO4Mini2025_04_16 OpenAIResponseModel = "o4-mini-2025-04-16"
const OpenAIResponseModelO3 OpenAIResponseModel = "o3"
const OpenAIResponseModelO3_2025_04_16 OpenAIResponseModel = "o3-2025-04-16"
const OpenAIResponseModelO3Mini OpenAIResponseModel = "o3-mini"
const OpenAIResponseModelO3Mini2025_01_31 OpenAIResponseModel = "o3-mini-2025-01-31"
const OpenAIResponseModelO1 OpenAIResponseModel = "o1"
const OpenAIResponseModelO1_2024_12_17 OpenAIResponseModel = "o1-2024-12-17"
const OpenAIResponseModelO1Preview OpenAIResponseModel = "o1-preview"
const OpenAIResponseModelO1Preview2024_09_12 OpenAIResponseModel = "o1-preview-2024-09-12"
const OpenAIResponseModelO1Mini OpenAIResponseModel = "o1-mini"
const OpenAIResponseModelO1Mini2024_09_12 OpenAIResponseModel = "o1-mini-2024-09-12"
const OpenAIResponseModelGpt4o OpenAIResponseModel = "gpt-4o"
const OpenAIResponseModelGpt4o2024_11_20 OpenAIResponseModel = "gpt-4o-2024-11-20"
const OpenAIResponseModelGpt4o2024_08_06 OpenAIResponseModel = "gpt-4o-2024-08-06"
const OpenAIResponseModelGpt4o2024_05_13 OpenAIResponseModel = "gpt-4o-2024-05-13"
const OpenAIResponseModelGpt4oAudioPreview OpenAIResponseModel = "gpt-4o-audio-preview"
const OpenAIResponseModelGpt4oAudioPreview2024_10_01 OpenAIResponseModel = "gpt-4o-audio-preview-2024-10-01"
const OpenAIResponseModelGpt4oAudioPreview2024_12_17 OpenAIResponseModel = "gpt-4o-audio-preview-2024-12-17"
const OpenAIResponseModelGpt4oAudioPreview2025_06_03 OpenAIResponseModel = "gpt-4o-audio-preview-2025-06-03"
const OpenAIResponseModelGpt4oMiniAudioPreview OpenAIResponseModel = "gpt-4o-mini-audio-preview"
const OpenAIResponseModelGpt4oMiniAudioPreview2024_12_17 OpenAIResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"
const OpenAIResponseModelGpt4oSearchPreview OpenAIResponseModel = "gpt-4o-search-preview"
const OpenAIResponseModelGpt4oMiniSearchPreview OpenAIResponseModel = "gpt-4o-mini-search-preview"
const OpenAIResponseModelGpt4oSearchPreview2025_03_11 OpenAIResponseModel = "gpt-4o-search-preview-2025-03-11"
const OpenAIResponseModelGpt4oMiniSearchPreview2025_03_11 OpenAIResponseModel = "gpt-4o-mini-search-preview-2025-03-11"
const OpenAIResponseModelChatgpt4oLatest OpenAIResponseModel = "chatgpt-4o-latest"
const OpenAIResponseModelCodexMiniLatest OpenAIResponseModel = "codex-mini-latest"
const OpenAIResponseModelGpt4oMini OpenAIResponseModel = "gpt-4o-mini"
const OpenAIResponseModelGpt4oMini2024_07_18 OpenAIResponseModel = "gpt-4o-mini-2024-07-18"
const OpenAIResponseModelGpt4Turbo OpenAIResponseModel = "gpt-4-turbo"
const OpenAIResponseModelGpt4Turbo2024_04_09 OpenAIResponseModel = "gpt-4-turbo-2024-04-09"
const OpenAIResponseModelGpt4_0125Preview OpenAIResponseModel = "gpt-4-0125-preview"
const OpenAIResponseModelGpt4TurboPreview OpenAIResponseModel = "gpt-4-turbo-preview"
const OpenAIResponseModelGpt4_1106Preview OpenAIResponseModel = "gpt-4-1106-preview"
const OpenAIResponseModelGpt4VisionPreview OpenAIResponseModel = "gpt-4-vision-preview"
const OpenAIResponseModelGpt4 OpenAIResponseModel = "gpt-4"
const OpenAIResponseModelGpt4_0314 OpenAIResponseModel = "gpt-4-0314"
const OpenAIResponseModelGpt4_0613 OpenAIResponseModel = "gpt-4-0613"
const OpenAIResponseModelGpt4_32k OpenAIResponseModel = "gpt-4-32k"
const OpenAIResponseModelGpt4_32k0314 OpenAIResponseModel = "gpt-4-32k-0314"
const OpenAIResponseModelGpt4_32k0613 OpenAIResponseModel = "gpt-4-32k-0613"
const OpenAIResponseModelGpt3_5Turbo OpenAIResponseModel = "gpt-3.5-turbo"
const OpenAIResponseModelGpt3_5Turbo16k OpenAIResponseModel = "gpt-3.5-turbo-16k"
const OpenAIResponseModelGpt3_5Turbo0301 OpenAIResponseModel = "gpt-3.5-turbo-0301"
const OpenAIResponseModelGpt3_5Turbo0613 OpenAIResponseModel = "gpt-3.5-turbo-0613"
const OpenAIResponseModelGpt3_5Turbo1106 OpenAIResponseModel = "gpt-3.5-turbo-1106"
const OpenAIResponseModelGpt3_5Turbo0125 OpenAIResponseModel = "gpt-3.5-turbo-0125"
const OpenAIResponseModelGpt3_5Turbo16k0613 OpenAIResponseModel = "gpt-3.5-turbo-16k-0613"
const OpenAIResponseModelO1Pro OpenAIResponseModel = "o1-pro"
const OpenAIResponseModelO1Pro2025_03_19 OpenAIResponseModel = "o1-pro-2025-03-19"
const OpenAIResponseModelO3Pro OpenAIResponseModel = "o3-pro"
const OpenAIResponseModelO3Pro2025_06_10 OpenAIResponseModel = "o3-pro-2025-06-10"
const OpenAIResponseModelO3DeepResearch OpenAIResponseModel = "o3-deep-research"
const OpenAIResponseModelO3DeepResearch2025_06_26 OpenAIResponseModel = "o3-deep-research-2025-06-26"
const OpenAIResponseModelO4MiniDeepResearch OpenAIResponseModel = "o4-mini-deep-research"
const OpenAIResponseModelO4MiniDeepResearch2025_06_26 OpenAIResponseModel = "o4-mini-deep-research-2025-06-26"
const OpenAIResponseModelComputerUsePreview OpenAIResponseModel = "computer-use-preview"
const OpenAIResponseModelComputerUsePreview2025_03_11 OpenAIResponseModel = "computer-use-preview-2025-03-11"
const OpenAIResponseModelGpt5Codex OpenAIResponseModel = "gpt-5-codex"
const OpenAIResponseModelGpt5Pro OpenAIResponseModel = "gpt-5-pro"
const OpenAIResponseModelGpt5Pro2025_10_06 OpenAIResponseModel = "gpt-5-pro-2025-10-06"
const OpenAIResponseModelGpt5_1CodexMax OpenAIResponseModel = "gpt-5.1-codex-max"
string
Object Response
Output []OpenAIResponseOutputUnion
One of the following:
type OpenAIResponseOutputMessage struct{…}

An output message from the model.

ID string
Content []OpenAIResponseOutputMessageContentUnion
One of the following:
type OpenAIResponseOutputText struct{…}

A text output from the model.

Annotations []OpenAIResponseOutputTextAnnotationUnion
One of the following:
type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []OpenAIResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type OpenAIResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string
Type Refusal
Role Assistant
Status OpenAIResponseOutputMessageStatus
One of the following:
const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"
const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"
const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"
Type Message
Phase OpenAIResponseOutputMessagePhaseOptional
One of the following:
const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"
const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"
type OpenAIResponseFileSearchToolCall struct{…}

The results of a file search tool call.

See the file search guide for more information.

ID string
Queries []string
Status OpenAIResponseFileSearchToolCallStatus
One of the following:
const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"
const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"
const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"
const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"
const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"
Type FileSearchCall
Results []OpenAIResponseFileSearchToolCallResultOptional
Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]Optional
One of the following:
string
float64
bool
FileID stringOptional
Filename stringOptional
Score float64Optional
Text stringOptional
type OpenAIResponseFunctionToolCall struct{…}

A tool call to run a function.

See the function calling guide for more information.

Arguments string
CallID string
Name string
Type FunctionCall
ID stringOptional
Status OpenAIResponseFunctionToolCallStatusOptional
One of the following:
const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"
const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"
const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"
One of the following:
One of the following:
type OpenAIResponseComputerToolCall struct{…}

A tool call to a computer use tool.

See the computer use guide for more information.

ID string
Action OpenAIResponseComputerToolCallActionUnion

A click action.

One of the following:
type OpenAIResponseComputerToolCallActionActionClick struct{…}

A click action.

Button string
One of the following:
const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"
const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"
const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"
const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"
const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"
Type Click
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}

A double click action.

Type DoubleClick
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDrag struct{…}

A drag action.

Path []OpenAIResponseComputerToolCallActionActionDragPath
X int64
Y int64
Type Drag
type OpenAIResponseComputerToolCallActionActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string
Type Keypress
type OpenAIResponseComputerToolCallActionActionMove struct{…}

A mouse move action.

Type Move
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}

A screenshot action.

Type Screenshot
type OpenAIResponseComputerToolCallActionActionScroll struct{…}

A scroll action.

ScrollX int64
ScrollY int64
Type Scroll
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionType struct{…}

An action to type in text.

Text string
Type Type
type OpenAIResponseComputerToolCallActionActionWait struct{…}

A wait action.

Type Wait
CallID string
PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck
ID string
Code stringOptional
Message stringOptional
Status OpenAIResponseComputerToolCallStatus
One of the following:
const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"
const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"
const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"
Type ComputerCall
type OpenAIResponseReasoningItem struct{…}

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.

ID string
Summary []OpenAIResponseReasoningItemSummary
Text string
Type SummaryText
Type Reasoning
Content []OpenAIResponseReasoningItemContentOptional
Text string
Type ReasoningText
EncryptedContent stringOptional
Status OpenAIResponseReasoningItemStatusOptional
One of the following:
const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"
const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"
const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"
type ResponseCompactionItem struct{…}

A compaction item generated by the v1/responses/compact API.

ID string
EncryptedContent string
Type Compaction
CreatedBy stringOptional
type OpenAITypesResponsesResponseOutputItemImageGenerationCall struct{…}

An image generation request made by the model.

ID string
Status OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus
One of the following:
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "generating"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "failed"
Type ImageGenerationCall
Result stringOptional
type OpenAIResponseCodeInterpreterToolCall struct{…}

A tool call to run code.

ID string
ContainerID string
Status OpenAIResponseCodeInterpreterToolCallStatus
One of the following:
const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"
const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"
const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"
const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"
const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"
Type CodeInterpreterCall
Code stringOptional
Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnionOptional
One of the following:
type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}

The logs output from the code interpreter.

Logs string
Type Logs
type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}

The image output from the code interpreter.

Type Image
URL string
type OpenAITypesResponsesResponseOutputItemLocalShellCall struct{…}

A tool call to run a command on the local shell.

ID string
Action OpenAITypesResponsesResponseOutputItemLocalShellCallAction

Execute a shell command on the server.

Command []string
Env map[string, string]
Type Exec
TimeoutMs int64Optional
User stringOptional
WorkingDirectory stringOptional
CallID string
Status OpenAITypesResponsesResponseOutputItemLocalShellCallStatus
One of the following:
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "incomplete"
Type LocalShellCall
type ResponseFunctionShellToolCall struct{…}

A tool call that executes one or more shell commands in a managed environment.

ID string
Action ResponseFunctionShellToolCallAction

The shell commands and limits that describe how to run the tool call.

Commands []string
MaxOutputLength int64Optional
TimeoutMs int64Optional
CallID string
Status ResponseFunctionShellToolCallStatus
One of the following:
const ResponseFunctionShellToolCallStatusInProgress ResponseFunctionShellToolCallStatus = "in_progress"
const ResponseFunctionShellToolCallStatusCompleted ResponseFunctionShellToolCallStatus = "completed"
const ResponseFunctionShellToolCallStatusIncomplete ResponseFunctionShellToolCallStatus = "incomplete"
Type ShellCall
CreatedBy stringOptional
Environment ResponseFunctionShellToolCallEnvironmentUnionOptional

Represents the use of a local environment to perform shell actions.

One of the following:
type ResponseFunctionShellToolCallEnvironmentResponseLocalEnvironment struct{…}

Represents the use of a local environment to perform shell actions.

Type Local
type ResponseFunctionShellToolCallEnvironmentResponseContainerReference struct{…}

Represents a container created with /v1/containers.

ContainerID string
Type ContainerReference
type ResponseFunctionShellToolCallOutput struct{…}

The output of a shell tool call that was emitted.

ID string
CallID string
Output []ResponseFunctionShellToolCallOutputOutput
Outcome ResponseFunctionShellToolCallOutputOutputOutcomeUnion

Indicates that the shell call exceeded its configured time limit.

One of the following:
type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeTimeout struct{…}

Indicates that the shell call exceeded its configured time limit.

Type Timeout
type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeExit struct{…}

Indicates that the shell commands finished and returned an exit code.

ExitCode int64
Type Exit
Stderr string
Stdout string
CreatedBy stringOptional
Status ResponseFunctionShellToolCallOutputStatus
One of the following:
const ResponseFunctionShellToolCallOutputStatusInProgress ResponseFunctionShellToolCallOutputStatus = "in_progress"
const ResponseFunctionShellToolCallOutputStatusCompleted ResponseFunctionShellToolCallOutputStatus = "completed"
const ResponseFunctionShellToolCallOutputStatusIncomplete ResponseFunctionShellToolCallOutputStatus = "incomplete"
Type ShellCallOutput
CreatedBy stringOptional
MaxOutputLength int64Optional
type ResponseApplyPatchToolCall struct{…}

A tool call that applies file diffs by creating, deleting, or updating files.

ID string
CallID string
Operation ResponseApplyPatchToolCallOperationUnion

Instruction describing how to create a file via the apply_patch tool.

One of the following:
type ResponseApplyPatchToolCallOperationOperationCreateFile struct{…}

Instruction describing how to create a file via the apply_patch tool.

Diff string
Path string
Type CreateFile
type ResponseApplyPatchToolCallOperationOperationDeleteFile struct{…}

Instruction describing how to delete a file via the apply_patch tool.

Path string
Type DeleteFile
type ResponseApplyPatchToolCallOperationOperationUpdateFile struct{…}

Instruction describing how to update a file via the apply_patch tool.

Diff string
Path string
Type UpdateFile
Status ResponseApplyPatchToolCallStatus
One of the following:
const ResponseApplyPatchToolCallStatusInProgress ResponseApplyPatchToolCallStatus = "in_progress"
const ResponseApplyPatchToolCallStatusCompleted ResponseApplyPatchToolCallStatus = "completed"
Type ApplyPatchCall
CreatedBy stringOptional
type ResponseApplyPatchToolCallOutput struct{…}

The output emitted by an apply patch tool call.

ID string
CallID string
Status ResponseApplyPatchToolCallOutputStatus
One of the following:
const ResponseApplyPatchToolCallOutputStatusCompleted ResponseApplyPatchToolCallOutputStatus = "completed"
const ResponseApplyPatchToolCallOutputStatusFailed ResponseApplyPatchToolCallOutputStatus = "failed"
Type ApplyPatchCallOutput
CreatedBy stringOptional
Output stringOptional
type OpenAITypesResponsesResponseOutputItemMcpCall struct{…}

An invocation of a tool on an MCP server.

ID string
Arguments string
Name string
ServerLabel string
Type McpCall
ApprovalRequestID stringOptional
Error stringOptional
Output stringOptional
Status OpenAITypesResponsesResponseOutputItemMcpCallStatusOptional
One of the following:
const OpenAITypesResponsesResponseOutputItemMcpCallStatusInProgress OpenAITypesResponsesResponseOutputItemMcpCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusCompleted OpenAITypesResponsesResponseOutputItemMcpCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseOutputItemMcpCallStatus = "incomplete"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusCalling OpenAITypesResponsesResponseOutputItemMcpCallStatus = "calling"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusFailed OpenAITypesResponsesResponseOutputItemMcpCallStatus = "failed"
type OpenAITypesResponsesResponseOutputItemMcpListTools struct{…}

A list of tools available on an MCP server.

ID string
ServerLabel string
Tools []OpenAITypesResponsesResponseOutputItemMcpListToolsTool
InputSchema any
Name string
Annotations anyOptional
Description stringOptional
Type McpListTools
Error stringOptional
type McpApprovalRequest struct{…}

A request for human approval of a tool invocation.

ID string
Arguments string
Name string
ServerLabel string
Type McpApprovalRequest
type OpenAIResponseCustomToolCall struct{…}

A call to a custom tool created by the model.

CallID string
Input string
Name string
Type CustomToolCall
ID stringOptional
ParallelToolCalls bool
ToolChoice OpenAIResponseToolChoiceUnion

Constrains the tools available to the model to a pre-defined set.

One of the following:
type OpenAIResponseToolChoiceString string
One of the following:
const OpenAIResponseToolChoiceStringNone OpenAIResponseToolChoiceString = "none"
const OpenAIResponseToolChoiceStringAuto OpenAIResponseToolChoiceString = "auto"
const OpenAIResponseToolChoiceStringRequired OpenAIResponseToolChoiceString = "required"
type ToolChoiceAllowed struct{…}

Constrains the tools available to the model to a pre-defined set.

Mode ToolChoiceAllowedMode
One of the following:
const ToolChoiceAllowedModeAuto ToolChoiceAllowedMode = "auto"
const ToolChoiceAllowedModeRequired ToolChoiceAllowedMode = "required"
Tools []map[string, any]
Type AllowedTools
type ToolChoiceTypes struct{…}

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

Type ToolChoiceTypesType
One of the following:
const ToolChoiceTypesTypeFileSearch ToolChoiceTypesType = "file_search"
const ToolChoiceTypesTypeWebSearchPreview ToolChoiceTypesType = "web_search_preview"
const ToolChoiceTypesTypeComputerUsePreview ToolChoiceTypesType = "computer_use_preview"
const ToolChoiceTypesTypeWebSearchPreview2025_03_11 ToolChoiceTypesType = "web_search_preview_2025_03_11"
const ToolChoiceTypesTypeImageGeneration ToolChoiceTypesType = "image_generation"
const ToolChoiceTypesTypeCodeInterpreter ToolChoiceTypesType = "code_interpreter"
type ToolChoiceFunction struct{…}

Use this option to force the model to call a specific function.

Name string
Type Function
type ToolChoiceMcp struct{…}

Use this option to force the model to call a specific tool on a remote MCP server.

ServerLabel string
Type Mcp
Name stringOptional
type ToolChoiceCustom struct{…}

Use this option to force the model to call a specific custom tool.

Name string
Type Custom
type ToolChoiceApplyPatch struct{…}

Forces the model to call the apply_patch tool when executing a tool call.

Type ApplyPatch
type ToolChoiceShell struct{…}

Forces the model to call the shell tool when a tool call is required.

Type Shell
Tools []OpenAIResponseToolUnion
One of the following:
type FunctionTool struct{…}

Defines a function in your own code the model can choose to call.

Learn more about function calling.

Name string
Type Function
Description stringOptional
Parameters map[string, any]Optional
Strict boolOptional
type FileSearchTool struct{…}

A tool that searches for relevant content from uploaded files.

Learn more about the file search tool.

Type FileSearch
VectorStoreIDs []string
Filters FileSearchToolFiltersUnionOptional

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

One of the following:
type FileSearchToolFiltersComparisonFilter struct{…}

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

Key string
Type string
One of the following:
const FileSearchToolFiltersComparisonFilterTypeEq FileSearchToolFiltersComparisonFilterType = "eq"
const FileSearchToolFiltersComparisonFilterTypeNe FileSearchToolFiltersComparisonFilterType = "ne"
const FileSearchToolFiltersComparisonFilterTypeGt FileSearchToolFiltersComparisonFilterType = "gt"
const FileSearchToolFiltersComparisonFilterTypeGte FileSearchToolFiltersComparisonFilterType = "gte"
const FileSearchToolFiltersComparisonFilterTypeLt FileSearchToolFiltersComparisonFilterType = "lt"
const FileSearchToolFiltersComparisonFilterTypeLte FileSearchToolFiltersComparisonFilterType = "lte"
Value FileSearchToolFiltersComparisonFilterValueUnion
One of the following:
string
float64
bool
type FileSearchToolFiltersComparisonFilterValueArray []FileSearchToolFiltersComparisonFilterValueArrayItemUnion
One of the following:
string
float64
type FileSearchToolFiltersCompoundFilter struct{…}

Combine multiple filters using and or or.

Filters []FileSearchToolFiltersCompoundFilterFilter
One of the following:
type FileSearchToolFiltersCompoundFilterFilter struct{…}

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

Key string
Type string
One of the following:
const FileSearchToolFiltersCompoundFilterFilterTypeEq FileSearchToolFiltersCompoundFilterFilterType = "eq"
const FileSearchToolFiltersCompoundFilterFilterTypeNe FileSearchToolFiltersCompoundFilterFilterType = "ne"
const FileSearchToolFiltersCompoundFilterFilterTypeGt FileSearchToolFiltersCompoundFilterFilterType = "gt"
const FileSearchToolFiltersCompoundFilterFilterTypeGte FileSearchToolFiltersCompoundFilterFilterType = "gte"
const FileSearchToolFiltersCompoundFilterFilterTypeLt FileSearchToolFiltersCompoundFilterFilterType = "lt"
const FileSearchToolFiltersCompoundFilterFilterTypeLte FileSearchToolFiltersCompoundFilterFilterType = "lte"
Value FileSearchToolFiltersCompoundFilterFilterValueUnion
One of the following:
string
float64
bool
type FileSearchToolFiltersCompoundFilterFilterValueArray []FileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion
One of the following:
string
float64
Type string
One of the following:
const FileSearchToolFiltersCompoundFilterTypeAnd FileSearchToolFiltersCompoundFilterType = "and"
const FileSearchToolFiltersCompoundFilterTypeOr FileSearchToolFiltersCompoundFilterType = "or"
MaxNumResults int64Optional
RankingOptions FileSearchToolRankingOptionsOptional

Ranking options for search.

Ranker stringOptional
One of the following:
const FileSearchToolRankingOptionsRankerAuto FileSearchToolRankingOptionsRanker = "auto"
const FileSearchToolRankingOptionsRankerDefault2024_11_15 FileSearchToolRankingOptionsRanker = "default-2024-11-15"
ScoreThreshold float64Optional
type ComputerTool struct{…}

A tool that controls a virtual computer.

Learn more about the computer tool.

DisplayHeight int64
DisplayWidth int64
Environment ComputerToolEnvironment
One of the following:
const ComputerToolEnvironmentWindows ComputerToolEnvironment = "windows"
const ComputerToolEnvironmentMac ComputerToolEnvironment = "mac"
const ComputerToolEnvironmentLinux ComputerToolEnvironment = "linux"
const ComputerToolEnvironmentUbuntu ComputerToolEnvironment = "ubuntu"
const ComputerToolEnvironmentBrowser ComputerToolEnvironment = "browser"
Type ComputerUsePreview
type WebSearchTool struct{…}

Search the Internet for sources related to the prompt.

Learn more about the web search tool.

Type WebSearchToolType
One of the following:
const WebSearchToolTypeWebSearch WebSearchToolType = "web_search"
const WebSearchToolTypeWebSearch2025_08_26 WebSearchToolType = "web_search_2025_08_26"
Filters WebSearchToolFiltersOptional

Filters for the search.

AllowedDomains []stringOptional
SearchContextSize WebSearchToolSearchContextSizeOptional
One of the following:
const WebSearchToolSearchContextSizeLow WebSearchToolSearchContextSize = "low"
const WebSearchToolSearchContextSizeMedium WebSearchToolSearchContextSize = "medium"
const WebSearchToolSearchContextSizeHigh WebSearchToolSearchContextSize = "high"
UserLocation WebSearchToolUserLocationOptional

The approximate location of the user.

City stringOptional
Country stringOptional
Region stringOptional
Timezone stringOptional
Type stringOptional
type OpenAIResponseToolMcp struct{…}

Give the model access to additional tools via remote Model Context Protocol (MCP) servers. Learn more about MCP.

ServerLabel string
Type Mcp
AllowedTools OpenAIResponseToolMcpAllowedToolsUnionOptional

A filter object to specify which tools are allowed.

One of the following:
type OpenAIResponseToolMcpAllowedToolsArray []string
type OpenAIResponseToolMcpAllowedToolsMcpAllowedToolsMcpToolFilter struct{…}

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
Authorization stringOptional
ConnectorID stringOptional
One of the following:
const OpenAIResponseToolMcpConnectorIDConnectorDropbox OpenAIResponseToolMcpConnectorID = "connector_dropbox"
const OpenAIResponseToolMcpConnectorIDConnectorGmail OpenAIResponseToolMcpConnectorID = "connector_gmail"
const OpenAIResponseToolMcpConnectorIDConnectorGooglecalendar OpenAIResponseToolMcpConnectorID = "connector_googlecalendar"
const OpenAIResponseToolMcpConnectorIDConnectorGoogledrive OpenAIResponseToolMcpConnectorID = "connector_googledrive"
const OpenAIResponseToolMcpConnectorIDConnectorMicrosoftteams OpenAIResponseToolMcpConnectorID = "connector_microsoftteams"
const OpenAIResponseToolMcpConnectorIDConnectorOutlookcalendar OpenAIResponseToolMcpConnectorID = "connector_outlookcalendar"
const OpenAIResponseToolMcpConnectorIDConnectorOutlookemail OpenAIResponseToolMcpConnectorID = "connector_outlookemail"
const OpenAIResponseToolMcpConnectorIDConnectorSharepoint OpenAIResponseToolMcpConnectorID = "connector_sharepoint"
Headers map[string, string]Optional
RequireApproval OpenAIResponseToolMcpRequireApprovalUnionOptional

Specify which of the MCP server’s tools require approval.

Can be always, never, or a filter object associated with tools that require approval.

One of the following:
type OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilter struct{…}

Specify which of the MCP server’s tools require approval.

Can be always, never, or a filter object associated with tools that require approval.

Always OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilterAlwaysOptional

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
Never OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilterNeverOptional

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
type OpenAIResponseToolMcpRequireApprovalString string
One of the following:
const OpenAIResponseToolMcpRequireApprovalStringAlways OpenAIResponseToolMcpRequireApprovalString = "always"
const OpenAIResponseToolMcpRequireApprovalStringNever OpenAIResponseToolMcpRequireApprovalString = "never"
ServerDescription stringOptional
ServerURL stringOptional
type OpenAIResponseToolCodeInterpreter struct{…}

A tool that runs Python code to help generate a response to a prompt.

Container OpenAIResponseToolCodeInterpreterContainerUnion

Configuration for a code interpreter container.

Optionally specify the IDs of the files to run the code on.

One of the following:
string
type OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAuto struct{…}

Configuration for a code interpreter container.

Optionally specify the IDs of the files to run the code on.

Type Auto
FileIDs []stringOptional
MemoryLimit stringOptional
One of the following:
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"
NetworkPolicy OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnionOptional
One of the following:
type ContainerNetworkPolicyDisabled struct{…}
Type Disabled
type ContainerNetworkPolicyAllowlist struct{…}
AllowedDomains []string
Type Allowlist
DomainSecrets []ContainerNetworkPolicyAllowlistDomainSecretOptional
Domain string
Name string
Value string
Type CodeInterpreter
type OpenAIResponseToolImageGeneration struct{…}

A tool that generates images using the GPT image models.

Type ImageGeneration
Action stringOptional
One of the following:
const OpenAIResponseToolImageGenerationActionGenerate OpenAIResponseToolImageGenerationAction = "generate"
const OpenAIResponseToolImageGenerationActionEdit OpenAIResponseToolImageGenerationAction = "edit"
const OpenAIResponseToolImageGenerationActionAuto OpenAIResponseToolImageGenerationAction = "auto"
Background stringOptional
One of the following:
const OpenAIResponseToolImageGenerationBackgroundTransparent OpenAIResponseToolImageGenerationBackground = "transparent"
const OpenAIResponseToolImageGenerationBackgroundOpaque OpenAIResponseToolImageGenerationBackground = "opaque"
const OpenAIResponseToolImageGenerationBackgroundAuto OpenAIResponseToolImageGenerationBackground = "auto"
InputFidelity stringOptional
One of the following:
const OpenAIResponseToolImageGenerationInputFidelityHigh OpenAIResponseToolImageGenerationInputFidelity = "high"
const OpenAIResponseToolImageGenerationInputFidelityLow OpenAIResponseToolImageGenerationInputFidelity = "low"
InputImageMask OpenAIResponseToolImageGenerationInputImageMaskOptional

Optional mask for inpainting.

Contains image_url (string, optional) and file_id (string, optional).

FileID stringOptional
ImageURL stringOptional
Model stringOptional
One of the following:
string
string
One of the following:
const OpenAIResponseToolImageGenerationModelGptImage1 OpenAIResponseToolImageGenerationModel = "gpt-image-1"
const OpenAIResponseToolImageGenerationModelGptImage1Mini OpenAIResponseToolImageGenerationModel = "gpt-image-1-mini"
const OpenAIResponseToolImageGenerationModelGptImage1_5 OpenAIResponseToolImageGenerationModel = "gpt-image-1.5"
Moderation stringOptional
One of the following:
const OpenAIResponseToolImageGenerationModerationAuto OpenAIResponseToolImageGenerationModeration = "auto"
const OpenAIResponseToolImageGenerationModerationLow OpenAIResponseToolImageGenerationModeration = "low"
OutputCompression int64Optional
OutputFormat stringOptional
One of the following:
const OpenAIResponseToolImageGenerationOutputFormatPng OpenAIResponseToolImageGenerationOutputFormat = "png"
const OpenAIResponseToolImageGenerationOutputFormatWebp OpenAIResponseToolImageGenerationOutputFormat = "webp"
const OpenAIResponseToolImageGenerationOutputFormatJpeg OpenAIResponseToolImageGenerationOutputFormat = "jpeg"
PartialImages int64Optional
Quality stringOptional
One of the following:
const OpenAIResponseToolImageGenerationQualityLow OpenAIResponseToolImageGenerationQuality = "low"
const OpenAIResponseToolImageGenerationQualityMedium OpenAIResponseToolImageGenerationQuality = "medium"
const OpenAIResponseToolImageGenerationQualityHigh OpenAIResponseToolImageGenerationQuality = "high"
const OpenAIResponseToolImageGenerationQualityAuto OpenAIResponseToolImageGenerationQuality = "auto"
Size stringOptional
One of the following:
const OpenAIResponseToolImageGenerationSize1024x1024 OpenAIResponseToolImageGenerationSize = "1024x1024"
const OpenAIResponseToolImageGenerationSize1024x1536 OpenAIResponseToolImageGenerationSize = "1024x1536"
const OpenAIResponseToolImageGenerationSize1536x1024 OpenAIResponseToolImageGenerationSize = "1536x1024"
const OpenAIResponseToolImageGenerationSizeAuto OpenAIResponseToolImageGenerationSize = "auto"
type OpenAIResponseToolLocalShell struct{…}

A tool that allows the model to execute shell commands in a local environment.

Type LocalShell
type FunctionShellTool struct{…}

A tool that allows the model to execute shell commands.

Type Shell
Environment FunctionShellToolEnvironmentUnionOptional
One of the following:
type FunctionShellToolEnvironmentContainerAuto struct{…}
Type ContainerAuto
FileIDs []stringOptional
MemoryLimit stringOptional
One of the following:
const FunctionShellToolEnvironmentContainerAutoMemoryLimit1g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "1g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit4g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "4g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit16g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "16g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit64g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "64g"
NetworkPolicy FunctionShellToolEnvironmentContainerAutoNetworkPolicyUnionOptional
One of the following:
type ContainerNetworkPolicyDisabled struct{…}
Type Disabled
type ContainerNetworkPolicyAllowlist struct{…}
AllowedDomains []string
Type Allowlist
DomainSecrets []ContainerNetworkPolicyAllowlistDomainSecretOptional
Domain string
Name string
Value string
Skills []FunctionShellToolEnvironmentContainerAutoSkillUnionOptional
One of the following:
type FunctionShellToolEnvironmentContainerAutoSkillSkillReference struct{…}
SkillID string
Type SkillReference
Version stringOptional
type FunctionShellToolEnvironmentContainerAutoSkillInlineSkill struct{…}
Description string
Name string
Source FunctionShellToolEnvironmentContainerAutoSkillInlineSkillSource

Inline skill payload

Data string
MediaType ApplicationZip
Type Base64
Type Inline
type LocalEnvironment struct{…}
Type Local
Skills []LocalEnvironmentSkillOptional
Description string
Name string
Path string
type ContainerReference struct{…}
ContainerID string
Type ContainerReference
type CustomTool struct{…}

A custom tool that processes input using a specified format.

Learn more about custom tools

Name string
Type Custom
Description stringOptional
Format CustomToolFormatUnionOptional

Unconstrained free-form text.

One of the following:
type CustomToolFormatText struct{…}

Unconstrained free-form text.

Type Text
type CustomToolFormatGrammar struct{…}

A grammar defined by the user.

Definition string
Syntax string
One of the following:
const CustomToolFormatGrammarSyntaxLark CustomToolFormatGrammarSyntax = "lark"
const CustomToolFormatGrammarSyntaxRegex CustomToolFormatGrammarSyntax = "regex"
Type Grammar
type WebSearchPreviewTool struct{…}

This tool searches the web for relevant results to use in a response.

Learn more about the web search tool.

Type WebSearchPreviewToolType
One of the following:
const WebSearchPreviewToolTypeWebSearchPreview WebSearchPreviewToolType = "web_search_preview"
const WebSearchPreviewToolTypeWebSearchPreview2025_03_11 WebSearchPreviewToolType = "web_search_preview_2025_03_11"
SearchContextSize WebSearchPreviewToolSearchContextSizeOptional
One of the following:
const WebSearchPreviewToolSearchContextSizeLow WebSearchPreviewToolSearchContextSize = "low"
const WebSearchPreviewToolSearchContextSizeMedium WebSearchPreviewToolSearchContextSize = "medium"
const WebSearchPreviewToolSearchContextSizeHigh WebSearchPreviewToolSearchContextSize = "high"
UserLocation WebSearchPreviewToolUserLocationOptional

The user’s location.

Type Approximate
City stringOptional
Country stringOptional
Region stringOptional
Timezone stringOptional
type ApplyPatchTool struct{…}

Allows the assistant to create, delete, or update files using unified diffs.

Type ApplyPatch
Background boolOptional
CompletedAt float64Optional
Conversation ConversationOptional

The conversation that this response belonged to.

Input items and output items from this response were automatically added to this conversation.

ID string
Error OpenAIResponseErrorOptional

An error object returned when the model fails to generate a Response.

Code OpenAIResponseErrorCode
One of the following:
const OpenAIResponseErrorCodeServerError OpenAIResponseErrorCode = "server_error"
const OpenAIResponseErrorCodeRateLimitExceeded OpenAIResponseErrorCode = "rate_limit_exceeded"
const OpenAIResponseErrorCodeInvalidPrompt OpenAIResponseErrorCode = "invalid_prompt"
const OpenAIResponseErrorCodeVectorStoreTimeout OpenAIResponseErrorCode = "vector_store_timeout"
const OpenAIResponseErrorCodeInvalidImage OpenAIResponseErrorCode = "invalid_image"
const OpenAIResponseErrorCodeInvalidImageFormat OpenAIResponseErrorCode = "invalid_image_format"
const OpenAIResponseErrorCodeInvalidBase64Image OpenAIResponseErrorCode = "invalid_base64_image"
const OpenAIResponseErrorCodeInvalidImageURL OpenAIResponseErrorCode = "invalid_image_url"
const OpenAIResponseErrorCodeImageTooLarge OpenAIResponseErrorCode = "image_too_large"
const OpenAIResponseErrorCodeImageTooSmall OpenAIResponseErrorCode = "image_too_small"
const OpenAIResponseErrorCodeImageParseError OpenAIResponseErrorCode = "image_parse_error"
const OpenAIResponseErrorCodeImageContentPolicyViolation OpenAIResponseErrorCode = "image_content_policy_violation"
const OpenAIResponseErrorCodeInvalidImageMode OpenAIResponseErrorCode = "invalid_image_mode"
const OpenAIResponseErrorCodeImageFileTooLarge OpenAIResponseErrorCode = "image_file_too_large"
const OpenAIResponseErrorCodeUnsupportedImageMediaType OpenAIResponseErrorCode = "unsupported_image_media_type"
const OpenAIResponseErrorCodeEmptyImageFile OpenAIResponseErrorCode = "empty_image_file"
const OpenAIResponseErrorCodeFailedToDownloadImage OpenAIResponseErrorCode = "failed_to_download_image"
const OpenAIResponseErrorCodeImageFileNotFound OpenAIResponseErrorCode = "image_file_not_found"
Message string
IncompleteDetails IncompleteDetailsOptional

Details about why the response is incomplete.

Reason IncompleteDetailsReasonOptional
One of the following:
const IncompleteDetailsReasonMaxOutputTokens IncompleteDetailsReason = "max_output_tokens"
const IncompleteDetailsReasonContentFilter IncompleteDetailsReason = "content_filter"
Instructions OpenAIResponseInstructionsUnionOptional
One of the following:
string
type OpenAIResponseInstructionsInputItems []OpenAIResponseInstructionsInputItemUnion
One of the following:
type EasyInputMessage struct{…}

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 EasyInputMessageContentUnion
One of the following:
string
type EasyInputMessageContentInputItems []EasyInputMessageContentInputItemUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Role EasyInputMessageRole
One of the following:
const EasyInputMessageRoleUser EasyInputMessageRole = "user"
const EasyInputMessageRoleAssistant EasyInputMessageRole = "assistant"
const EasyInputMessageRoleSystem EasyInputMessageRole = "system"
const EasyInputMessageRoleDeveloper EasyInputMessageRole = "developer"
Phase EasyInputMessagePhaseOptional
One of the following:
const EasyInputMessagePhaseCommentary EasyInputMessagePhase = "commentary"
const EasyInputMessagePhaseFinalAnswer EasyInputMessagePhase = "final_answer"
Type EasyInputMessageTypeOptional
type OpenAITypesResponsesResponseInputItemMessage struct{…}

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 []OpenAITypesResponsesResponseInputItemMessageContentUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Role OpenAITypesResponsesResponseInputItemMessageRole
One of the following:
const OpenAITypesResponsesResponseInputItemMessageRoleUser OpenAITypesResponsesResponseInputItemMessageRole = "user"
const OpenAITypesResponsesResponseInputItemMessageRoleSystem OpenAITypesResponsesResponseInputItemMessageRole = "system"
const OpenAITypesResponsesResponseInputItemMessageRoleDeveloper OpenAITypesResponsesResponseInputItemMessageRole = "developer"
Status OpenAITypesResponsesResponseInputItemMessageStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemMessageStatusInProgress OpenAITypesResponsesResponseInputItemMessageStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemMessageStatusCompleted OpenAITypesResponsesResponseInputItemMessageStatus = "completed"
const OpenAITypesResponsesResponseInputItemMessageStatusIncomplete OpenAITypesResponsesResponseInputItemMessageStatus = "incomplete"
Type OpenAITypesResponsesResponseInputItemMessageTypeOptional
type OpenAIResponseOutputMessage struct{…}

An output message from the model.

ID string
Content []OpenAIResponseOutputMessageContentUnion
One of the following:
type OpenAIResponseOutputText struct{…}

A text output from the model.

Annotations []OpenAIResponseOutputTextAnnotationUnion
One of the following:
type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []OpenAIResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type OpenAIResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string
Type Refusal
Role Assistant
Status OpenAIResponseOutputMessageStatus
One of the following:
const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"
const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"
const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"
Type Message
Phase OpenAIResponseOutputMessagePhaseOptional
One of the following:
const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"
const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"
type OpenAIResponseFileSearchToolCall struct{…}

The results of a file search tool call.

See the file search guide for more information.

ID string
Queries []string
Status OpenAIResponseFileSearchToolCallStatus
One of the following:
const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"
const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"
const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"
const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"
const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"
Type FileSearchCall
Results []OpenAIResponseFileSearchToolCallResultOptional
Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]Optional
One of the following:
string
float64
bool
FileID stringOptional
Filename stringOptional
Score float64Optional
Text stringOptional
type OpenAIResponseComputerToolCall struct{…}

A tool call to a computer use tool.

See the computer use guide for more information.

ID string
Action OpenAIResponseComputerToolCallActionUnion

A click action.

One of the following:
type OpenAIResponseComputerToolCallActionActionClick struct{…}

A click action.

Button string
One of the following:
const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"
const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"
const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"
const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"
const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"
Type Click
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}

A double click action.

Type DoubleClick
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDrag struct{…}

A drag action.

Path []OpenAIResponseComputerToolCallActionActionDragPath
X int64
Y int64
Type Drag
type OpenAIResponseComputerToolCallActionActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string
Type Keypress
type OpenAIResponseComputerToolCallActionActionMove struct{…}

A mouse move action.

Type Move
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}

A screenshot action.

Type Screenshot
type OpenAIResponseComputerToolCallActionActionScroll struct{…}

A scroll action.

ScrollX int64
ScrollY int64
Type Scroll
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionType struct{…}

An action to type in text.

Text string
Type Type
type OpenAIResponseComputerToolCallActionActionWait struct{…}

A wait action.

Type Wait
CallID string
PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck
ID string
Code stringOptional
Message stringOptional
Status OpenAIResponseComputerToolCallStatus
One of the following:
const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"
const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"
const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"
Type ComputerCall
type OpenAITypesResponsesResponseInputItemComputerCallOutput struct{…}

The output of a computer tool call.

CallID string

A computer screenshot image used with the computer use tool.

Type ComputerScreenshot
FileID stringOptional
ImageURL stringOptional
Type ComputerCallOutput
ID stringOptional
AcknowledgedSafetyChecks []OpenAITypesResponsesResponseInputItemComputerCallOutputAcknowledgedSafetyCheckOptional
ID string
Code stringOptional
Message stringOptional
Status OpenAITypesResponsesResponseInputItemComputerCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "incomplete"
One of the following:
One of the following:
type OpenAIResponseFunctionToolCall struct{…}

A tool call to run a function.

See the function calling guide for more information.

Arguments string
CallID string
Name string
Type FunctionCall
ID stringOptional
Status OpenAIResponseFunctionToolCallStatusOptional
One of the following:
const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"
const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"
const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"
type OpenAITypesResponsesResponseInputItemFunctionCallOutput struct{…}

The output of a function tool call.

CallID string
Output OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputUnion
One of the following:
string
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentList []OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemUnion
One of the following:
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputTextContent struct{…}

A text input to the model.

Text string
Type InputText
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContent struct{…}

An image input to the model.

Learn about image inputs

Type InputImage
Detail stringOptional
One of the following:
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailLow OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "low"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailHigh OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "high"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailAuto OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "auto"
FileID stringOptional
ImageURL stringOptional
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputFileContent struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Type FunctionCallOutput
ID stringOptional
Status OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "incomplete"
type OpenAIResponseReasoningItem struct{…}

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.

ID string
Summary []OpenAIResponseReasoningItemSummary
Text string
Type SummaryText
Type Reasoning
Content []OpenAIResponseReasoningItemContentOptional
Text string
Type ReasoningText
EncryptedContent stringOptional
Status OpenAIResponseReasoningItemStatusOptional
One of the following:
const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"
const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"
const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"
type ResponseCompactionItemParamResp struct{…}

A compaction item generated by the v1/responses/compact API.

EncryptedContent string
Type Compaction
ID stringOptional
type OpenAITypesResponsesResponseInputItemImageGenerationCall struct{…}

An image generation request made by the model.

ID string
Status OpenAITypesResponsesResponseInputItemImageGenerationCallStatus
One of the following:
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "generating"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "failed"
Type ImageGenerationCall
Result stringOptional
type OpenAIResponseCodeInterpreterToolCall struct{…}

A tool call to run code.

ID string
ContainerID string
Status OpenAIResponseCodeInterpreterToolCallStatus
One of the following:
const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"
const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"
const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"
const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"
const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"
Type CodeInterpreterCall
Code stringOptional
Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnionOptional
One of the following:
type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}

The logs output from the code interpreter.

Logs string
Type Logs
type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}

The image output from the code interpreter.

Type Image
URL string
type OpenAITypesResponsesResponseInputItemLocalShellCall struct{…}

A tool call to run a command on the local shell.

ID string
Action OpenAITypesResponsesResponseInputItemLocalShellCallAction

Execute a shell command on the server.

Command []string
Env map[string, string]
Type Exec
TimeoutMs int64Optional
User stringOptional
WorkingDirectory stringOptional
CallID string
Status OpenAITypesResponsesResponseInputItemLocalShellCallStatus
One of the following:
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "incomplete"
Type LocalShellCall
type OpenAITypesResponsesResponseInputItemLocalShellCallOutput struct{…}

The output of a local shell tool call.

ID string
Output string
Type LocalShellCallOutput
Status OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "incomplete"
type ShellCall struct{…}

A tool representing a request to execute one or more shell commands.

Action ShellCallAction

The shell commands and limits that describe how to run the tool call.

Commands []string
MaxOutputLength int64Optional
TimeoutMs int64Optional
CallID string
Type ShellCall
ID stringOptional
Environment ShellCallEnvironmentUnionOptional
One of the following:
type LocalEnvironment struct{…}
Type Local
Skills []LocalEnvironmentSkillOptional
Description string
Name string
Path string
type ContainerReference struct{…}
ContainerID string
Type ContainerReference
Status ShellCallStatusOptional
One of the following:
const ShellCallStatusInProgress ShellCallStatus = "in_progress"
const ShellCallStatusCompleted ShellCallStatus = "completed"
const ShellCallStatusIncomplete ShellCallStatus = "incomplete"
type ShellCallOutput struct{…}

The streamed output items emitted by a shell tool call.

CallID string
Output []ShellCallOutputOutput
Outcome ShellCallOutputOutputOutcomeUnion

Indicates that the shell call exceeded its configured time limit.

One of the following:
type ShellCallOutputOutputOutcomeOutcomeTimeout struct{…}

Indicates that the shell call exceeded its configured time limit.

Type Timeout
type ShellCallOutputOutputOutcomeOutcomeExit struct{…}

Indicates that the shell commands finished and returned an exit code.

ExitCode int64
Type Exit
Stderr string
Stdout string
Type ShellCallOutput
ID stringOptional
MaxOutputLength int64Optional
Status ShellCallOutputStatusOptional
One of the following:
const ShellCallOutputStatusInProgress ShellCallOutputStatus = "in_progress"
const ShellCallOutputStatusCompleted ShellCallOutputStatus = "completed"
const ShellCallOutputStatusIncomplete ShellCallOutputStatus = "incomplete"
type ApplyPatchCall struct{…}

A tool call representing a request to create, delete, or update files using diff patches.

CallID string
Operation ApplyPatchCallOperationUnion

Instruction for creating a new file via the apply_patch tool.

One of the following:
type ApplyPatchCallOperationApplyPatchCallOperationCreateFile struct{…}

Instruction for creating a new file via the apply_patch tool.

Diff string
Path string
Type CreateFile
type ApplyPatchCallOperationApplyPatchCallOperationDeleteFile struct{…}

Instruction for deleting an existing file via the apply_patch tool.

Path string
Type DeleteFile
type ApplyPatchCallOperationApplyPatchCallOperationUpdateFile struct{…}

Instruction for updating an existing file via the apply_patch tool.

Diff string
Path string
Type UpdateFile
Status ApplyPatchCallStatus
One of the following:
const ApplyPatchCallStatusInProgress ApplyPatchCallStatus = "in_progress"
const ApplyPatchCallStatusCompleted ApplyPatchCallStatus = "completed"
Type ApplyPatchCall
ID stringOptional
type ApplyPatchCallOutput struct{…}

The streamed output emitted by an apply patch tool call.

CallID string
Status ApplyPatchCallOutputStatus
One of the following:
const ApplyPatchCallOutputStatusCompleted ApplyPatchCallOutputStatus = "completed"
const ApplyPatchCallOutputStatusFailed ApplyPatchCallOutputStatus = "failed"
Type ApplyPatchCallOutput
ID stringOptional
Output stringOptional
type OpenAITypesResponsesResponseInputItemMcpListTools struct{…}

A list of tools available on an MCP server.

ID string
ServerLabel string
Tools []OpenAITypesResponsesResponseInputItemMcpListToolsTool
InputSchema any
Name string
Annotations anyOptional
Description stringOptional
Type McpListTools
Error stringOptional
type McpApprovalRequest struct{…}

A request for human approval of a tool invocation.

ID string
Arguments string
Name string
ServerLabel string
Type McpApprovalRequest
type OpenAITypesResponsesResponseInputItemMcpApprovalResponse struct{…}

A response to an MCP approval request.

ApprovalRequestID string
Approve bool
Type McpApprovalResponse
ID stringOptional
Reason stringOptional
type OpenAITypesResponsesResponseInputItemMcpCall struct{…}

An invocation of a tool on an MCP server.

ID string
Arguments string
Name string
ServerLabel string
Type McpCall
ApprovalRequestID stringOptional
Error stringOptional
Output stringOptional
Status OpenAITypesResponsesResponseInputItemMcpCallStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemMcpCallStatusInProgress OpenAITypesResponsesResponseInputItemMcpCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemMcpCallStatusCompleted OpenAITypesResponsesResponseInputItemMcpCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseInputItemMcpCallStatus = "incomplete"
const OpenAITypesResponsesResponseInputItemMcpCallStatusCalling OpenAITypesResponsesResponseInputItemMcpCallStatus = "calling"
const OpenAITypesResponsesResponseInputItemMcpCallStatusFailed OpenAITypesResponsesResponseInputItemMcpCallStatus = "failed"
type OpenAIResponseCustomToolCallOutput struct{…}

The output of a custom tool call from your code, being sent back to the model.

CallID string
Output OpenAIResponseCustomToolCallOutputOutputUnion
One of the following:
string
type OpenAIResponseCustomToolCallOutputOutputOutputContentList []OpenAIResponseCustomToolCallOutputOutputOutputContentListItemUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Type CustomToolCallOutput
ID stringOptional
type OpenAIResponseCustomToolCall struct{…}

A call to a custom tool created by the model.

CallID string
Input string
Name string
Type CustomToolCall
ID stringOptional
type OpenAITypesResponsesResponseInputItemItemReference struct{…}

An internal identifier for an item to reference.

ID string
Type OpenAITypesResponsesResponseInputItemItemReferenceTypeOptional
MaxOutputTokens int64Optional
MaxToolCalls int64Optional
Metadata map[string, string]Optional
PreviousResponseID stringOptional
Prompt OpenAIResponsePromptOptional

Reference to a prompt template and its variables. Learn more.

ID string
Variables map[string, OpenAIResponsePromptVariableUnion]Optional
One of the following:
string
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Version stringOptional
PromptCacheKey stringOptional
PromptCacheRetention OpenAIResponsePromptCacheRetentionOptional
One of the following:
const OpenAIResponsePromptCacheRetentionInMemory OpenAIResponsePromptCacheRetention = "in-memory"
const OpenAIResponsePromptCacheRetention24h OpenAIResponsePromptCacheRetention = "24h"
Reasoning ReasoningOptional

gpt-5 and o-series models only

Configuration options for reasoning models.

Effort ReasoningEffortOptional
One of the following:
const ReasoningEffortNone ReasoningEffort = "none"
const ReasoningEffortMinimal ReasoningEffort = "minimal"
const ReasoningEffortLow ReasoningEffort = "low"
const ReasoningEffortMedium ReasoningEffort = "medium"
const ReasoningEffortHigh ReasoningEffort = "high"
const ReasoningEffortXhigh ReasoningEffort = "xhigh"
GenerateSummary ReasoningGenerateSummaryOptional
One of the following:
const ReasoningGenerateSummaryAuto ReasoningGenerateSummary = "auto"
const ReasoningGenerateSummaryConcise ReasoningGenerateSummary = "concise"
const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"
Summary ReasoningSummaryOptional
One of the following:
const ReasoningSummaryAuto ReasoningSummary = "auto"
const ReasoningSummaryConcise ReasoningSummary = "concise"
const ReasoningSummaryDetailed ReasoningSummary = "detailed"
SafetyIdentifier stringOptional
ServiceTier OpenAIResponseServiceTierOptional
One of the following:
const OpenAIResponseServiceTierAuto OpenAIResponseServiceTier = "auto"
const OpenAIResponseServiceTierDefault OpenAIResponseServiceTier = "default"
const OpenAIResponseServiceTierFlex OpenAIResponseServiceTier = "flex"
const OpenAIResponseServiceTierScale OpenAIResponseServiceTier = "scale"
const OpenAIResponseServiceTierPriority OpenAIResponseServiceTier = "priority"
Status OpenAIResponseStatusOptional
One of the following:
const OpenAIResponseStatusCompleted OpenAIResponseStatus = "completed"
const OpenAIResponseStatusFailed OpenAIResponseStatus = "failed"
const OpenAIResponseStatusInProgress OpenAIResponseStatus = "in_progress"
const OpenAIResponseStatusCancelled OpenAIResponseStatus = "cancelled"
const OpenAIResponseStatusQueued OpenAIResponseStatus = "queued"
const OpenAIResponseStatusIncomplete OpenAIResponseStatus = "incomplete"
Temperature float64Optional

Configuration options for a text response from the model.

Can be plain text or structured JSON data. Learn more:

Format OpenAIResponseTextConfigFormatUnionOptional

Default response format. Used to generate text responses.

One of the following:
type OpenAIResponseTextConfigFormatResponseFormatText struct{…}

Default response format. Used to generate text responses.

Type Text
type OpenAIResponseTextConfigFormatResponseFormatTextJsonSchemaConfig struct{…}

JSON Schema response format.

Used to generate structured JSON responses. Learn more about Structured Outputs.

Name string
Schema map[string, any]
Type JsonSchema
Description stringOptional
Strict boolOptional
type OpenAIResponseTextConfigFormatResponseFormatJsonObject struct{…}

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.

Type JsonObject
Verbosity OpenAIResponseTextConfigVerbosityOptional
One of the following:
const OpenAIResponseTextConfigVerbosityLow OpenAIResponseTextConfigVerbosity = "low"
const OpenAIResponseTextConfigVerbosityMedium OpenAIResponseTextConfigVerbosity = "medium"
const OpenAIResponseTextConfigVerbosityHigh OpenAIResponseTextConfigVerbosity = "high"
TopLogprobs int64Optional
TopP float64Optional
Truncation OpenAIResponseTruncationOptional
One of the following:
const OpenAIResponseTruncationAuto OpenAIResponseTruncation = "auto"
const OpenAIResponseTruncationDisabled OpenAIResponseTruncation = "disabled"
Usage OpenAIResponseUsageOptional

Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.

InputTokens int64
InputTokensDetails OpenAIResponseUsageInputTokensDetails

A detailed breakdown of the input tokens.

CachedTokens int64
OutputTokens int64
OutputTokensDetails OpenAIResponseUsageOutputTokensDetails

A detailed breakdown of the output tokens.

ReasoningTokens int64
TotalTokens int64
User stringOptional
type ResponseNewResponseResponseAudioDeltaEvent struct{…}

Emitted when there is a partial audio response.

Delta string
SequenceNumber int64
Type ResponseAudioDelta
type ResponseNewResponseResponseAudioDoneEvent struct{…}

Emitted when the audio response is complete.

SequenceNumber int64
Type ResponseAudioDone
type ResponseNewResponseResponseAudioTranscriptDeltaEvent struct{…}

Emitted when there is a partial transcript of audio.

Delta string
SequenceNumber int64
Type ResponseAudioTranscriptDelta
type ResponseNewResponseResponseAudioTranscriptDoneEvent struct{…}

Emitted when the full audio transcript is completed.

SequenceNumber int64
Type ResponseAudioTranscriptDone
type ResponseNewResponseResponseCodeInterpreterCallCodeDeltaEvent struct{…}

Emitted when a partial code snippet is streamed by the code interpreter.

Delta string
ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseCodeInterpreterCallCodeDelta
type ResponseNewResponseResponseCodeInterpreterCallCodeDoneEvent struct{…}

Emitted when the code snippet is finalized by the code interpreter.

Code string
ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseCodeInterpreterCallCodeDone
type ResponseNewResponseResponseCodeInterpreterCallCompletedEvent struct{…}

Emitted when the code interpreter call is completed.

ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseCodeInterpreterCallCompleted
type ResponseNewResponseResponseCodeInterpreterCallInProgressEvent struct{…}

Emitted when a code interpreter call is in progress.

ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseCodeInterpreterCallInProgress
type ResponseNewResponseResponseCodeInterpreterCallInterpretingEvent struct{…}

Emitted when the code interpreter is actively interpreting the code snippet.

ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseCodeInterpreterCallInterpreting
type ResponseNewResponseResponseCompletedEvent struct{…}

Emitted when the model response is complete.

ID string
CreatedAt float64
Model OpenAIResponseModel
One of the following:
type OpenAIResponseModel string
One of the following:
const OpenAIResponseModelGpt5_2 OpenAIResponseModel = "gpt-5.2"
const OpenAIResponseModelGpt5_2_2025_12_11 OpenAIResponseModel = "gpt-5.2-2025-12-11"
const OpenAIResponseModelGpt5_2ChatLatest OpenAIResponseModel = "gpt-5.2-chat-latest"
const OpenAIResponseModelGpt5_2Pro OpenAIResponseModel = "gpt-5.2-pro"
const OpenAIResponseModelGpt5_2Pro2025_12_11 OpenAIResponseModel = "gpt-5.2-pro-2025-12-11"
const OpenAIResponseModelGpt5_1 OpenAIResponseModel = "gpt-5.1"
const OpenAIResponseModelGpt5_1_2025_11_13 OpenAIResponseModel = "gpt-5.1-2025-11-13"
const OpenAIResponseModelGpt5_1Codex OpenAIResponseModel = "gpt-5.1-codex"
const OpenAIResponseModelGpt5_1Mini OpenAIResponseModel = "gpt-5.1-mini"
const OpenAIResponseModelGpt5_1ChatLatest OpenAIResponseModel = "gpt-5.1-chat-latest"
const OpenAIResponseModelGpt5 OpenAIResponseModel = "gpt-5"
const OpenAIResponseModelGpt5Mini OpenAIResponseModel = "gpt-5-mini"
const OpenAIResponseModelGpt5Nano OpenAIResponseModel = "gpt-5-nano"
const OpenAIResponseModelGpt5_2025_08_07 OpenAIResponseModel = "gpt-5-2025-08-07"
const OpenAIResponseModelGpt5Mini2025_08_07 OpenAIResponseModel = "gpt-5-mini-2025-08-07"
const OpenAIResponseModelGpt5Nano2025_08_07 OpenAIResponseModel = "gpt-5-nano-2025-08-07"
const OpenAIResponseModelGpt5ChatLatest OpenAIResponseModel = "gpt-5-chat-latest"
const OpenAIResponseModelGpt4_1 OpenAIResponseModel = "gpt-4.1"
const OpenAIResponseModelGpt4_1Mini OpenAIResponseModel = "gpt-4.1-mini"
const OpenAIResponseModelGpt4_1Nano OpenAIResponseModel = "gpt-4.1-nano"
const OpenAIResponseModelGpt4_1_2025_04_14 OpenAIResponseModel = "gpt-4.1-2025-04-14"
const OpenAIResponseModelGpt4_1Mini2025_04_14 OpenAIResponseModel = "gpt-4.1-mini-2025-04-14"
const OpenAIResponseModelGpt4_1Nano2025_04_14 OpenAIResponseModel = "gpt-4.1-nano-2025-04-14"
const OpenAIResponseModelO4Mini OpenAIResponseModel = "o4-mini"
const OpenAIResponseModelO4Mini2025_04_16 OpenAIResponseModel = "o4-mini-2025-04-16"
const OpenAIResponseModelO3 OpenAIResponseModel = "o3"
const OpenAIResponseModelO3_2025_04_16 OpenAIResponseModel = "o3-2025-04-16"
const OpenAIResponseModelO3Mini OpenAIResponseModel = "o3-mini"
const OpenAIResponseModelO3Mini2025_01_31 OpenAIResponseModel = "o3-mini-2025-01-31"
const OpenAIResponseModelO1 OpenAIResponseModel = "o1"
const OpenAIResponseModelO1_2024_12_17 OpenAIResponseModel = "o1-2024-12-17"
const OpenAIResponseModelO1Preview OpenAIResponseModel = "o1-preview"
const OpenAIResponseModelO1Preview2024_09_12 OpenAIResponseModel = "o1-preview-2024-09-12"
const OpenAIResponseModelO1Mini OpenAIResponseModel = "o1-mini"
const OpenAIResponseModelO1Mini2024_09_12 OpenAIResponseModel = "o1-mini-2024-09-12"
const OpenAIResponseModelGpt4o OpenAIResponseModel = "gpt-4o"
const OpenAIResponseModelGpt4o2024_11_20 OpenAIResponseModel = "gpt-4o-2024-11-20"
const OpenAIResponseModelGpt4o2024_08_06 OpenAIResponseModel = "gpt-4o-2024-08-06"
const OpenAIResponseModelGpt4o2024_05_13 OpenAIResponseModel = "gpt-4o-2024-05-13"
const OpenAIResponseModelGpt4oAudioPreview OpenAIResponseModel = "gpt-4o-audio-preview"
const OpenAIResponseModelGpt4oAudioPreview2024_10_01 OpenAIResponseModel = "gpt-4o-audio-preview-2024-10-01"
const OpenAIResponseModelGpt4oAudioPreview2024_12_17 OpenAIResponseModel = "gpt-4o-audio-preview-2024-12-17"
const OpenAIResponseModelGpt4oAudioPreview2025_06_03 OpenAIResponseModel = "gpt-4o-audio-preview-2025-06-03"
const OpenAIResponseModelGpt4oMiniAudioPreview OpenAIResponseModel = "gpt-4o-mini-audio-preview"
const OpenAIResponseModelGpt4oMiniAudioPreview2024_12_17 OpenAIResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"
const OpenAIResponseModelGpt4oSearchPreview OpenAIResponseModel = "gpt-4o-search-preview"
const OpenAIResponseModelGpt4oMiniSearchPreview OpenAIResponseModel = "gpt-4o-mini-search-preview"
const OpenAIResponseModelGpt4oSearchPreview2025_03_11 OpenAIResponseModel = "gpt-4o-search-preview-2025-03-11"
const OpenAIResponseModelGpt4oMiniSearchPreview2025_03_11 OpenAIResponseModel = "gpt-4o-mini-search-preview-2025-03-11"
const OpenAIResponseModelChatgpt4oLatest OpenAIResponseModel = "chatgpt-4o-latest"
const OpenAIResponseModelCodexMiniLatest OpenAIResponseModel = "codex-mini-latest"
const OpenAIResponseModelGpt4oMini OpenAIResponseModel = "gpt-4o-mini"
const OpenAIResponseModelGpt4oMini2024_07_18 OpenAIResponseModel = "gpt-4o-mini-2024-07-18"
const OpenAIResponseModelGpt4Turbo OpenAIResponseModel = "gpt-4-turbo"
const OpenAIResponseModelGpt4Turbo2024_04_09 OpenAIResponseModel = "gpt-4-turbo-2024-04-09"
const OpenAIResponseModelGpt4_0125Preview OpenAIResponseModel = "gpt-4-0125-preview"
const OpenAIResponseModelGpt4TurboPreview OpenAIResponseModel = "gpt-4-turbo-preview"
const OpenAIResponseModelGpt4_1106Preview OpenAIResponseModel = "gpt-4-1106-preview"
const OpenAIResponseModelGpt4VisionPreview OpenAIResponseModel = "gpt-4-vision-preview"
const OpenAIResponseModelGpt4 OpenAIResponseModel = "gpt-4"
const OpenAIResponseModelGpt4_0314 OpenAIResponseModel = "gpt-4-0314"
const OpenAIResponseModelGpt4_0613 OpenAIResponseModel = "gpt-4-0613"
const OpenAIResponseModelGpt4_32k OpenAIResponseModel = "gpt-4-32k"
const OpenAIResponseModelGpt4_32k0314 OpenAIResponseModel = "gpt-4-32k-0314"
const OpenAIResponseModelGpt4_32k0613 OpenAIResponseModel = "gpt-4-32k-0613"
const OpenAIResponseModelGpt3_5Turbo OpenAIResponseModel = "gpt-3.5-turbo"
const OpenAIResponseModelGpt3_5Turbo16k OpenAIResponseModel = "gpt-3.5-turbo-16k"
const OpenAIResponseModelGpt3_5Turbo0301 OpenAIResponseModel = "gpt-3.5-turbo-0301"
const OpenAIResponseModelGpt3_5Turbo0613 OpenAIResponseModel = "gpt-3.5-turbo-0613"
const OpenAIResponseModelGpt3_5Turbo1106 OpenAIResponseModel = "gpt-3.5-turbo-1106"
const OpenAIResponseModelGpt3_5Turbo0125 OpenAIResponseModel = "gpt-3.5-turbo-0125"
const OpenAIResponseModelGpt3_5Turbo16k0613 OpenAIResponseModel = "gpt-3.5-turbo-16k-0613"
const OpenAIResponseModelO1Pro OpenAIResponseModel = "o1-pro"
const OpenAIResponseModelO1Pro2025_03_19 OpenAIResponseModel = "o1-pro-2025-03-19"
const OpenAIResponseModelO3Pro OpenAIResponseModel = "o3-pro"
const OpenAIResponseModelO3Pro2025_06_10 OpenAIResponseModel = "o3-pro-2025-06-10"
const OpenAIResponseModelO3DeepResearch OpenAIResponseModel = "o3-deep-research"
const OpenAIResponseModelO3DeepResearch2025_06_26 OpenAIResponseModel = "o3-deep-research-2025-06-26"
const OpenAIResponseModelO4MiniDeepResearch OpenAIResponseModel = "o4-mini-deep-research"
const OpenAIResponseModelO4MiniDeepResearch2025_06_26 OpenAIResponseModel = "o4-mini-deep-research-2025-06-26"
const OpenAIResponseModelComputerUsePreview OpenAIResponseModel = "computer-use-preview"
const OpenAIResponseModelComputerUsePreview2025_03_11 OpenAIResponseModel = "computer-use-preview-2025-03-11"
const OpenAIResponseModelGpt5Codex OpenAIResponseModel = "gpt-5-codex"
const OpenAIResponseModelGpt5Pro OpenAIResponseModel = "gpt-5-pro"
const OpenAIResponseModelGpt5Pro2025_10_06 OpenAIResponseModel = "gpt-5-pro-2025-10-06"
const OpenAIResponseModelGpt5_1CodexMax OpenAIResponseModel = "gpt-5.1-codex-max"
string
Object Response
Output []OpenAIResponseOutputUnion
One of the following:
type OpenAIResponseOutputMessage struct{…}

An output message from the model.

ID string
Content []OpenAIResponseOutputMessageContentUnion
One of the following:
type OpenAIResponseOutputText struct{…}

A text output from the model.

Annotations []OpenAIResponseOutputTextAnnotationUnion
One of the following:
type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []OpenAIResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type OpenAIResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string
Type Refusal
Role Assistant
Status OpenAIResponseOutputMessageStatus
One of the following:
const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"
const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"
const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"
Type Message
Phase OpenAIResponseOutputMessagePhaseOptional
One of the following:
const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"
const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"
type OpenAIResponseFileSearchToolCall struct{…}

The results of a file search tool call.

See the file search guide for more information.

ID string
Queries []string
Status OpenAIResponseFileSearchToolCallStatus
One of the following:
const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"
const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"
const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"
const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"
const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"
Type FileSearchCall
Results []OpenAIResponseFileSearchToolCallResultOptional
Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]Optional
One of the following:
string
float64
bool
FileID stringOptional
Filename stringOptional
Score float64Optional
Text stringOptional
type OpenAIResponseFunctionToolCall struct{…}

A tool call to run a function.

See the function calling guide for more information.

Arguments string
CallID string
Name string
Type FunctionCall
ID stringOptional
Status OpenAIResponseFunctionToolCallStatusOptional
One of the following:
const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"
const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"
const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"
One of the following:
One of the following:
type OpenAIResponseComputerToolCall struct{…}

A tool call to a computer use tool.

See the computer use guide for more information.

ID string
Action OpenAIResponseComputerToolCallActionUnion

A click action.

One of the following:
type OpenAIResponseComputerToolCallActionActionClick struct{…}

A click action.

Button string
One of the following:
const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"
const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"
const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"
const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"
const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"
Type Click
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}

A double click action.

Type DoubleClick
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDrag struct{…}

A drag action.

Path []OpenAIResponseComputerToolCallActionActionDragPath
X int64
Y int64
Type Drag
type OpenAIResponseComputerToolCallActionActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string
Type Keypress
type OpenAIResponseComputerToolCallActionActionMove struct{…}

A mouse move action.

Type Move
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}

A screenshot action.

Type Screenshot
type OpenAIResponseComputerToolCallActionActionScroll struct{…}

A scroll action.

ScrollX int64
ScrollY int64
Type Scroll
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionType struct{…}

An action to type in text.

Text string
Type Type
type OpenAIResponseComputerToolCallActionActionWait struct{…}

A wait action.

Type Wait
CallID string
PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck
ID string
Code stringOptional
Message stringOptional
Status OpenAIResponseComputerToolCallStatus
One of the following:
const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"
const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"
const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"
Type ComputerCall
type OpenAIResponseReasoningItem struct{…}

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.

ID string
Summary []OpenAIResponseReasoningItemSummary
Text string
Type SummaryText
Type Reasoning
Content []OpenAIResponseReasoningItemContentOptional
Text string
Type ReasoningText
EncryptedContent stringOptional
Status OpenAIResponseReasoningItemStatusOptional
One of the following:
const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"
const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"
const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"
type ResponseCompactionItem struct{…}

A compaction item generated by the v1/responses/compact API.

ID string
EncryptedContent string
Type Compaction
CreatedBy stringOptional
type OpenAITypesResponsesResponseOutputItemImageGenerationCall struct{…}

An image generation request made by the model.

ID string
Status OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus
One of the following:
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "generating"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "failed"
Type ImageGenerationCall
Result stringOptional
type OpenAIResponseCodeInterpreterToolCall struct{…}

A tool call to run code.

ID string
ContainerID string
Status OpenAIResponseCodeInterpreterToolCallStatus
One of the following:
const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"
const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"
const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"
const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"
const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"
Type CodeInterpreterCall
Code stringOptional
Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnionOptional
One of the following:
type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}

The logs output from the code interpreter.

Logs string
Type Logs
type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}

The image output from the code interpreter.

Type Image
URL string
type OpenAITypesResponsesResponseOutputItemLocalShellCall struct{…}

A tool call to run a command on the local shell.

ID string
Action OpenAITypesResponsesResponseOutputItemLocalShellCallAction

Execute a shell command on the server.

Command []string
Env map[string, string]
Type Exec
TimeoutMs int64Optional
User stringOptional
WorkingDirectory stringOptional
CallID string
Status OpenAITypesResponsesResponseOutputItemLocalShellCallStatus
One of the following:
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "incomplete"
Type LocalShellCall
type ResponseFunctionShellToolCall struct{…}

A tool call that executes one or more shell commands in a managed environment.

ID string
Action ResponseFunctionShellToolCallAction

The shell commands and limits that describe how to run the tool call.

Commands []string
MaxOutputLength int64Optional
TimeoutMs int64Optional
CallID string
Status ResponseFunctionShellToolCallStatus
One of the following:
const ResponseFunctionShellToolCallStatusInProgress ResponseFunctionShellToolCallStatus = "in_progress"
const ResponseFunctionShellToolCallStatusCompleted ResponseFunctionShellToolCallStatus = "completed"
const ResponseFunctionShellToolCallStatusIncomplete ResponseFunctionShellToolCallStatus = "incomplete"
Type ShellCall
CreatedBy stringOptional
Environment ResponseFunctionShellToolCallEnvironmentUnionOptional

Represents the use of a local environment to perform shell actions.

One of the following:
type ResponseFunctionShellToolCallEnvironmentResponseLocalEnvironment struct{…}

Represents the use of a local environment to perform shell actions.

Type Local
type ResponseFunctionShellToolCallEnvironmentResponseContainerReference struct{…}

Represents a container created with /v1/containers.

ContainerID string
Type ContainerReference
type ResponseFunctionShellToolCallOutput struct{…}

The output of a shell tool call that was emitted.

ID string
CallID string
Output []ResponseFunctionShellToolCallOutputOutput
Outcome ResponseFunctionShellToolCallOutputOutputOutcomeUnion

Indicates that the shell call exceeded its configured time limit.

One of the following:
type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeTimeout struct{…}

Indicates that the shell call exceeded its configured time limit.

Type Timeout
type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeExit struct{…}

Indicates that the shell commands finished and returned an exit code.

ExitCode int64
Type Exit
Stderr string
Stdout string
CreatedBy stringOptional
Status ResponseFunctionShellToolCallOutputStatus
One of the following:
const ResponseFunctionShellToolCallOutputStatusInProgress ResponseFunctionShellToolCallOutputStatus = "in_progress"
const ResponseFunctionShellToolCallOutputStatusCompleted ResponseFunctionShellToolCallOutputStatus = "completed"
const ResponseFunctionShellToolCallOutputStatusIncomplete ResponseFunctionShellToolCallOutputStatus = "incomplete"
Type ShellCallOutput
CreatedBy stringOptional
MaxOutputLength int64Optional
type ResponseApplyPatchToolCall struct{…}

A tool call that applies file diffs by creating, deleting, or updating files.

ID string
CallID string
Operation ResponseApplyPatchToolCallOperationUnion

Instruction describing how to create a file via the apply_patch tool.

One of the following:
type ResponseApplyPatchToolCallOperationOperationCreateFile struct{…}

Instruction describing how to create a file via the apply_patch tool.

Diff string
Path string
Type CreateFile
type ResponseApplyPatchToolCallOperationOperationDeleteFile struct{…}

Instruction describing how to delete a file via the apply_patch tool.

Path string
Type DeleteFile
type ResponseApplyPatchToolCallOperationOperationUpdateFile struct{…}

Instruction describing how to update a file via the apply_patch tool.

Diff string
Path string
Type UpdateFile
Status ResponseApplyPatchToolCallStatus
One of the following:
const ResponseApplyPatchToolCallStatusInProgress ResponseApplyPatchToolCallStatus = "in_progress"
const ResponseApplyPatchToolCallStatusCompleted ResponseApplyPatchToolCallStatus = "completed"
Type ApplyPatchCall
CreatedBy stringOptional
type ResponseApplyPatchToolCallOutput struct{…}

The output emitted by an apply patch tool call.

ID string
CallID string
Status ResponseApplyPatchToolCallOutputStatus
One of the following:
const ResponseApplyPatchToolCallOutputStatusCompleted ResponseApplyPatchToolCallOutputStatus = "completed"
const ResponseApplyPatchToolCallOutputStatusFailed ResponseApplyPatchToolCallOutputStatus = "failed"
Type ApplyPatchCallOutput
CreatedBy stringOptional
Output stringOptional
type OpenAITypesResponsesResponseOutputItemMcpCall struct{…}

An invocation of a tool on an MCP server.

ID string
Arguments string
Name string
ServerLabel string
Type McpCall
ApprovalRequestID stringOptional
Error stringOptional
Output stringOptional
Status OpenAITypesResponsesResponseOutputItemMcpCallStatusOptional
One of the following:
const OpenAITypesResponsesResponseOutputItemMcpCallStatusInProgress OpenAITypesResponsesResponseOutputItemMcpCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusCompleted OpenAITypesResponsesResponseOutputItemMcpCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseOutputItemMcpCallStatus = "incomplete"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusCalling OpenAITypesResponsesResponseOutputItemMcpCallStatus = "calling"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusFailed OpenAITypesResponsesResponseOutputItemMcpCallStatus = "failed"
type OpenAITypesResponsesResponseOutputItemMcpListTools struct{…}

A list of tools available on an MCP server.

ID string
ServerLabel string
Tools []OpenAITypesResponsesResponseOutputItemMcpListToolsTool
InputSchema any
Name string
Annotations anyOptional
Description stringOptional
Type McpListTools
Error stringOptional
type McpApprovalRequest struct{…}

A request for human approval of a tool invocation.

ID string
Arguments string
Name string
ServerLabel string
Type McpApprovalRequest
type OpenAIResponseCustomToolCall struct{…}

A call to a custom tool created by the model.

CallID string
Input string
Name string
Type CustomToolCall
ID stringOptional
ParallelToolCalls bool
ToolChoice OpenAIResponseToolChoiceUnion

Constrains the tools available to the model to a pre-defined set.

One of the following:
type OpenAIResponseToolChoiceString string
One of the following:
const OpenAIResponseToolChoiceStringNone OpenAIResponseToolChoiceString = "none"
const OpenAIResponseToolChoiceStringAuto OpenAIResponseToolChoiceString = "auto"
const OpenAIResponseToolChoiceStringRequired OpenAIResponseToolChoiceString = "required"
type ToolChoiceAllowed struct{…}

Constrains the tools available to the model to a pre-defined set.

Mode ToolChoiceAllowedMode
One of the following:
const ToolChoiceAllowedModeAuto ToolChoiceAllowedMode = "auto"
const ToolChoiceAllowedModeRequired ToolChoiceAllowedMode = "required"
Tools []map[string, any]
Type AllowedTools
type ToolChoiceTypes struct{…}

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

Type ToolChoiceTypesType
One of the following:
const ToolChoiceTypesTypeFileSearch ToolChoiceTypesType = "file_search"
const ToolChoiceTypesTypeWebSearchPreview ToolChoiceTypesType = "web_search_preview"
const ToolChoiceTypesTypeComputerUsePreview ToolChoiceTypesType = "computer_use_preview"
const ToolChoiceTypesTypeWebSearchPreview2025_03_11 ToolChoiceTypesType = "web_search_preview_2025_03_11"
const ToolChoiceTypesTypeImageGeneration ToolChoiceTypesType = "image_generation"
const ToolChoiceTypesTypeCodeInterpreter ToolChoiceTypesType = "code_interpreter"
type ToolChoiceFunction struct{…}

Use this option to force the model to call a specific function.

Name string
Type Function
type ToolChoiceMcp struct{…}

Use this option to force the model to call a specific tool on a remote MCP server.

ServerLabel string
Type Mcp
Name stringOptional
type ToolChoiceCustom struct{…}

Use this option to force the model to call a specific custom tool.

Name string
Type Custom
type ToolChoiceApplyPatch struct{…}

Forces the model to call the apply_patch tool when executing a tool call.

Type ApplyPatch
type ToolChoiceShell struct{…}

Forces the model to call the shell tool when a tool call is required.

Type Shell
Tools []OpenAIResponseToolUnion
One of the following:
type FunctionTool struct{…}

Defines a function in your own code the model can choose to call.

Learn more about function calling.

Name string
Type Function
Description stringOptional
Parameters map[string, any]Optional
Strict boolOptional
type FileSearchTool struct{…}

A tool that searches for relevant content from uploaded files.

Learn more about the file search tool.

Type FileSearch
VectorStoreIDs []string
Filters FileSearchToolFiltersUnionOptional

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

One of the following:
type FileSearchToolFiltersComparisonFilter struct{…}

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

Key string
Type string
One of the following:
const FileSearchToolFiltersComparisonFilterTypeEq FileSearchToolFiltersComparisonFilterType = "eq"
const FileSearchToolFiltersComparisonFilterTypeNe FileSearchToolFiltersComparisonFilterType = "ne"
const FileSearchToolFiltersComparisonFilterTypeGt FileSearchToolFiltersComparisonFilterType = "gt"
const FileSearchToolFiltersComparisonFilterTypeGte FileSearchToolFiltersComparisonFilterType = "gte"
const FileSearchToolFiltersComparisonFilterTypeLt FileSearchToolFiltersComparisonFilterType = "lt"
const FileSearchToolFiltersComparisonFilterTypeLte FileSearchToolFiltersComparisonFilterType = "lte"
Value FileSearchToolFiltersComparisonFilterValueUnion
One of the following:
string
float64
bool
type FileSearchToolFiltersComparisonFilterValueArray []FileSearchToolFiltersComparisonFilterValueArrayItemUnion
One of the following:
string
float64
type FileSearchToolFiltersCompoundFilter struct{…}

Combine multiple filters using and or or.

Filters []FileSearchToolFiltersCompoundFilterFilter
One of the following:
type FileSearchToolFiltersCompoundFilterFilter struct{…}

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

Key string
Type string
One of the following:
const FileSearchToolFiltersCompoundFilterFilterTypeEq FileSearchToolFiltersCompoundFilterFilterType = "eq"
const FileSearchToolFiltersCompoundFilterFilterTypeNe FileSearchToolFiltersCompoundFilterFilterType = "ne"
const FileSearchToolFiltersCompoundFilterFilterTypeGt FileSearchToolFiltersCompoundFilterFilterType = "gt"
const FileSearchToolFiltersCompoundFilterFilterTypeGte FileSearchToolFiltersCompoundFilterFilterType = "gte"
const FileSearchToolFiltersCompoundFilterFilterTypeLt FileSearchToolFiltersCompoundFilterFilterType = "lt"
const FileSearchToolFiltersCompoundFilterFilterTypeLte FileSearchToolFiltersCompoundFilterFilterType = "lte"
Value FileSearchToolFiltersCompoundFilterFilterValueUnion
One of the following:
string
float64
bool
type FileSearchToolFiltersCompoundFilterFilterValueArray []FileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion
One of the following:
string
float64
Type string
One of the following:
const FileSearchToolFiltersCompoundFilterTypeAnd FileSearchToolFiltersCompoundFilterType = "and"
const FileSearchToolFiltersCompoundFilterTypeOr FileSearchToolFiltersCompoundFilterType = "or"
MaxNumResults int64Optional
RankingOptions FileSearchToolRankingOptionsOptional

Ranking options for search.

Ranker stringOptional
One of the following:
const FileSearchToolRankingOptionsRankerAuto FileSearchToolRankingOptionsRanker = "auto"
const FileSearchToolRankingOptionsRankerDefault2024_11_15 FileSearchToolRankingOptionsRanker = "default-2024-11-15"
ScoreThreshold float64Optional
type ComputerTool struct{…}

A tool that controls a virtual computer.

Learn more about the computer tool.

DisplayHeight int64
DisplayWidth int64
Environment ComputerToolEnvironment
One of the following:
const ComputerToolEnvironmentWindows ComputerToolEnvironment = "windows"
const ComputerToolEnvironmentMac ComputerToolEnvironment = "mac"
const ComputerToolEnvironmentLinux ComputerToolEnvironment = "linux"
const ComputerToolEnvironmentUbuntu ComputerToolEnvironment = "ubuntu"
const ComputerToolEnvironmentBrowser ComputerToolEnvironment = "browser"
Type ComputerUsePreview
type WebSearchTool struct{…}

Search the Internet for sources related to the prompt.

Learn more about the web search tool.

Type WebSearchToolType
One of the following:
const WebSearchToolTypeWebSearch WebSearchToolType = "web_search"
const WebSearchToolTypeWebSearch2025_08_26 WebSearchToolType = "web_search_2025_08_26"
Filters WebSearchToolFiltersOptional

Filters for the search.

AllowedDomains []stringOptional
SearchContextSize WebSearchToolSearchContextSizeOptional
One of the following:
const WebSearchToolSearchContextSizeLow WebSearchToolSearchContextSize = "low"
const WebSearchToolSearchContextSizeMedium WebSearchToolSearchContextSize = "medium"
const WebSearchToolSearchContextSizeHigh WebSearchToolSearchContextSize = "high"
UserLocation WebSearchToolUserLocationOptional

The approximate location of the user.

City stringOptional
Country stringOptional
Region stringOptional
Timezone stringOptional
Type stringOptional
type OpenAIResponseToolMcp struct{…}

Give the model access to additional tools via remote Model Context Protocol (MCP) servers. Learn more about MCP.

ServerLabel string
Type Mcp
AllowedTools OpenAIResponseToolMcpAllowedToolsUnionOptional

A filter object to specify which tools are allowed.

One of the following:
type OpenAIResponseToolMcpAllowedToolsArray []string
type OpenAIResponseToolMcpAllowedToolsMcpAllowedToolsMcpToolFilter struct{…}

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
Authorization stringOptional
ConnectorID stringOptional
One of the following:
const OpenAIResponseToolMcpConnectorIDConnectorDropbox OpenAIResponseToolMcpConnectorID = "connector_dropbox"
const OpenAIResponseToolMcpConnectorIDConnectorGmail OpenAIResponseToolMcpConnectorID = "connector_gmail"
const OpenAIResponseToolMcpConnectorIDConnectorGooglecalendar OpenAIResponseToolMcpConnectorID = "connector_googlecalendar"
const OpenAIResponseToolMcpConnectorIDConnectorGoogledrive OpenAIResponseToolMcpConnectorID = "connector_googledrive"
const OpenAIResponseToolMcpConnectorIDConnectorMicrosoftteams OpenAIResponseToolMcpConnectorID = "connector_microsoftteams"
const OpenAIResponseToolMcpConnectorIDConnectorOutlookcalendar OpenAIResponseToolMcpConnectorID = "connector_outlookcalendar"
const OpenAIResponseToolMcpConnectorIDConnectorOutlookemail OpenAIResponseToolMcpConnectorID = "connector_outlookemail"
const OpenAIResponseToolMcpConnectorIDConnectorSharepoint OpenAIResponseToolMcpConnectorID = "connector_sharepoint"
Headers map[string, string]Optional
RequireApproval OpenAIResponseToolMcpRequireApprovalUnionOptional

Specify which of the MCP server’s tools require approval.

Can be always, never, or a filter object associated with tools that require approval.

One of the following:
type OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilter struct{…}

Specify which of the MCP server’s tools require approval.

Can be always, never, or a filter object associated with tools that require approval.

Always OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilterAlwaysOptional

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
Never OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilterNeverOptional

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
type OpenAIResponseToolMcpRequireApprovalString string
One of the following:
const OpenAIResponseToolMcpRequireApprovalStringAlways OpenAIResponseToolMcpRequireApprovalString = "always"
const OpenAIResponseToolMcpRequireApprovalStringNever OpenAIResponseToolMcpRequireApprovalString = "never"
ServerDescription stringOptional
ServerURL stringOptional
type OpenAIResponseToolCodeInterpreter struct{…}

A tool that runs Python code to help generate a response to a prompt.

Container OpenAIResponseToolCodeInterpreterContainerUnion

Configuration for a code interpreter container.

Optionally specify the IDs of the files to run the code on.

One of the following:
string
type OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAuto struct{…}

Configuration for a code interpreter container.

Optionally specify the IDs of the files to run the code on.

Type Auto
FileIDs []stringOptional
MemoryLimit stringOptional
One of the following:
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"
NetworkPolicy OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnionOptional
One of the following:
type ContainerNetworkPolicyDisabled struct{…}
Type Disabled
type ContainerNetworkPolicyAllowlist struct{…}
AllowedDomains []string
Type Allowlist
DomainSecrets []ContainerNetworkPolicyAllowlistDomainSecretOptional
Domain string
Name string
Value string
Type CodeInterpreter
type OpenAIResponseToolImageGeneration struct{…}

A tool that generates images using the GPT image models.

Type ImageGeneration
Action stringOptional
One of the following:
const OpenAIResponseToolImageGenerationActionGenerate OpenAIResponseToolImageGenerationAction = "generate"
const OpenAIResponseToolImageGenerationActionEdit OpenAIResponseToolImageGenerationAction = "edit"
const OpenAIResponseToolImageGenerationActionAuto OpenAIResponseToolImageGenerationAction = "auto"
Background stringOptional
One of the following:
const OpenAIResponseToolImageGenerationBackgroundTransparent OpenAIResponseToolImageGenerationBackground = "transparent"
const OpenAIResponseToolImageGenerationBackgroundOpaque OpenAIResponseToolImageGenerationBackground = "opaque"
const OpenAIResponseToolImageGenerationBackgroundAuto OpenAIResponseToolImageGenerationBackground = "auto"
InputFidelity stringOptional
One of the following:
const OpenAIResponseToolImageGenerationInputFidelityHigh OpenAIResponseToolImageGenerationInputFidelity = "high"
const OpenAIResponseToolImageGenerationInputFidelityLow OpenAIResponseToolImageGenerationInputFidelity = "low"
InputImageMask OpenAIResponseToolImageGenerationInputImageMaskOptional

Optional mask for inpainting.

Contains image_url (string, optional) and file_id (string, optional).

FileID stringOptional
ImageURL stringOptional
Model stringOptional
One of the following:
string
string
One of the following:
const OpenAIResponseToolImageGenerationModelGptImage1 OpenAIResponseToolImageGenerationModel = "gpt-image-1"
const OpenAIResponseToolImageGenerationModelGptImage1Mini OpenAIResponseToolImageGenerationModel = "gpt-image-1-mini"
const OpenAIResponseToolImageGenerationModelGptImage1_5 OpenAIResponseToolImageGenerationModel = "gpt-image-1.5"
Moderation stringOptional
One of the following:
const OpenAIResponseToolImageGenerationModerationAuto OpenAIResponseToolImageGenerationModeration = "auto"
const OpenAIResponseToolImageGenerationModerationLow OpenAIResponseToolImageGenerationModeration = "low"
OutputCompression int64Optional
OutputFormat stringOptional
One of the following:
const OpenAIResponseToolImageGenerationOutputFormatPng OpenAIResponseToolImageGenerationOutputFormat = "png"
const OpenAIResponseToolImageGenerationOutputFormatWebp OpenAIResponseToolImageGenerationOutputFormat = "webp"
const OpenAIResponseToolImageGenerationOutputFormatJpeg OpenAIResponseToolImageGenerationOutputFormat = "jpeg"
PartialImages int64Optional
Quality stringOptional
One of the following:
const OpenAIResponseToolImageGenerationQualityLow OpenAIResponseToolImageGenerationQuality = "low"
const OpenAIResponseToolImageGenerationQualityMedium OpenAIResponseToolImageGenerationQuality = "medium"
const OpenAIResponseToolImageGenerationQualityHigh OpenAIResponseToolImageGenerationQuality = "high"
const OpenAIResponseToolImageGenerationQualityAuto OpenAIResponseToolImageGenerationQuality = "auto"
Size stringOptional
One of the following:
const OpenAIResponseToolImageGenerationSize1024x1024 OpenAIResponseToolImageGenerationSize = "1024x1024"
const OpenAIResponseToolImageGenerationSize1024x1536 OpenAIResponseToolImageGenerationSize = "1024x1536"
const OpenAIResponseToolImageGenerationSize1536x1024 OpenAIResponseToolImageGenerationSize = "1536x1024"
const OpenAIResponseToolImageGenerationSizeAuto OpenAIResponseToolImageGenerationSize = "auto"
type OpenAIResponseToolLocalShell struct{…}

A tool that allows the model to execute shell commands in a local environment.

Type LocalShell
type FunctionShellTool struct{…}

A tool that allows the model to execute shell commands.

Type Shell
Environment FunctionShellToolEnvironmentUnionOptional
One of the following:
type FunctionShellToolEnvironmentContainerAuto struct{…}
Type ContainerAuto
FileIDs []stringOptional
MemoryLimit stringOptional
One of the following:
const FunctionShellToolEnvironmentContainerAutoMemoryLimit1g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "1g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit4g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "4g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit16g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "16g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit64g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "64g"
NetworkPolicy FunctionShellToolEnvironmentContainerAutoNetworkPolicyUnionOptional
One of the following:
type ContainerNetworkPolicyDisabled struct{…}
Type Disabled
type ContainerNetworkPolicyAllowlist struct{…}
AllowedDomains []string
Type Allowlist
DomainSecrets []ContainerNetworkPolicyAllowlistDomainSecretOptional
Domain string
Name string
Value string
Skills []FunctionShellToolEnvironmentContainerAutoSkillUnionOptional
One of the following:
type FunctionShellToolEnvironmentContainerAutoSkillSkillReference struct{…}
SkillID string
Type SkillReference
Version stringOptional
type FunctionShellToolEnvironmentContainerAutoSkillInlineSkill struct{…}
Description string
Name string
Source FunctionShellToolEnvironmentContainerAutoSkillInlineSkillSource

Inline skill payload

Data string
MediaType ApplicationZip
Type Base64
Type Inline
type LocalEnvironment struct{…}
Type Local
Skills []LocalEnvironmentSkillOptional
Description string
Name string
Path string
type ContainerReference struct{…}
ContainerID string
Type ContainerReference
type CustomTool struct{…}

A custom tool that processes input using a specified format.

Learn more about custom tools

Name string
Type Custom
Description stringOptional
Format CustomToolFormatUnionOptional

Unconstrained free-form text.

One of the following:
type CustomToolFormatText struct{…}

Unconstrained free-form text.

Type Text
type CustomToolFormatGrammar struct{…}

A grammar defined by the user.

Definition string
Syntax string
One of the following:
const CustomToolFormatGrammarSyntaxLark CustomToolFormatGrammarSyntax = "lark"
const CustomToolFormatGrammarSyntaxRegex CustomToolFormatGrammarSyntax = "regex"
Type Grammar
type WebSearchPreviewTool struct{…}

This tool searches the web for relevant results to use in a response.

Learn more about the web search tool.

Type WebSearchPreviewToolType
One of the following:
const WebSearchPreviewToolTypeWebSearchPreview WebSearchPreviewToolType = "web_search_preview"
const WebSearchPreviewToolTypeWebSearchPreview2025_03_11 WebSearchPreviewToolType = "web_search_preview_2025_03_11"
SearchContextSize WebSearchPreviewToolSearchContextSizeOptional
One of the following:
const WebSearchPreviewToolSearchContextSizeLow WebSearchPreviewToolSearchContextSize = "low"
const WebSearchPreviewToolSearchContextSizeMedium WebSearchPreviewToolSearchContextSize = "medium"
const WebSearchPreviewToolSearchContextSizeHigh WebSearchPreviewToolSearchContextSize = "high"
UserLocation WebSearchPreviewToolUserLocationOptional

The user’s location.

Type Approximate
City stringOptional
Country stringOptional
Region stringOptional
Timezone stringOptional
type ApplyPatchTool struct{…}

Allows the assistant to create, delete, or update files using unified diffs.

Type ApplyPatch
Background boolOptional
CompletedAt float64Optional
Conversation ConversationOptional

The conversation that this response belonged to.

Input items and output items from this response were automatically added to this conversation.

ID string
Error OpenAIResponseErrorOptional

An error object returned when the model fails to generate a Response.

Code OpenAIResponseErrorCode
One of the following:
const OpenAIResponseErrorCodeServerError OpenAIResponseErrorCode = "server_error"
const OpenAIResponseErrorCodeRateLimitExceeded OpenAIResponseErrorCode = "rate_limit_exceeded"
const OpenAIResponseErrorCodeInvalidPrompt OpenAIResponseErrorCode = "invalid_prompt"
const OpenAIResponseErrorCodeVectorStoreTimeout OpenAIResponseErrorCode = "vector_store_timeout"
const OpenAIResponseErrorCodeInvalidImage OpenAIResponseErrorCode = "invalid_image"
const OpenAIResponseErrorCodeInvalidImageFormat OpenAIResponseErrorCode = "invalid_image_format"
const OpenAIResponseErrorCodeInvalidBase64Image OpenAIResponseErrorCode = "invalid_base64_image"
const OpenAIResponseErrorCodeInvalidImageURL OpenAIResponseErrorCode = "invalid_image_url"
const OpenAIResponseErrorCodeImageTooLarge OpenAIResponseErrorCode = "image_too_large"
const OpenAIResponseErrorCodeImageTooSmall OpenAIResponseErrorCode = "image_too_small"
const OpenAIResponseErrorCodeImageParseError OpenAIResponseErrorCode = "image_parse_error"
const OpenAIResponseErrorCodeImageContentPolicyViolation OpenAIResponseErrorCode = "image_content_policy_violation"
const OpenAIResponseErrorCodeInvalidImageMode OpenAIResponseErrorCode = "invalid_image_mode"
const OpenAIResponseErrorCodeImageFileTooLarge OpenAIResponseErrorCode = "image_file_too_large"
const OpenAIResponseErrorCodeUnsupportedImageMediaType OpenAIResponseErrorCode = "unsupported_image_media_type"
const OpenAIResponseErrorCodeEmptyImageFile OpenAIResponseErrorCode = "empty_image_file"
const OpenAIResponseErrorCodeFailedToDownloadImage OpenAIResponseErrorCode = "failed_to_download_image"
const OpenAIResponseErrorCodeImageFileNotFound OpenAIResponseErrorCode = "image_file_not_found"
Message string
IncompleteDetails IncompleteDetailsOptional

Details about why the response is incomplete.

Reason IncompleteDetailsReasonOptional
One of the following:
const IncompleteDetailsReasonMaxOutputTokens IncompleteDetailsReason = "max_output_tokens"
const IncompleteDetailsReasonContentFilter IncompleteDetailsReason = "content_filter"
Instructions OpenAIResponseInstructionsUnionOptional
One of the following:
string
type OpenAIResponseInstructionsInputItems []OpenAIResponseInstructionsInputItemUnion
One of the following:
type EasyInputMessage struct{…}

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 EasyInputMessageContentUnion
One of the following:
string
type EasyInputMessageContentInputItems []EasyInputMessageContentInputItemUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Role EasyInputMessageRole
One of the following:
const EasyInputMessageRoleUser EasyInputMessageRole = "user"
const EasyInputMessageRoleAssistant EasyInputMessageRole = "assistant"
const EasyInputMessageRoleSystem EasyInputMessageRole = "system"
const EasyInputMessageRoleDeveloper EasyInputMessageRole = "developer"
Phase EasyInputMessagePhaseOptional
One of the following:
const EasyInputMessagePhaseCommentary EasyInputMessagePhase = "commentary"
const EasyInputMessagePhaseFinalAnswer EasyInputMessagePhase = "final_answer"
Type EasyInputMessageTypeOptional
type OpenAITypesResponsesResponseInputItemMessage struct{…}

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 []OpenAITypesResponsesResponseInputItemMessageContentUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Role OpenAITypesResponsesResponseInputItemMessageRole
One of the following:
const OpenAITypesResponsesResponseInputItemMessageRoleUser OpenAITypesResponsesResponseInputItemMessageRole = "user"
const OpenAITypesResponsesResponseInputItemMessageRoleSystem OpenAITypesResponsesResponseInputItemMessageRole = "system"
const OpenAITypesResponsesResponseInputItemMessageRoleDeveloper OpenAITypesResponsesResponseInputItemMessageRole = "developer"
Status OpenAITypesResponsesResponseInputItemMessageStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemMessageStatusInProgress OpenAITypesResponsesResponseInputItemMessageStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemMessageStatusCompleted OpenAITypesResponsesResponseInputItemMessageStatus = "completed"
const OpenAITypesResponsesResponseInputItemMessageStatusIncomplete OpenAITypesResponsesResponseInputItemMessageStatus = "incomplete"
Type OpenAITypesResponsesResponseInputItemMessageTypeOptional
type OpenAIResponseOutputMessage struct{…}

An output message from the model.

ID string
Content []OpenAIResponseOutputMessageContentUnion
One of the following:
type OpenAIResponseOutputText struct{…}

A text output from the model.

Annotations []OpenAIResponseOutputTextAnnotationUnion
One of the following:
type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []OpenAIResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type OpenAIResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string
Type Refusal
Role Assistant
Status OpenAIResponseOutputMessageStatus
One of the following:
const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"
const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"
const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"
Type Message
Phase OpenAIResponseOutputMessagePhaseOptional
One of the following:
const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"
const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"
type OpenAIResponseFileSearchToolCall struct{…}

The results of a file search tool call.

See the file search guide for more information.

ID string
Queries []string
Status OpenAIResponseFileSearchToolCallStatus
One of the following:
const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"
const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"
const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"
const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"
const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"
Type FileSearchCall
Results []OpenAIResponseFileSearchToolCallResultOptional
Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]Optional
One of the following:
string
float64
bool
FileID stringOptional
Filename stringOptional
Score float64Optional
Text stringOptional
type OpenAIResponseComputerToolCall struct{…}

A tool call to a computer use tool.

See the computer use guide for more information.

ID string
Action OpenAIResponseComputerToolCallActionUnion

A click action.

One of the following:
type OpenAIResponseComputerToolCallActionActionClick struct{…}

A click action.

Button string
One of the following:
const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"
const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"
const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"
const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"
const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"
Type Click
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}

A double click action.

Type DoubleClick
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDrag struct{…}

A drag action.

Path []OpenAIResponseComputerToolCallActionActionDragPath
X int64
Y int64
Type Drag
type OpenAIResponseComputerToolCallActionActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string
Type Keypress
type OpenAIResponseComputerToolCallActionActionMove struct{…}

A mouse move action.

Type Move
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}

A screenshot action.

Type Screenshot
type OpenAIResponseComputerToolCallActionActionScroll struct{…}

A scroll action.

ScrollX int64
ScrollY int64
Type Scroll
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionType struct{…}

An action to type in text.

Text string
Type Type
type OpenAIResponseComputerToolCallActionActionWait struct{…}

A wait action.

Type Wait
CallID string
PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck
ID string
Code stringOptional
Message stringOptional
Status OpenAIResponseComputerToolCallStatus
One of the following:
const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"
const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"
const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"
Type ComputerCall
type OpenAITypesResponsesResponseInputItemComputerCallOutput struct{…}

The output of a computer tool call.

CallID string

A computer screenshot image used with the computer use tool.

Type ComputerScreenshot
FileID stringOptional
ImageURL stringOptional
Type ComputerCallOutput
ID stringOptional
AcknowledgedSafetyChecks []OpenAITypesResponsesResponseInputItemComputerCallOutputAcknowledgedSafetyCheckOptional
ID string
Code stringOptional
Message stringOptional
Status OpenAITypesResponsesResponseInputItemComputerCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "incomplete"
One of the following:
One of the following:
type OpenAIResponseFunctionToolCall struct{…}

A tool call to run a function.

See the function calling guide for more information.

Arguments string
CallID string
Name string
Type FunctionCall
ID stringOptional
Status OpenAIResponseFunctionToolCallStatusOptional
One of the following:
const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"
const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"
const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"
type OpenAITypesResponsesResponseInputItemFunctionCallOutput struct{…}

The output of a function tool call.

CallID string
Output OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputUnion
One of the following:
string
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentList []OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemUnion
One of the following:
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputTextContent struct{…}

A text input to the model.

Text string
Type InputText
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContent struct{…}

An image input to the model.

Learn about image inputs

Type InputImage
Detail stringOptional
One of the following:
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailLow OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "low"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailHigh OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "high"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailAuto OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "auto"
FileID stringOptional
ImageURL stringOptional
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputFileContent struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Type FunctionCallOutput
ID stringOptional
Status OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "incomplete"
type OpenAIResponseReasoningItem struct{…}

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.

ID string
Summary []OpenAIResponseReasoningItemSummary
Text string
Type SummaryText
Type Reasoning
Content []OpenAIResponseReasoningItemContentOptional
Text string
Type ReasoningText
EncryptedContent stringOptional
Status OpenAIResponseReasoningItemStatusOptional
One of the following:
const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"
const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"
const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"
type ResponseCompactionItemParamResp struct{…}

A compaction item generated by the v1/responses/compact API.

EncryptedContent string
Type Compaction
ID stringOptional
type OpenAITypesResponsesResponseInputItemImageGenerationCall struct{…}

An image generation request made by the model.

ID string
Status OpenAITypesResponsesResponseInputItemImageGenerationCallStatus
One of the following:
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "generating"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "failed"
Type ImageGenerationCall
Result stringOptional
type OpenAIResponseCodeInterpreterToolCall struct{…}

A tool call to run code.

ID string
ContainerID string
Status OpenAIResponseCodeInterpreterToolCallStatus
One of the following:
const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"
const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"
const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"
const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"
const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"
Type CodeInterpreterCall
Code stringOptional
Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnionOptional
One of the following:
type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}

The logs output from the code interpreter.

Logs string
Type Logs
type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}

The image output from the code interpreter.

Type Image
URL string
type OpenAITypesResponsesResponseInputItemLocalShellCall struct{…}

A tool call to run a command on the local shell.

ID string
Action OpenAITypesResponsesResponseInputItemLocalShellCallAction

Execute a shell command on the server.

Command []string
Env map[string, string]
Type Exec
TimeoutMs int64Optional
User stringOptional
WorkingDirectory stringOptional
CallID string
Status OpenAITypesResponsesResponseInputItemLocalShellCallStatus
One of the following:
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "incomplete"
Type LocalShellCall
type OpenAITypesResponsesResponseInputItemLocalShellCallOutput struct{…}

The output of a local shell tool call.

ID string
Output string
Type LocalShellCallOutput
Status OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "incomplete"
type ShellCall struct{…}

A tool representing a request to execute one or more shell commands.

Action ShellCallAction

The shell commands and limits that describe how to run the tool call.

Commands []string
MaxOutputLength int64Optional
TimeoutMs int64Optional
CallID string
Type ShellCall
ID stringOptional
Environment ShellCallEnvironmentUnionOptional
One of the following:
type LocalEnvironment struct{…}
Type Local
Skills []LocalEnvironmentSkillOptional
Description string
Name string
Path string
type ContainerReference struct{…}
ContainerID string
Type ContainerReference
Status ShellCallStatusOptional
One of the following:
const ShellCallStatusInProgress ShellCallStatus = "in_progress"
const ShellCallStatusCompleted ShellCallStatus = "completed"
const ShellCallStatusIncomplete ShellCallStatus = "incomplete"
type ShellCallOutput struct{…}

The streamed output items emitted by a shell tool call.

CallID string
Output []ShellCallOutputOutput
Outcome ShellCallOutputOutputOutcomeUnion

Indicates that the shell call exceeded its configured time limit.

One of the following:
type ShellCallOutputOutputOutcomeOutcomeTimeout struct{…}

Indicates that the shell call exceeded its configured time limit.

Type Timeout
type ShellCallOutputOutputOutcomeOutcomeExit struct{…}

Indicates that the shell commands finished and returned an exit code.

ExitCode int64
Type Exit
Stderr string
Stdout string
Type ShellCallOutput
ID stringOptional
MaxOutputLength int64Optional
Status ShellCallOutputStatusOptional
One of the following:
const ShellCallOutputStatusInProgress ShellCallOutputStatus = "in_progress"
const ShellCallOutputStatusCompleted ShellCallOutputStatus = "completed"
const ShellCallOutputStatusIncomplete ShellCallOutputStatus = "incomplete"
type ApplyPatchCall struct{…}

A tool call representing a request to create, delete, or update files using diff patches.

CallID string
Operation ApplyPatchCallOperationUnion

Instruction for creating a new file via the apply_patch tool.

One of the following:
type ApplyPatchCallOperationApplyPatchCallOperationCreateFile struct{…}

Instruction for creating a new file via the apply_patch tool.

Diff string
Path string
Type CreateFile
type ApplyPatchCallOperationApplyPatchCallOperationDeleteFile struct{…}

Instruction for deleting an existing file via the apply_patch tool.

Path string
Type DeleteFile
type ApplyPatchCallOperationApplyPatchCallOperationUpdateFile struct{…}

Instruction for updating an existing file via the apply_patch tool.

Diff string
Path string
Type UpdateFile
Status ApplyPatchCallStatus
One of the following:
const ApplyPatchCallStatusInProgress ApplyPatchCallStatus = "in_progress"
const ApplyPatchCallStatusCompleted ApplyPatchCallStatus = "completed"
Type ApplyPatchCall
ID stringOptional
type ApplyPatchCallOutput struct{…}

The streamed output emitted by an apply patch tool call.

CallID string
Status ApplyPatchCallOutputStatus
One of the following:
const ApplyPatchCallOutputStatusCompleted ApplyPatchCallOutputStatus = "completed"
const ApplyPatchCallOutputStatusFailed ApplyPatchCallOutputStatus = "failed"
Type ApplyPatchCallOutput
ID stringOptional
Output stringOptional
type OpenAITypesResponsesResponseInputItemMcpListTools struct{…}

A list of tools available on an MCP server.

ID string
ServerLabel string
Tools []OpenAITypesResponsesResponseInputItemMcpListToolsTool
InputSchema any
Name string
Annotations anyOptional
Description stringOptional
Type McpListTools
Error stringOptional
type McpApprovalRequest struct{…}

A request for human approval of a tool invocation.

ID string
Arguments string
Name string
ServerLabel string
Type McpApprovalRequest
type OpenAITypesResponsesResponseInputItemMcpApprovalResponse struct{…}

A response to an MCP approval request.

ApprovalRequestID string
Approve bool
Type McpApprovalResponse
ID stringOptional
Reason stringOptional
type OpenAITypesResponsesResponseInputItemMcpCall struct{…}

An invocation of a tool on an MCP server.

ID string
Arguments string
Name string
ServerLabel string
Type McpCall
ApprovalRequestID stringOptional
Error stringOptional
Output stringOptional
Status OpenAITypesResponsesResponseInputItemMcpCallStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemMcpCallStatusInProgress OpenAITypesResponsesResponseInputItemMcpCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemMcpCallStatusCompleted OpenAITypesResponsesResponseInputItemMcpCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseInputItemMcpCallStatus = "incomplete"
const OpenAITypesResponsesResponseInputItemMcpCallStatusCalling OpenAITypesResponsesResponseInputItemMcpCallStatus = "calling"
const OpenAITypesResponsesResponseInputItemMcpCallStatusFailed OpenAITypesResponsesResponseInputItemMcpCallStatus = "failed"
type OpenAIResponseCustomToolCallOutput struct{…}

The output of a custom tool call from your code, being sent back to the model.

CallID string
Output OpenAIResponseCustomToolCallOutputOutputUnion
One of the following:
string
type OpenAIResponseCustomToolCallOutputOutputOutputContentList []OpenAIResponseCustomToolCallOutputOutputOutputContentListItemUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Type CustomToolCallOutput
ID stringOptional
type OpenAIResponseCustomToolCall struct{…}

A call to a custom tool created by the model.

CallID string
Input string
Name string
Type CustomToolCall
ID stringOptional
type OpenAITypesResponsesResponseInputItemItemReference struct{…}

An internal identifier for an item to reference.

ID string
Type OpenAITypesResponsesResponseInputItemItemReferenceTypeOptional
MaxOutputTokens int64Optional
MaxToolCalls int64Optional
Metadata map[string, string]Optional
PreviousResponseID stringOptional
Prompt OpenAIResponsePromptOptional

Reference to a prompt template and its variables. Learn more.

ID string
Variables map[string, OpenAIResponsePromptVariableUnion]Optional
One of the following:
string
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Version stringOptional
PromptCacheKey stringOptional
PromptCacheRetention OpenAIResponsePromptCacheRetentionOptional
One of the following:
const OpenAIResponsePromptCacheRetentionInMemory OpenAIResponsePromptCacheRetention = "in-memory"
const OpenAIResponsePromptCacheRetention24h OpenAIResponsePromptCacheRetention = "24h"
Reasoning ReasoningOptional

gpt-5 and o-series models only

Configuration options for reasoning models.

Effort ReasoningEffortOptional
One of the following:
const ReasoningEffortNone ReasoningEffort = "none"
const ReasoningEffortMinimal ReasoningEffort = "minimal"
const ReasoningEffortLow ReasoningEffort = "low"
const ReasoningEffortMedium ReasoningEffort = "medium"
const ReasoningEffortHigh ReasoningEffort = "high"
const ReasoningEffortXhigh ReasoningEffort = "xhigh"
GenerateSummary ReasoningGenerateSummaryOptional
One of the following:
const ReasoningGenerateSummaryAuto ReasoningGenerateSummary = "auto"
const ReasoningGenerateSummaryConcise ReasoningGenerateSummary = "concise"
const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"
Summary ReasoningSummaryOptional
One of the following:
const ReasoningSummaryAuto ReasoningSummary = "auto"
const ReasoningSummaryConcise ReasoningSummary = "concise"
const ReasoningSummaryDetailed ReasoningSummary = "detailed"
SafetyIdentifier stringOptional
ServiceTier OpenAIResponseServiceTierOptional
One of the following:
const OpenAIResponseServiceTierAuto OpenAIResponseServiceTier = "auto"
const OpenAIResponseServiceTierDefault OpenAIResponseServiceTier = "default"
const OpenAIResponseServiceTierFlex OpenAIResponseServiceTier = "flex"
const OpenAIResponseServiceTierScale OpenAIResponseServiceTier = "scale"
const OpenAIResponseServiceTierPriority OpenAIResponseServiceTier = "priority"
Status OpenAIResponseStatusOptional
One of the following:
const OpenAIResponseStatusCompleted OpenAIResponseStatus = "completed"
const OpenAIResponseStatusFailed OpenAIResponseStatus = "failed"
const OpenAIResponseStatusInProgress OpenAIResponseStatus = "in_progress"
const OpenAIResponseStatusCancelled OpenAIResponseStatus = "cancelled"
const OpenAIResponseStatusQueued OpenAIResponseStatus = "queued"
const OpenAIResponseStatusIncomplete OpenAIResponseStatus = "incomplete"
Temperature float64Optional

Configuration options for a text response from the model.

Can be plain text or structured JSON data. Learn more:

Format OpenAIResponseTextConfigFormatUnionOptional

Default response format. Used to generate text responses.

One of the following:
type OpenAIResponseTextConfigFormatResponseFormatText struct{…}

Default response format. Used to generate text responses.

Type Text
type OpenAIResponseTextConfigFormatResponseFormatTextJsonSchemaConfig struct{…}

JSON Schema response format.

Used to generate structured JSON responses. Learn more about Structured Outputs.

Name string
Schema map[string, any]
Type JsonSchema
Description stringOptional
Strict boolOptional
type OpenAIResponseTextConfigFormatResponseFormatJsonObject struct{…}

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.

Type JsonObject
Verbosity OpenAIResponseTextConfigVerbosityOptional
One of the following:
const OpenAIResponseTextConfigVerbosityLow OpenAIResponseTextConfigVerbosity = "low"
const OpenAIResponseTextConfigVerbosityMedium OpenAIResponseTextConfigVerbosity = "medium"
const OpenAIResponseTextConfigVerbosityHigh OpenAIResponseTextConfigVerbosity = "high"
TopLogprobs int64Optional
TopP float64Optional
Truncation OpenAIResponseTruncationOptional
One of the following:
const OpenAIResponseTruncationAuto OpenAIResponseTruncation = "auto"
const OpenAIResponseTruncationDisabled OpenAIResponseTruncation = "disabled"
Usage OpenAIResponseUsageOptional

Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.

InputTokens int64
InputTokensDetails OpenAIResponseUsageInputTokensDetails

A detailed breakdown of the input tokens.

CachedTokens int64
OutputTokens int64
OutputTokensDetails OpenAIResponseUsageOutputTokensDetails

A detailed breakdown of the output tokens.

ReasoningTokens int64
TotalTokens int64
User stringOptional
SequenceNumber int64
Type ResponseCompleted
type ResponseNewResponseResponseContentPartAddedEvent struct{…}

Emitted when a new content part is added.

ContentIndex int64
ItemID string
OutputIndex int64
Part ResponseNewResponseResponseContentPartAddedEventPartUnion

A text output from the model.

One of the following:
type OpenAIResponseOutputText struct{…}

A text output from the model.

Annotations []OpenAIResponseOutputTextAnnotationUnion
One of the following:
type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []OpenAIResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type OpenAIResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string
Type Refusal
type PartReasoningText struct{…}

Reasoning text from the model.

Text string
Type ReasoningText
SequenceNumber int64
Type ResponseContentPartAdded
type ResponseNewResponseResponseContentPartDoneEvent struct{…}

Emitted when a content part is done.

ContentIndex int64
ItemID string
OutputIndex int64
Part ResponseNewResponseResponseContentPartDoneEventPartUnion

A text output from the model.

One of the following:
type OpenAIResponseOutputText struct{…}

A text output from the model.

Annotations []OpenAIResponseOutputTextAnnotationUnion
One of the following:
type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []OpenAIResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type OpenAIResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string
Type Refusal
type PartReasoningText struct{…}

Reasoning text from the model.

Text string
Type ReasoningText
SequenceNumber int64
Type ResponseContentPartDone
type ResponseNewResponseResponseCreatedEvent struct{…}

An event that is emitted when a response is created.

ID string
CreatedAt float64
Model OpenAIResponseModel
One of the following:
type OpenAIResponseModel string
One of the following:
const OpenAIResponseModelGpt5_2 OpenAIResponseModel = "gpt-5.2"
const OpenAIResponseModelGpt5_2_2025_12_11 OpenAIResponseModel = "gpt-5.2-2025-12-11"
const OpenAIResponseModelGpt5_2ChatLatest OpenAIResponseModel = "gpt-5.2-chat-latest"
const OpenAIResponseModelGpt5_2Pro OpenAIResponseModel = "gpt-5.2-pro"
const OpenAIResponseModelGpt5_2Pro2025_12_11 OpenAIResponseModel = "gpt-5.2-pro-2025-12-11"
const OpenAIResponseModelGpt5_1 OpenAIResponseModel = "gpt-5.1"
const OpenAIResponseModelGpt5_1_2025_11_13 OpenAIResponseModel = "gpt-5.1-2025-11-13"
const OpenAIResponseModelGpt5_1Codex OpenAIResponseModel = "gpt-5.1-codex"
const OpenAIResponseModelGpt5_1Mini OpenAIResponseModel = "gpt-5.1-mini"
const OpenAIResponseModelGpt5_1ChatLatest OpenAIResponseModel = "gpt-5.1-chat-latest"
const OpenAIResponseModelGpt5 OpenAIResponseModel = "gpt-5"
const OpenAIResponseModelGpt5Mini OpenAIResponseModel = "gpt-5-mini"
const OpenAIResponseModelGpt5Nano OpenAIResponseModel = "gpt-5-nano"
const OpenAIResponseModelGpt5_2025_08_07 OpenAIResponseModel = "gpt-5-2025-08-07"
const OpenAIResponseModelGpt5Mini2025_08_07 OpenAIResponseModel = "gpt-5-mini-2025-08-07"
const OpenAIResponseModelGpt5Nano2025_08_07 OpenAIResponseModel = "gpt-5-nano-2025-08-07"
const OpenAIResponseModelGpt5ChatLatest OpenAIResponseModel = "gpt-5-chat-latest"
const OpenAIResponseModelGpt4_1 OpenAIResponseModel = "gpt-4.1"
const OpenAIResponseModelGpt4_1Mini OpenAIResponseModel = "gpt-4.1-mini"
const OpenAIResponseModelGpt4_1Nano OpenAIResponseModel = "gpt-4.1-nano"
const OpenAIResponseModelGpt4_1_2025_04_14 OpenAIResponseModel = "gpt-4.1-2025-04-14"
const OpenAIResponseModelGpt4_1Mini2025_04_14 OpenAIResponseModel = "gpt-4.1-mini-2025-04-14"
const OpenAIResponseModelGpt4_1Nano2025_04_14 OpenAIResponseModel = "gpt-4.1-nano-2025-04-14"
const OpenAIResponseModelO4Mini OpenAIResponseModel = "o4-mini"
const OpenAIResponseModelO4Mini2025_04_16 OpenAIResponseModel = "o4-mini-2025-04-16"
const OpenAIResponseModelO3 OpenAIResponseModel = "o3"
const OpenAIResponseModelO3_2025_04_16 OpenAIResponseModel = "o3-2025-04-16"
const OpenAIResponseModelO3Mini OpenAIResponseModel = "o3-mini"
const OpenAIResponseModelO3Mini2025_01_31 OpenAIResponseModel = "o3-mini-2025-01-31"
const OpenAIResponseModelO1 OpenAIResponseModel = "o1"
const OpenAIResponseModelO1_2024_12_17 OpenAIResponseModel = "o1-2024-12-17"
const OpenAIResponseModelO1Preview OpenAIResponseModel = "o1-preview"
const OpenAIResponseModelO1Preview2024_09_12 OpenAIResponseModel = "o1-preview-2024-09-12"
const OpenAIResponseModelO1Mini OpenAIResponseModel = "o1-mini"
const OpenAIResponseModelO1Mini2024_09_12 OpenAIResponseModel = "o1-mini-2024-09-12"
const OpenAIResponseModelGpt4o OpenAIResponseModel = "gpt-4o"
const OpenAIResponseModelGpt4o2024_11_20 OpenAIResponseModel = "gpt-4o-2024-11-20"
const OpenAIResponseModelGpt4o2024_08_06 OpenAIResponseModel = "gpt-4o-2024-08-06"
const OpenAIResponseModelGpt4o2024_05_13 OpenAIResponseModel = "gpt-4o-2024-05-13"
const OpenAIResponseModelGpt4oAudioPreview OpenAIResponseModel = "gpt-4o-audio-preview"
const OpenAIResponseModelGpt4oAudioPreview2024_10_01 OpenAIResponseModel = "gpt-4o-audio-preview-2024-10-01"
const OpenAIResponseModelGpt4oAudioPreview2024_12_17 OpenAIResponseModel = "gpt-4o-audio-preview-2024-12-17"
const OpenAIResponseModelGpt4oAudioPreview2025_06_03 OpenAIResponseModel = "gpt-4o-audio-preview-2025-06-03"
const OpenAIResponseModelGpt4oMiniAudioPreview OpenAIResponseModel = "gpt-4o-mini-audio-preview"
const OpenAIResponseModelGpt4oMiniAudioPreview2024_12_17 OpenAIResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"
const OpenAIResponseModelGpt4oSearchPreview OpenAIResponseModel = "gpt-4o-search-preview"
const OpenAIResponseModelGpt4oMiniSearchPreview OpenAIResponseModel = "gpt-4o-mini-search-preview"
const OpenAIResponseModelGpt4oSearchPreview2025_03_11 OpenAIResponseModel = "gpt-4o-search-preview-2025-03-11"
const OpenAIResponseModelGpt4oMiniSearchPreview2025_03_11 OpenAIResponseModel = "gpt-4o-mini-search-preview-2025-03-11"
const OpenAIResponseModelChatgpt4oLatest OpenAIResponseModel = "chatgpt-4o-latest"
const OpenAIResponseModelCodexMiniLatest OpenAIResponseModel = "codex-mini-latest"
const OpenAIResponseModelGpt4oMini OpenAIResponseModel = "gpt-4o-mini"
const OpenAIResponseModelGpt4oMini2024_07_18 OpenAIResponseModel = "gpt-4o-mini-2024-07-18"
const OpenAIResponseModelGpt4Turbo OpenAIResponseModel = "gpt-4-turbo"
const OpenAIResponseModelGpt4Turbo2024_04_09 OpenAIResponseModel = "gpt-4-turbo-2024-04-09"
const OpenAIResponseModelGpt4_0125Preview OpenAIResponseModel = "gpt-4-0125-preview"
const OpenAIResponseModelGpt4TurboPreview OpenAIResponseModel = "gpt-4-turbo-preview"
const OpenAIResponseModelGpt4_1106Preview OpenAIResponseModel = "gpt-4-1106-preview"
const OpenAIResponseModelGpt4VisionPreview OpenAIResponseModel = "gpt-4-vision-preview"
const OpenAIResponseModelGpt4 OpenAIResponseModel = "gpt-4"
const OpenAIResponseModelGpt4_0314 OpenAIResponseModel = "gpt-4-0314"
const OpenAIResponseModelGpt4_0613 OpenAIResponseModel = "gpt-4-0613"
const OpenAIResponseModelGpt4_32k OpenAIResponseModel = "gpt-4-32k"
const OpenAIResponseModelGpt4_32k0314 OpenAIResponseModel = "gpt-4-32k-0314"
const OpenAIResponseModelGpt4_32k0613 OpenAIResponseModel = "gpt-4-32k-0613"
const OpenAIResponseModelGpt3_5Turbo OpenAIResponseModel = "gpt-3.5-turbo"
const OpenAIResponseModelGpt3_5Turbo16k OpenAIResponseModel = "gpt-3.5-turbo-16k"
const OpenAIResponseModelGpt3_5Turbo0301 OpenAIResponseModel = "gpt-3.5-turbo-0301"
const OpenAIResponseModelGpt3_5Turbo0613 OpenAIResponseModel = "gpt-3.5-turbo-0613"
const OpenAIResponseModelGpt3_5Turbo1106 OpenAIResponseModel = "gpt-3.5-turbo-1106"
const OpenAIResponseModelGpt3_5Turbo0125 OpenAIResponseModel = "gpt-3.5-turbo-0125"
const OpenAIResponseModelGpt3_5Turbo16k0613 OpenAIResponseModel = "gpt-3.5-turbo-16k-0613"
const OpenAIResponseModelO1Pro OpenAIResponseModel = "o1-pro"
const OpenAIResponseModelO1Pro2025_03_19 OpenAIResponseModel = "o1-pro-2025-03-19"
const OpenAIResponseModelO3Pro OpenAIResponseModel = "o3-pro"
const OpenAIResponseModelO3Pro2025_06_10 OpenAIResponseModel = "o3-pro-2025-06-10"
const OpenAIResponseModelO3DeepResearch OpenAIResponseModel = "o3-deep-research"
const OpenAIResponseModelO3DeepResearch2025_06_26 OpenAIResponseModel = "o3-deep-research-2025-06-26"
const OpenAIResponseModelO4MiniDeepResearch OpenAIResponseModel = "o4-mini-deep-research"
const OpenAIResponseModelO4MiniDeepResearch2025_06_26 OpenAIResponseModel = "o4-mini-deep-research-2025-06-26"
const OpenAIResponseModelComputerUsePreview OpenAIResponseModel = "computer-use-preview"
const OpenAIResponseModelComputerUsePreview2025_03_11 OpenAIResponseModel = "computer-use-preview-2025-03-11"
const OpenAIResponseModelGpt5Codex OpenAIResponseModel = "gpt-5-codex"
const OpenAIResponseModelGpt5Pro OpenAIResponseModel = "gpt-5-pro"
const OpenAIResponseModelGpt5Pro2025_10_06 OpenAIResponseModel = "gpt-5-pro-2025-10-06"
const OpenAIResponseModelGpt5_1CodexMax OpenAIResponseModel = "gpt-5.1-codex-max"
string
Object Response
Output []OpenAIResponseOutputUnion
One of the following:
type OpenAIResponseOutputMessage struct{…}

An output message from the model.

ID string
Content []OpenAIResponseOutputMessageContentUnion
One of the following:
type OpenAIResponseOutputText struct{…}

A text output from the model.

Annotations []OpenAIResponseOutputTextAnnotationUnion
One of the following:
type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []OpenAIResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type OpenAIResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string
Type Refusal
Role Assistant
Status OpenAIResponseOutputMessageStatus
One of the following:
const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"
const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"
const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"
Type Message
Phase OpenAIResponseOutputMessagePhaseOptional
One of the following:
const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"
const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"
type OpenAIResponseFileSearchToolCall struct{…}

The results of a file search tool call.

See the file search guide for more information.

ID string
Queries []string
Status OpenAIResponseFileSearchToolCallStatus
One of the following:
const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"
const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"
const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"
const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"
const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"
Type FileSearchCall
Results []OpenAIResponseFileSearchToolCallResultOptional
Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]Optional
One of the following:
string
float64
bool
FileID stringOptional
Filename stringOptional
Score float64Optional
Text stringOptional
type OpenAIResponseFunctionToolCall struct{…}

A tool call to run a function.

See the function calling guide for more information.

Arguments string
CallID string
Name string
Type FunctionCall
ID stringOptional
Status OpenAIResponseFunctionToolCallStatusOptional
One of the following:
const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"
const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"
const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"
One of the following:
One of the following:
type OpenAIResponseComputerToolCall struct{…}

A tool call to a computer use tool.

See the computer use guide for more information.

ID string
Action OpenAIResponseComputerToolCallActionUnion

A click action.

One of the following:
type OpenAIResponseComputerToolCallActionActionClick struct{…}

A click action.

Button string
One of the following:
const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"
const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"
const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"
const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"
const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"
Type Click
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}

A double click action.

Type DoubleClick
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDrag struct{…}

A drag action.

Path []OpenAIResponseComputerToolCallActionActionDragPath
X int64
Y int64
Type Drag
type OpenAIResponseComputerToolCallActionActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string
Type Keypress
type OpenAIResponseComputerToolCallActionActionMove struct{…}

A mouse move action.

Type Move
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}

A screenshot action.

Type Screenshot
type OpenAIResponseComputerToolCallActionActionScroll struct{…}

A scroll action.

ScrollX int64
ScrollY int64
Type Scroll
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionType struct{…}

An action to type in text.

Text string
Type Type
type OpenAIResponseComputerToolCallActionActionWait struct{…}

A wait action.

Type Wait
CallID string
PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck
ID string
Code stringOptional
Message stringOptional
Status OpenAIResponseComputerToolCallStatus
One of the following:
const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"
const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"
const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"
Type ComputerCall
type OpenAIResponseReasoningItem struct{…}

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.

ID string
Summary []OpenAIResponseReasoningItemSummary
Text string
Type SummaryText
Type Reasoning
Content []OpenAIResponseReasoningItemContentOptional
Text string
Type ReasoningText
EncryptedContent stringOptional
Status OpenAIResponseReasoningItemStatusOptional
One of the following:
const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"
const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"
const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"
type ResponseCompactionItem struct{…}

A compaction item generated by the v1/responses/compact API.

ID string
EncryptedContent string
Type Compaction
CreatedBy stringOptional
type OpenAITypesResponsesResponseOutputItemImageGenerationCall struct{…}

An image generation request made by the model.

ID string
Status OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus
One of the following:
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "generating"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "failed"
Type ImageGenerationCall
Result stringOptional
type OpenAIResponseCodeInterpreterToolCall struct{…}

A tool call to run code.

ID string
ContainerID string
Status OpenAIResponseCodeInterpreterToolCallStatus
One of the following:
const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"
const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"
const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"
const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"
const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"
Type CodeInterpreterCall
Code stringOptional
Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnionOptional
One of the following:
type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}

The logs output from the code interpreter.

Logs string
Type Logs
type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}

The image output from the code interpreter.

Type Image
URL string
type OpenAITypesResponsesResponseOutputItemLocalShellCall struct{…}

A tool call to run a command on the local shell.

ID string
Action OpenAITypesResponsesResponseOutputItemLocalShellCallAction

Execute a shell command on the server.

Command []string
Env map[string, string]
Type Exec
TimeoutMs int64Optional
User stringOptional
WorkingDirectory stringOptional
CallID string
Status OpenAITypesResponsesResponseOutputItemLocalShellCallStatus
One of the following:
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "incomplete"
Type LocalShellCall
type ResponseFunctionShellToolCall struct{…}

A tool call that executes one or more shell commands in a managed environment.

ID string
Action ResponseFunctionShellToolCallAction

The shell commands and limits that describe how to run the tool call.

Commands []string
MaxOutputLength int64Optional
TimeoutMs int64Optional
CallID string
Status ResponseFunctionShellToolCallStatus
One of the following:
const ResponseFunctionShellToolCallStatusInProgress ResponseFunctionShellToolCallStatus = "in_progress"
const ResponseFunctionShellToolCallStatusCompleted ResponseFunctionShellToolCallStatus = "completed"
const ResponseFunctionShellToolCallStatusIncomplete ResponseFunctionShellToolCallStatus = "incomplete"
Type ShellCall
CreatedBy stringOptional
Environment ResponseFunctionShellToolCallEnvironmentUnionOptional

Represents the use of a local environment to perform shell actions.

One of the following:
type ResponseFunctionShellToolCallEnvironmentResponseLocalEnvironment struct{…}

Represents the use of a local environment to perform shell actions.

Type Local
type ResponseFunctionShellToolCallEnvironmentResponseContainerReference struct{…}

Represents a container created with /v1/containers.

ContainerID string
Type ContainerReference
type ResponseFunctionShellToolCallOutput struct{…}

The output of a shell tool call that was emitted.

ID string
CallID string
Output []ResponseFunctionShellToolCallOutputOutput
Outcome ResponseFunctionShellToolCallOutputOutputOutcomeUnion

Indicates that the shell call exceeded its configured time limit.

One of the following:
type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeTimeout struct{…}

Indicates that the shell call exceeded its configured time limit.

Type Timeout
type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeExit struct{…}

Indicates that the shell commands finished and returned an exit code.

ExitCode int64
Type Exit
Stderr string
Stdout string
CreatedBy stringOptional
Status ResponseFunctionShellToolCallOutputStatus
One of the following:
const ResponseFunctionShellToolCallOutputStatusInProgress ResponseFunctionShellToolCallOutputStatus = "in_progress"
const ResponseFunctionShellToolCallOutputStatusCompleted ResponseFunctionShellToolCallOutputStatus = "completed"
const ResponseFunctionShellToolCallOutputStatusIncomplete ResponseFunctionShellToolCallOutputStatus = "incomplete"
Type ShellCallOutput
CreatedBy stringOptional
MaxOutputLength int64Optional
type ResponseApplyPatchToolCall struct{…}

A tool call that applies file diffs by creating, deleting, or updating files.

ID string
CallID string
Operation ResponseApplyPatchToolCallOperationUnion

Instruction describing how to create a file via the apply_patch tool.

One of the following:
type ResponseApplyPatchToolCallOperationOperationCreateFile struct{…}

Instruction describing how to create a file via the apply_patch tool.

Diff string
Path string
Type CreateFile
type ResponseApplyPatchToolCallOperationOperationDeleteFile struct{…}

Instruction describing how to delete a file via the apply_patch tool.

Path string
Type DeleteFile
type ResponseApplyPatchToolCallOperationOperationUpdateFile struct{…}

Instruction describing how to update a file via the apply_patch tool.

Diff string
Path string
Type UpdateFile
Status ResponseApplyPatchToolCallStatus
One of the following:
const ResponseApplyPatchToolCallStatusInProgress ResponseApplyPatchToolCallStatus = "in_progress"
const ResponseApplyPatchToolCallStatusCompleted ResponseApplyPatchToolCallStatus = "completed"
Type ApplyPatchCall
CreatedBy stringOptional
type ResponseApplyPatchToolCallOutput struct{…}

The output emitted by an apply patch tool call.

ID string
CallID string
Status ResponseApplyPatchToolCallOutputStatus
One of the following:
const ResponseApplyPatchToolCallOutputStatusCompleted ResponseApplyPatchToolCallOutputStatus = "completed"
const ResponseApplyPatchToolCallOutputStatusFailed ResponseApplyPatchToolCallOutputStatus = "failed"
Type ApplyPatchCallOutput
CreatedBy stringOptional
Output stringOptional
type OpenAITypesResponsesResponseOutputItemMcpCall struct{…}

An invocation of a tool on an MCP server.

ID string
Arguments string
Name string
ServerLabel string
Type McpCall
ApprovalRequestID stringOptional
Error stringOptional
Output stringOptional
Status OpenAITypesResponsesResponseOutputItemMcpCallStatusOptional
One of the following:
const OpenAITypesResponsesResponseOutputItemMcpCallStatusInProgress OpenAITypesResponsesResponseOutputItemMcpCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusCompleted OpenAITypesResponsesResponseOutputItemMcpCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseOutputItemMcpCallStatus = "incomplete"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusCalling OpenAITypesResponsesResponseOutputItemMcpCallStatus = "calling"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusFailed OpenAITypesResponsesResponseOutputItemMcpCallStatus = "failed"
type OpenAITypesResponsesResponseOutputItemMcpListTools struct{…}

A list of tools available on an MCP server.

ID string
ServerLabel string
Tools []OpenAITypesResponsesResponseOutputItemMcpListToolsTool
InputSchema any
Name string
Annotations anyOptional
Description stringOptional
Type McpListTools
Error stringOptional
type McpApprovalRequest struct{…}

A request for human approval of a tool invocation.

ID string
Arguments string
Name string
ServerLabel string
Type McpApprovalRequest
type OpenAIResponseCustomToolCall struct{…}

A call to a custom tool created by the model.

CallID string
Input string
Name string
Type CustomToolCall
ID stringOptional
ParallelToolCalls bool
ToolChoice OpenAIResponseToolChoiceUnion

Constrains the tools available to the model to a pre-defined set.

One of the following:
type OpenAIResponseToolChoiceString string
One of the following:
const OpenAIResponseToolChoiceStringNone OpenAIResponseToolChoiceString = "none"
const OpenAIResponseToolChoiceStringAuto OpenAIResponseToolChoiceString = "auto"
const OpenAIResponseToolChoiceStringRequired OpenAIResponseToolChoiceString = "required"
type ToolChoiceAllowed struct{…}

Constrains the tools available to the model to a pre-defined set.

Mode ToolChoiceAllowedMode
One of the following:
const ToolChoiceAllowedModeAuto ToolChoiceAllowedMode = "auto"
const ToolChoiceAllowedModeRequired ToolChoiceAllowedMode = "required"
Tools []map[string, any]
Type AllowedTools
type ToolChoiceTypes struct{…}

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

Type ToolChoiceTypesType
One of the following:
const ToolChoiceTypesTypeFileSearch ToolChoiceTypesType = "file_search"
const ToolChoiceTypesTypeWebSearchPreview ToolChoiceTypesType = "web_search_preview"
const ToolChoiceTypesTypeComputerUsePreview ToolChoiceTypesType = "computer_use_preview"
const ToolChoiceTypesTypeWebSearchPreview2025_03_11 ToolChoiceTypesType = "web_search_preview_2025_03_11"
const ToolChoiceTypesTypeImageGeneration ToolChoiceTypesType = "image_generation"
const ToolChoiceTypesTypeCodeInterpreter ToolChoiceTypesType = "code_interpreter"
type ToolChoiceFunction struct{…}

Use this option to force the model to call a specific function.

Name string
Type Function
type ToolChoiceMcp struct{…}

Use this option to force the model to call a specific tool on a remote MCP server.

ServerLabel string
Type Mcp
Name stringOptional
type ToolChoiceCustom struct{…}

Use this option to force the model to call a specific custom tool.

Name string
Type Custom
type ToolChoiceApplyPatch struct{…}

Forces the model to call the apply_patch tool when executing a tool call.

Type ApplyPatch
type ToolChoiceShell struct{…}

Forces the model to call the shell tool when a tool call is required.

Type Shell
Tools []OpenAIResponseToolUnion
One of the following:
type FunctionTool struct{…}

Defines a function in your own code the model can choose to call.

Learn more about function calling.

Name string
Type Function
Description stringOptional
Parameters map[string, any]Optional
Strict boolOptional
type FileSearchTool struct{…}

A tool that searches for relevant content from uploaded files.

Learn more about the file search tool.

Type FileSearch
VectorStoreIDs []string
Filters FileSearchToolFiltersUnionOptional

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

One of the following:
type FileSearchToolFiltersComparisonFilter struct{…}

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

Key string
Type string
One of the following:
const FileSearchToolFiltersComparisonFilterTypeEq FileSearchToolFiltersComparisonFilterType = "eq"
const FileSearchToolFiltersComparisonFilterTypeNe FileSearchToolFiltersComparisonFilterType = "ne"
const FileSearchToolFiltersComparisonFilterTypeGt FileSearchToolFiltersComparisonFilterType = "gt"
const FileSearchToolFiltersComparisonFilterTypeGte FileSearchToolFiltersComparisonFilterType = "gte"
const FileSearchToolFiltersComparisonFilterTypeLt FileSearchToolFiltersComparisonFilterType = "lt"
const FileSearchToolFiltersComparisonFilterTypeLte FileSearchToolFiltersComparisonFilterType = "lte"
Value FileSearchToolFiltersComparisonFilterValueUnion
One of the following:
string
float64
bool
type FileSearchToolFiltersComparisonFilterValueArray []FileSearchToolFiltersComparisonFilterValueArrayItemUnion
One of the following:
string
float64
type FileSearchToolFiltersCompoundFilter struct{…}

Combine multiple filters using and or or.

Filters []FileSearchToolFiltersCompoundFilterFilter
One of the following:
type FileSearchToolFiltersCompoundFilterFilter struct{…}

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

Key string
Type string
One of the following:
const FileSearchToolFiltersCompoundFilterFilterTypeEq FileSearchToolFiltersCompoundFilterFilterType = "eq"
const FileSearchToolFiltersCompoundFilterFilterTypeNe FileSearchToolFiltersCompoundFilterFilterType = "ne"
const FileSearchToolFiltersCompoundFilterFilterTypeGt FileSearchToolFiltersCompoundFilterFilterType = "gt"
const FileSearchToolFiltersCompoundFilterFilterTypeGte FileSearchToolFiltersCompoundFilterFilterType = "gte"
const FileSearchToolFiltersCompoundFilterFilterTypeLt FileSearchToolFiltersCompoundFilterFilterType = "lt"
const FileSearchToolFiltersCompoundFilterFilterTypeLte FileSearchToolFiltersCompoundFilterFilterType = "lte"
Value FileSearchToolFiltersCompoundFilterFilterValueUnion
One of the following:
string
float64
bool
type FileSearchToolFiltersCompoundFilterFilterValueArray []FileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion
One of the following:
string
float64
Type string
One of the following:
const FileSearchToolFiltersCompoundFilterTypeAnd FileSearchToolFiltersCompoundFilterType = "and"
const FileSearchToolFiltersCompoundFilterTypeOr FileSearchToolFiltersCompoundFilterType = "or"
MaxNumResults int64Optional
RankingOptions FileSearchToolRankingOptionsOptional

Ranking options for search.

Ranker stringOptional
One of the following:
const FileSearchToolRankingOptionsRankerAuto FileSearchToolRankingOptionsRanker = "auto"
const FileSearchToolRankingOptionsRankerDefault2024_11_15 FileSearchToolRankingOptionsRanker = "default-2024-11-15"
ScoreThreshold float64Optional
type ComputerTool struct{…}

A tool that controls a virtual computer.

Learn more about the computer tool.

DisplayHeight int64
DisplayWidth int64
Environment ComputerToolEnvironment
One of the following:
const ComputerToolEnvironmentWindows ComputerToolEnvironment = "windows"
const ComputerToolEnvironmentMac ComputerToolEnvironment = "mac"
const ComputerToolEnvironmentLinux ComputerToolEnvironment = "linux"
const ComputerToolEnvironmentUbuntu ComputerToolEnvironment = "ubuntu"
const ComputerToolEnvironmentBrowser ComputerToolEnvironment = "browser"
Type ComputerUsePreview
type WebSearchTool struct{…}

Search the Internet for sources related to the prompt.

Learn more about the web search tool.

Type WebSearchToolType
One of the following:
const WebSearchToolTypeWebSearch WebSearchToolType = "web_search"
const WebSearchToolTypeWebSearch2025_08_26 WebSearchToolType = "web_search_2025_08_26"
Filters WebSearchToolFiltersOptional

Filters for the search.

AllowedDomains []stringOptional
SearchContextSize WebSearchToolSearchContextSizeOptional
One of the following:
const WebSearchToolSearchContextSizeLow WebSearchToolSearchContextSize = "low"
const WebSearchToolSearchContextSizeMedium WebSearchToolSearchContextSize = "medium"
const WebSearchToolSearchContextSizeHigh WebSearchToolSearchContextSize = "high"
UserLocation WebSearchToolUserLocationOptional

The approximate location of the user.

City stringOptional
Country stringOptional
Region stringOptional
Timezone stringOptional
Type stringOptional
type OpenAIResponseToolMcp struct{…}

Give the model access to additional tools via remote Model Context Protocol (MCP) servers. Learn more about MCP.

ServerLabel string
Type Mcp
AllowedTools OpenAIResponseToolMcpAllowedToolsUnionOptional

A filter object to specify which tools are allowed.

One of the following:
type OpenAIResponseToolMcpAllowedToolsArray []string
type OpenAIResponseToolMcpAllowedToolsMcpAllowedToolsMcpToolFilter struct{…}

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
Authorization stringOptional
ConnectorID stringOptional
One of the following:
const OpenAIResponseToolMcpConnectorIDConnectorDropbox OpenAIResponseToolMcpConnectorID = "connector_dropbox"
const OpenAIResponseToolMcpConnectorIDConnectorGmail OpenAIResponseToolMcpConnectorID = "connector_gmail"
const OpenAIResponseToolMcpConnectorIDConnectorGooglecalendar OpenAIResponseToolMcpConnectorID = "connector_googlecalendar"
const OpenAIResponseToolMcpConnectorIDConnectorGoogledrive OpenAIResponseToolMcpConnectorID = "connector_googledrive"
const OpenAIResponseToolMcpConnectorIDConnectorMicrosoftteams OpenAIResponseToolMcpConnectorID = "connector_microsoftteams"
const OpenAIResponseToolMcpConnectorIDConnectorOutlookcalendar OpenAIResponseToolMcpConnectorID = "connector_outlookcalendar"
const OpenAIResponseToolMcpConnectorIDConnectorOutlookemail OpenAIResponseToolMcpConnectorID = "connector_outlookemail"
const OpenAIResponseToolMcpConnectorIDConnectorSharepoint OpenAIResponseToolMcpConnectorID = "connector_sharepoint"
Headers map[string, string]Optional
RequireApproval OpenAIResponseToolMcpRequireApprovalUnionOptional

Specify which of the MCP server’s tools require approval.

Can be always, never, or a filter object associated with tools that require approval.

One of the following:
type OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilter struct{…}

Specify which of the MCP server’s tools require approval.

Can be always, never, or a filter object associated with tools that require approval.

Always OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilterAlwaysOptional

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
Never OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilterNeverOptional

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
type OpenAIResponseToolMcpRequireApprovalString string
One of the following:
const OpenAIResponseToolMcpRequireApprovalStringAlways OpenAIResponseToolMcpRequireApprovalString = "always"
const OpenAIResponseToolMcpRequireApprovalStringNever OpenAIResponseToolMcpRequireApprovalString = "never"
ServerDescription stringOptional
ServerURL stringOptional
type OpenAIResponseToolCodeInterpreter struct{…}

A tool that runs Python code to help generate a response to a prompt.

Container OpenAIResponseToolCodeInterpreterContainerUnion

Configuration for a code interpreter container.

Optionally specify the IDs of the files to run the code on.

One of the following:
string
type OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAuto struct{…}

Configuration for a code interpreter container.

Optionally specify the IDs of the files to run the code on.

Type Auto
FileIDs []stringOptional
MemoryLimit stringOptional
One of the following:
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"
NetworkPolicy OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnionOptional
One of the following:
type ContainerNetworkPolicyDisabled struct{…}
Type Disabled
type ContainerNetworkPolicyAllowlist struct{…}
AllowedDomains []string
Type Allowlist
DomainSecrets []ContainerNetworkPolicyAllowlistDomainSecretOptional
Domain string
Name string
Value string
Type CodeInterpreter
type OpenAIResponseToolImageGeneration struct{…}

A tool that generates images using the GPT image models.

Type ImageGeneration
Action stringOptional
One of the following:
const OpenAIResponseToolImageGenerationActionGenerate OpenAIResponseToolImageGenerationAction = "generate"
const OpenAIResponseToolImageGenerationActionEdit OpenAIResponseToolImageGenerationAction = "edit"
const OpenAIResponseToolImageGenerationActionAuto OpenAIResponseToolImageGenerationAction = "auto"
Background stringOptional
One of the following:
const OpenAIResponseToolImageGenerationBackgroundTransparent OpenAIResponseToolImageGenerationBackground = "transparent"
const OpenAIResponseToolImageGenerationBackgroundOpaque OpenAIResponseToolImageGenerationBackground = "opaque"
const OpenAIResponseToolImageGenerationBackgroundAuto OpenAIResponseToolImageGenerationBackground = "auto"
InputFidelity stringOptional
One of the following:
const OpenAIResponseToolImageGenerationInputFidelityHigh OpenAIResponseToolImageGenerationInputFidelity = "high"
const OpenAIResponseToolImageGenerationInputFidelityLow OpenAIResponseToolImageGenerationInputFidelity = "low"
InputImageMask OpenAIResponseToolImageGenerationInputImageMaskOptional

Optional mask for inpainting.

Contains image_url (string, optional) and file_id (string, optional).

FileID stringOptional
ImageURL stringOptional
Model stringOptional
One of the following:
string
string
One of the following:
const OpenAIResponseToolImageGenerationModelGptImage1 OpenAIResponseToolImageGenerationModel = "gpt-image-1"
const OpenAIResponseToolImageGenerationModelGptImage1Mini OpenAIResponseToolImageGenerationModel = "gpt-image-1-mini"
const OpenAIResponseToolImageGenerationModelGptImage1_5 OpenAIResponseToolImageGenerationModel = "gpt-image-1.5"
Moderation stringOptional
One of the following:
const OpenAIResponseToolImageGenerationModerationAuto OpenAIResponseToolImageGenerationModeration = "auto"
const OpenAIResponseToolImageGenerationModerationLow OpenAIResponseToolImageGenerationModeration = "low"
OutputCompression int64Optional
OutputFormat stringOptional
One of the following:
const OpenAIResponseToolImageGenerationOutputFormatPng OpenAIResponseToolImageGenerationOutputFormat = "png"
const OpenAIResponseToolImageGenerationOutputFormatWebp OpenAIResponseToolImageGenerationOutputFormat = "webp"
const OpenAIResponseToolImageGenerationOutputFormatJpeg OpenAIResponseToolImageGenerationOutputFormat = "jpeg"
PartialImages int64Optional
Quality stringOptional
One of the following:
const OpenAIResponseToolImageGenerationQualityLow OpenAIResponseToolImageGenerationQuality = "low"
const OpenAIResponseToolImageGenerationQualityMedium OpenAIResponseToolImageGenerationQuality = "medium"
const OpenAIResponseToolImageGenerationQualityHigh OpenAIResponseToolImageGenerationQuality = "high"
const OpenAIResponseToolImageGenerationQualityAuto OpenAIResponseToolImageGenerationQuality = "auto"
Size stringOptional
One of the following:
const OpenAIResponseToolImageGenerationSize1024x1024 OpenAIResponseToolImageGenerationSize = "1024x1024"
const OpenAIResponseToolImageGenerationSize1024x1536 OpenAIResponseToolImageGenerationSize = "1024x1536"
const OpenAIResponseToolImageGenerationSize1536x1024 OpenAIResponseToolImageGenerationSize = "1536x1024"
const OpenAIResponseToolImageGenerationSizeAuto OpenAIResponseToolImageGenerationSize = "auto"
type OpenAIResponseToolLocalShell struct{…}

A tool that allows the model to execute shell commands in a local environment.

Type LocalShell
type FunctionShellTool struct{…}

A tool that allows the model to execute shell commands.

Type Shell
Environment FunctionShellToolEnvironmentUnionOptional
One of the following:
type FunctionShellToolEnvironmentContainerAuto struct{…}
Type ContainerAuto
FileIDs []stringOptional
MemoryLimit stringOptional
One of the following:
const FunctionShellToolEnvironmentContainerAutoMemoryLimit1g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "1g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit4g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "4g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit16g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "16g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit64g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "64g"
NetworkPolicy FunctionShellToolEnvironmentContainerAutoNetworkPolicyUnionOptional
One of the following:
type ContainerNetworkPolicyDisabled struct{…}
Type Disabled
type ContainerNetworkPolicyAllowlist struct{…}
AllowedDomains []string
Type Allowlist
DomainSecrets []ContainerNetworkPolicyAllowlistDomainSecretOptional
Domain string
Name string
Value string
Skills []FunctionShellToolEnvironmentContainerAutoSkillUnionOptional
One of the following:
type FunctionShellToolEnvironmentContainerAutoSkillSkillReference struct{…}
SkillID string
Type SkillReference
Version stringOptional
type FunctionShellToolEnvironmentContainerAutoSkillInlineSkill struct{…}
Description string
Name string
Source FunctionShellToolEnvironmentContainerAutoSkillInlineSkillSource

Inline skill payload

Data string
MediaType ApplicationZip
Type Base64
Type Inline
type LocalEnvironment struct{…}
Type Local
Skills []LocalEnvironmentSkillOptional
Description string
Name string
Path string
type ContainerReference struct{…}
ContainerID string
Type ContainerReference
type CustomTool struct{…}

A custom tool that processes input using a specified format.

Learn more about custom tools

Name string
Type Custom
Description stringOptional
Format CustomToolFormatUnionOptional

Unconstrained free-form text.

One of the following:
type CustomToolFormatText struct{…}

Unconstrained free-form text.

Type Text
type CustomToolFormatGrammar struct{…}

A grammar defined by the user.

Definition string
Syntax string
One of the following:
const CustomToolFormatGrammarSyntaxLark CustomToolFormatGrammarSyntax = "lark"
const CustomToolFormatGrammarSyntaxRegex CustomToolFormatGrammarSyntax = "regex"
Type Grammar
type WebSearchPreviewTool struct{…}

This tool searches the web for relevant results to use in a response.

Learn more about the web search tool.

Type WebSearchPreviewToolType
One of the following:
const WebSearchPreviewToolTypeWebSearchPreview WebSearchPreviewToolType = "web_search_preview"
const WebSearchPreviewToolTypeWebSearchPreview2025_03_11 WebSearchPreviewToolType = "web_search_preview_2025_03_11"
SearchContextSize WebSearchPreviewToolSearchContextSizeOptional
One of the following:
const WebSearchPreviewToolSearchContextSizeLow WebSearchPreviewToolSearchContextSize = "low"
const WebSearchPreviewToolSearchContextSizeMedium WebSearchPreviewToolSearchContextSize = "medium"
const WebSearchPreviewToolSearchContextSizeHigh WebSearchPreviewToolSearchContextSize = "high"
UserLocation WebSearchPreviewToolUserLocationOptional

The user’s location.

Type Approximate
City stringOptional
Country stringOptional
Region stringOptional
Timezone stringOptional
type ApplyPatchTool struct{…}

Allows the assistant to create, delete, or update files using unified diffs.

Type ApplyPatch
Background boolOptional
CompletedAt float64Optional
Conversation ConversationOptional

The conversation that this response belonged to.

Input items and output items from this response were automatically added to this conversation.

ID string
Error OpenAIResponseErrorOptional

An error object returned when the model fails to generate a Response.

Code OpenAIResponseErrorCode
One of the following:
const OpenAIResponseErrorCodeServerError OpenAIResponseErrorCode = "server_error"
const OpenAIResponseErrorCodeRateLimitExceeded OpenAIResponseErrorCode = "rate_limit_exceeded"
const OpenAIResponseErrorCodeInvalidPrompt OpenAIResponseErrorCode = "invalid_prompt"
const OpenAIResponseErrorCodeVectorStoreTimeout OpenAIResponseErrorCode = "vector_store_timeout"
const OpenAIResponseErrorCodeInvalidImage OpenAIResponseErrorCode = "invalid_image"
const OpenAIResponseErrorCodeInvalidImageFormat OpenAIResponseErrorCode = "invalid_image_format"
const OpenAIResponseErrorCodeInvalidBase64Image OpenAIResponseErrorCode = "invalid_base64_image"
const OpenAIResponseErrorCodeInvalidImageURL OpenAIResponseErrorCode = "invalid_image_url"
const OpenAIResponseErrorCodeImageTooLarge OpenAIResponseErrorCode = "image_too_large"
const OpenAIResponseErrorCodeImageTooSmall OpenAIResponseErrorCode = "image_too_small"
const OpenAIResponseErrorCodeImageParseError OpenAIResponseErrorCode = "image_parse_error"
const OpenAIResponseErrorCodeImageContentPolicyViolation OpenAIResponseErrorCode = "image_content_policy_violation"
const OpenAIResponseErrorCodeInvalidImageMode OpenAIResponseErrorCode = "invalid_image_mode"
const OpenAIResponseErrorCodeImageFileTooLarge OpenAIResponseErrorCode = "image_file_too_large"
const OpenAIResponseErrorCodeUnsupportedImageMediaType OpenAIResponseErrorCode = "unsupported_image_media_type"
const OpenAIResponseErrorCodeEmptyImageFile OpenAIResponseErrorCode = "empty_image_file"
const OpenAIResponseErrorCodeFailedToDownloadImage OpenAIResponseErrorCode = "failed_to_download_image"
const OpenAIResponseErrorCodeImageFileNotFound OpenAIResponseErrorCode = "image_file_not_found"
Message string
IncompleteDetails IncompleteDetailsOptional

Details about why the response is incomplete.

Reason IncompleteDetailsReasonOptional
One of the following:
const IncompleteDetailsReasonMaxOutputTokens IncompleteDetailsReason = "max_output_tokens"
const IncompleteDetailsReasonContentFilter IncompleteDetailsReason = "content_filter"
Instructions OpenAIResponseInstructionsUnionOptional
One of the following:
string
type OpenAIResponseInstructionsInputItems []OpenAIResponseInstructionsInputItemUnion
One of the following:
type EasyInputMessage struct{…}

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 EasyInputMessageContentUnion
One of the following:
string
type EasyInputMessageContentInputItems []EasyInputMessageContentInputItemUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Role EasyInputMessageRole
One of the following:
const EasyInputMessageRoleUser EasyInputMessageRole = "user"
const EasyInputMessageRoleAssistant EasyInputMessageRole = "assistant"
const EasyInputMessageRoleSystem EasyInputMessageRole = "system"
const EasyInputMessageRoleDeveloper EasyInputMessageRole = "developer"
Phase EasyInputMessagePhaseOptional
One of the following:
const EasyInputMessagePhaseCommentary EasyInputMessagePhase = "commentary"
const EasyInputMessagePhaseFinalAnswer EasyInputMessagePhase = "final_answer"
Type EasyInputMessageTypeOptional
type OpenAITypesResponsesResponseInputItemMessage struct{…}

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 []OpenAITypesResponsesResponseInputItemMessageContentUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Role OpenAITypesResponsesResponseInputItemMessageRole
One of the following:
const OpenAITypesResponsesResponseInputItemMessageRoleUser OpenAITypesResponsesResponseInputItemMessageRole = "user"
const OpenAITypesResponsesResponseInputItemMessageRoleSystem OpenAITypesResponsesResponseInputItemMessageRole = "system"
const OpenAITypesResponsesResponseInputItemMessageRoleDeveloper OpenAITypesResponsesResponseInputItemMessageRole = "developer"
Status OpenAITypesResponsesResponseInputItemMessageStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemMessageStatusInProgress OpenAITypesResponsesResponseInputItemMessageStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemMessageStatusCompleted OpenAITypesResponsesResponseInputItemMessageStatus = "completed"
const OpenAITypesResponsesResponseInputItemMessageStatusIncomplete OpenAITypesResponsesResponseInputItemMessageStatus = "incomplete"
Type OpenAITypesResponsesResponseInputItemMessageTypeOptional
type OpenAIResponseOutputMessage struct{…}

An output message from the model.

ID string
Content []OpenAIResponseOutputMessageContentUnion
One of the following:
type OpenAIResponseOutputText struct{…}

A text output from the model.

Annotations []OpenAIResponseOutputTextAnnotationUnion
One of the following:
type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []OpenAIResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type OpenAIResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string
Type Refusal
Role Assistant
Status OpenAIResponseOutputMessageStatus
One of the following:
const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"
const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"
const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"
Type Message
Phase OpenAIResponseOutputMessagePhaseOptional
One of the following:
const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"
const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"
type OpenAIResponseFileSearchToolCall struct{…}

The results of a file search tool call.

See the file search guide for more information.

ID string
Queries []string
Status OpenAIResponseFileSearchToolCallStatus
One of the following:
const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"
const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"
const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"
const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"
const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"
Type FileSearchCall
Results []OpenAIResponseFileSearchToolCallResultOptional
Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]Optional
One of the following:
string
float64
bool
FileID stringOptional
Filename stringOptional
Score float64Optional
Text stringOptional
type OpenAIResponseComputerToolCall struct{…}

A tool call to a computer use tool.

See the computer use guide for more information.

ID string
Action OpenAIResponseComputerToolCallActionUnion

A click action.

One of the following:
type OpenAIResponseComputerToolCallActionActionClick struct{…}

A click action.

Button string
One of the following:
const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"
const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"
const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"
const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"
const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"
Type Click
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}

A double click action.

Type DoubleClick
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDrag struct{…}

A drag action.

Path []OpenAIResponseComputerToolCallActionActionDragPath
X int64
Y int64
Type Drag
type OpenAIResponseComputerToolCallActionActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string
Type Keypress
type OpenAIResponseComputerToolCallActionActionMove struct{…}

A mouse move action.

Type Move
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}

A screenshot action.

Type Screenshot
type OpenAIResponseComputerToolCallActionActionScroll struct{…}

A scroll action.

ScrollX int64
ScrollY int64
Type Scroll
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionType struct{…}

An action to type in text.

Text string
Type Type
type OpenAIResponseComputerToolCallActionActionWait struct{…}

A wait action.

Type Wait
CallID string
PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck
ID string
Code stringOptional
Message stringOptional
Status OpenAIResponseComputerToolCallStatus
One of the following:
const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"
const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"
const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"
Type ComputerCall
type OpenAITypesResponsesResponseInputItemComputerCallOutput struct{…}

The output of a computer tool call.

CallID string

A computer screenshot image used with the computer use tool.

Type ComputerScreenshot
FileID stringOptional
ImageURL stringOptional
Type ComputerCallOutput
ID stringOptional
AcknowledgedSafetyChecks []OpenAITypesResponsesResponseInputItemComputerCallOutputAcknowledgedSafetyCheckOptional
ID string
Code stringOptional
Message stringOptional
Status OpenAITypesResponsesResponseInputItemComputerCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "incomplete"
One of the following:
One of the following:
type OpenAIResponseFunctionToolCall struct{…}

A tool call to run a function.

See the function calling guide for more information.

Arguments string
CallID string
Name string
Type FunctionCall
ID stringOptional
Status OpenAIResponseFunctionToolCallStatusOptional
One of the following:
const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"
const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"
const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"
type OpenAITypesResponsesResponseInputItemFunctionCallOutput struct{…}

The output of a function tool call.

CallID string
Output OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputUnion
One of the following:
string
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentList []OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemUnion
One of the following:
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputTextContent struct{…}

A text input to the model.

Text string
Type InputText
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContent struct{…}

An image input to the model.

Learn about image inputs

Type InputImage
Detail stringOptional
One of the following:
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailLow OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "low"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailHigh OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "high"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailAuto OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "auto"
FileID stringOptional
ImageURL stringOptional
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputFileContent struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Type FunctionCallOutput
ID stringOptional
Status OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "incomplete"
type OpenAIResponseReasoningItem struct{…}

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.

ID string
Summary []OpenAIResponseReasoningItemSummary
Text string
Type SummaryText
Type Reasoning
Content []OpenAIResponseReasoningItemContentOptional
Text string
Type ReasoningText
EncryptedContent stringOptional
Status OpenAIResponseReasoningItemStatusOptional
One of the following:
const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"
const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"
const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"
type ResponseCompactionItemParamResp struct{…}

A compaction item generated by the v1/responses/compact API.

EncryptedContent string
Type Compaction
ID stringOptional
type OpenAITypesResponsesResponseInputItemImageGenerationCall struct{…}

An image generation request made by the model.

ID string
Status OpenAITypesResponsesResponseInputItemImageGenerationCallStatus
One of the following:
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "generating"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "failed"
Type ImageGenerationCall
Result stringOptional
type OpenAIResponseCodeInterpreterToolCall struct{…}

A tool call to run code.

ID string
ContainerID string
Status OpenAIResponseCodeInterpreterToolCallStatus
One of the following:
const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"
const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"
const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"
const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"
const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"
Type CodeInterpreterCall
Code stringOptional
Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnionOptional
One of the following:
type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}

The logs output from the code interpreter.

Logs string
Type Logs
type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}

The image output from the code interpreter.

Type Image
URL string
type OpenAITypesResponsesResponseInputItemLocalShellCall struct{…}

A tool call to run a command on the local shell.

ID string
Action OpenAITypesResponsesResponseInputItemLocalShellCallAction

Execute a shell command on the server.

Command []string
Env map[string, string]
Type Exec
TimeoutMs int64Optional
User stringOptional
WorkingDirectory stringOptional
CallID string
Status OpenAITypesResponsesResponseInputItemLocalShellCallStatus
One of the following:
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "incomplete"
Type LocalShellCall
type OpenAITypesResponsesResponseInputItemLocalShellCallOutput struct{…}

The output of a local shell tool call.

ID string
Output string
Type LocalShellCallOutput
Status OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "incomplete"
type ShellCall struct{…}

A tool representing a request to execute one or more shell commands.

Action ShellCallAction

The shell commands and limits that describe how to run the tool call.

Commands []string
MaxOutputLength int64Optional
TimeoutMs int64Optional
CallID string
Type ShellCall
ID stringOptional
Environment ShellCallEnvironmentUnionOptional
One of the following:
type LocalEnvironment struct{…}
Type Local
Skills []LocalEnvironmentSkillOptional
Description string
Name string
Path string
type ContainerReference struct{…}
ContainerID string
Type ContainerReference
Status ShellCallStatusOptional
One of the following:
const ShellCallStatusInProgress ShellCallStatus = "in_progress"
const ShellCallStatusCompleted ShellCallStatus = "completed"
const ShellCallStatusIncomplete ShellCallStatus = "incomplete"
type ShellCallOutput struct{…}

The streamed output items emitted by a shell tool call.

CallID string
Output []ShellCallOutputOutput
Outcome ShellCallOutputOutputOutcomeUnion

Indicates that the shell call exceeded its configured time limit.

One of the following:
type ShellCallOutputOutputOutcomeOutcomeTimeout struct{…}

Indicates that the shell call exceeded its configured time limit.

Type Timeout
type ShellCallOutputOutputOutcomeOutcomeExit struct{…}

Indicates that the shell commands finished and returned an exit code.

ExitCode int64
Type Exit
Stderr string
Stdout string
Type ShellCallOutput
ID stringOptional
MaxOutputLength int64Optional
Status ShellCallOutputStatusOptional
One of the following:
const ShellCallOutputStatusInProgress ShellCallOutputStatus = "in_progress"
const ShellCallOutputStatusCompleted ShellCallOutputStatus = "completed"
const ShellCallOutputStatusIncomplete ShellCallOutputStatus = "incomplete"
type ApplyPatchCall struct{…}

A tool call representing a request to create, delete, or update files using diff patches.

CallID string
Operation ApplyPatchCallOperationUnion

Instruction for creating a new file via the apply_patch tool.

One of the following:
type ApplyPatchCallOperationApplyPatchCallOperationCreateFile struct{…}

Instruction for creating a new file via the apply_patch tool.

Diff string
Path string
Type CreateFile
type ApplyPatchCallOperationApplyPatchCallOperationDeleteFile struct{…}

Instruction for deleting an existing file via the apply_patch tool.

Path string
Type DeleteFile
type ApplyPatchCallOperationApplyPatchCallOperationUpdateFile struct{…}

Instruction for updating an existing file via the apply_patch tool.

Diff string
Path string
Type UpdateFile
Status ApplyPatchCallStatus
One of the following:
const ApplyPatchCallStatusInProgress ApplyPatchCallStatus = "in_progress"
const ApplyPatchCallStatusCompleted ApplyPatchCallStatus = "completed"
Type ApplyPatchCall
ID stringOptional
type ApplyPatchCallOutput struct{…}

The streamed output emitted by an apply patch tool call.

CallID string
Status ApplyPatchCallOutputStatus
One of the following:
const ApplyPatchCallOutputStatusCompleted ApplyPatchCallOutputStatus = "completed"
const ApplyPatchCallOutputStatusFailed ApplyPatchCallOutputStatus = "failed"
Type ApplyPatchCallOutput
ID stringOptional
Output stringOptional
type OpenAITypesResponsesResponseInputItemMcpListTools struct{…}

A list of tools available on an MCP server.

ID string
ServerLabel string
Tools []OpenAITypesResponsesResponseInputItemMcpListToolsTool
InputSchema any
Name string
Annotations anyOptional
Description stringOptional
Type McpListTools
Error stringOptional
type McpApprovalRequest struct{…}

A request for human approval of a tool invocation.

ID string
Arguments string
Name string
ServerLabel string
Type McpApprovalRequest
type OpenAITypesResponsesResponseInputItemMcpApprovalResponse struct{…}

A response to an MCP approval request.

ApprovalRequestID string
Approve bool
Type McpApprovalResponse
ID stringOptional
Reason stringOptional
type OpenAITypesResponsesResponseInputItemMcpCall struct{…}

An invocation of a tool on an MCP server.

ID string
Arguments string
Name string
ServerLabel string
Type McpCall
ApprovalRequestID stringOptional
Error stringOptional
Output stringOptional
Status OpenAITypesResponsesResponseInputItemMcpCallStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemMcpCallStatusInProgress OpenAITypesResponsesResponseInputItemMcpCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemMcpCallStatusCompleted OpenAITypesResponsesResponseInputItemMcpCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseInputItemMcpCallStatus = "incomplete"
const OpenAITypesResponsesResponseInputItemMcpCallStatusCalling OpenAITypesResponsesResponseInputItemMcpCallStatus = "calling"
const OpenAITypesResponsesResponseInputItemMcpCallStatusFailed OpenAITypesResponsesResponseInputItemMcpCallStatus = "failed"
type OpenAIResponseCustomToolCallOutput struct{…}

The output of a custom tool call from your code, being sent back to the model.

CallID string
Output OpenAIResponseCustomToolCallOutputOutputUnion
One of the following:
string
type OpenAIResponseCustomToolCallOutputOutputOutputContentList []OpenAIResponseCustomToolCallOutputOutputOutputContentListItemUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Type CustomToolCallOutput
ID stringOptional
type OpenAIResponseCustomToolCall struct{…}

A call to a custom tool created by the model.

CallID string
Input string
Name string
Type CustomToolCall
ID stringOptional
type OpenAITypesResponsesResponseInputItemItemReference struct{…}

An internal identifier for an item to reference.

ID string
Type OpenAITypesResponsesResponseInputItemItemReferenceTypeOptional
MaxOutputTokens int64Optional
MaxToolCalls int64Optional
Metadata map[string, string]Optional
PreviousResponseID stringOptional
Prompt OpenAIResponsePromptOptional

Reference to a prompt template and its variables. Learn more.

ID string
Variables map[string, OpenAIResponsePromptVariableUnion]Optional
One of the following:
string
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Version stringOptional
PromptCacheKey stringOptional
PromptCacheRetention OpenAIResponsePromptCacheRetentionOptional
One of the following:
const OpenAIResponsePromptCacheRetentionInMemory OpenAIResponsePromptCacheRetention = "in-memory"
const OpenAIResponsePromptCacheRetention24h OpenAIResponsePromptCacheRetention = "24h"
Reasoning ReasoningOptional

gpt-5 and o-series models only

Configuration options for reasoning models.

Effort ReasoningEffortOptional
One of the following:
const ReasoningEffortNone ReasoningEffort = "none"
const ReasoningEffortMinimal ReasoningEffort = "minimal"
const ReasoningEffortLow ReasoningEffort = "low"
const ReasoningEffortMedium ReasoningEffort = "medium"
const ReasoningEffortHigh ReasoningEffort = "high"
const ReasoningEffortXhigh ReasoningEffort = "xhigh"
GenerateSummary ReasoningGenerateSummaryOptional
One of the following:
const ReasoningGenerateSummaryAuto ReasoningGenerateSummary = "auto"
const ReasoningGenerateSummaryConcise ReasoningGenerateSummary = "concise"
const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"
Summary ReasoningSummaryOptional
One of the following:
const ReasoningSummaryAuto ReasoningSummary = "auto"
const ReasoningSummaryConcise ReasoningSummary = "concise"
const ReasoningSummaryDetailed ReasoningSummary = "detailed"
SafetyIdentifier stringOptional
ServiceTier OpenAIResponseServiceTierOptional
One of the following:
const OpenAIResponseServiceTierAuto OpenAIResponseServiceTier = "auto"
const OpenAIResponseServiceTierDefault OpenAIResponseServiceTier = "default"
const OpenAIResponseServiceTierFlex OpenAIResponseServiceTier = "flex"
const OpenAIResponseServiceTierScale OpenAIResponseServiceTier = "scale"
const OpenAIResponseServiceTierPriority OpenAIResponseServiceTier = "priority"
Status OpenAIResponseStatusOptional
One of the following:
const OpenAIResponseStatusCompleted OpenAIResponseStatus = "completed"
const OpenAIResponseStatusFailed OpenAIResponseStatus = "failed"
const OpenAIResponseStatusInProgress OpenAIResponseStatus = "in_progress"
const OpenAIResponseStatusCancelled OpenAIResponseStatus = "cancelled"
const OpenAIResponseStatusQueued OpenAIResponseStatus = "queued"
const OpenAIResponseStatusIncomplete OpenAIResponseStatus = "incomplete"
Temperature float64Optional

Configuration options for a text response from the model.

Can be plain text or structured JSON data. Learn more:

Format OpenAIResponseTextConfigFormatUnionOptional

Default response format. Used to generate text responses.

One of the following:
type OpenAIResponseTextConfigFormatResponseFormatText struct{…}

Default response format. Used to generate text responses.

Type Text
type OpenAIResponseTextConfigFormatResponseFormatTextJsonSchemaConfig struct{…}

JSON Schema response format.

Used to generate structured JSON responses. Learn more about Structured Outputs.

Name string
Schema map[string, any]
Type JsonSchema
Description stringOptional
Strict boolOptional
type OpenAIResponseTextConfigFormatResponseFormatJsonObject struct{…}

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.

Type JsonObject
Verbosity OpenAIResponseTextConfigVerbosityOptional
One of the following:
const OpenAIResponseTextConfigVerbosityLow OpenAIResponseTextConfigVerbosity = "low"
const OpenAIResponseTextConfigVerbosityMedium OpenAIResponseTextConfigVerbosity = "medium"
const OpenAIResponseTextConfigVerbosityHigh OpenAIResponseTextConfigVerbosity = "high"
TopLogprobs int64Optional
TopP float64Optional
Truncation OpenAIResponseTruncationOptional
One of the following:
const OpenAIResponseTruncationAuto OpenAIResponseTruncation = "auto"
const OpenAIResponseTruncationDisabled OpenAIResponseTruncation = "disabled"
Usage OpenAIResponseUsageOptional

Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.

InputTokens int64
InputTokensDetails OpenAIResponseUsageInputTokensDetails

A detailed breakdown of the input tokens.

CachedTokens int64
OutputTokens int64
OutputTokensDetails OpenAIResponseUsageOutputTokensDetails

A detailed breakdown of the output tokens.

ReasoningTokens int64
TotalTokens int64
User stringOptional
SequenceNumber int64
Type ResponseCreated
type ResponseNewResponseResponseErrorEvent struct{…}

Emitted when an error occurs.

Message string
SequenceNumber int64
Type Error
Code stringOptional
Param stringOptional
type ResponseNewResponseResponseFileSearchCallCompletedEvent struct{…}

Emitted when a file search call is completed (results found).

ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseFileSearchCallCompleted
type ResponseNewResponseResponseFileSearchCallInProgressEvent struct{…}

Emitted when a file search call is initiated.

ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseFileSearchCallInProgress
type ResponseNewResponseResponseFileSearchCallSearchingEvent struct{…}

Emitted when a file search is currently searching.

ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseFileSearchCallSearching
type ResponseNewResponseResponseFunctionCallArgumentsDeltaEvent struct{…}

Emitted when there is a partial function-call arguments delta.

Delta string
ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseFunctionCallArgumentsDelta
type ResponseNewResponseResponseFunctionCallArgumentsDoneEvent struct{…}

Emitted when function-call arguments are finalized.

Arguments string
ItemID string
Name string
OutputIndex int64
SequenceNumber int64
Type ResponseFunctionCallArgumentsDone
type ResponseNewResponseResponseInProgressEvent struct{…}

Emitted when the response is in progress.

ID string
CreatedAt float64
Model OpenAIResponseModel
One of the following:
type OpenAIResponseModel string
One of the following:
const OpenAIResponseModelGpt5_2 OpenAIResponseModel = "gpt-5.2"
const OpenAIResponseModelGpt5_2_2025_12_11 OpenAIResponseModel = "gpt-5.2-2025-12-11"
const OpenAIResponseModelGpt5_2ChatLatest OpenAIResponseModel = "gpt-5.2-chat-latest"
const OpenAIResponseModelGpt5_2Pro OpenAIResponseModel = "gpt-5.2-pro"
const OpenAIResponseModelGpt5_2Pro2025_12_11 OpenAIResponseModel = "gpt-5.2-pro-2025-12-11"
const OpenAIResponseModelGpt5_1 OpenAIResponseModel = "gpt-5.1"
const OpenAIResponseModelGpt5_1_2025_11_13 OpenAIResponseModel = "gpt-5.1-2025-11-13"
const OpenAIResponseModelGpt5_1Codex OpenAIResponseModel = "gpt-5.1-codex"
const OpenAIResponseModelGpt5_1Mini OpenAIResponseModel = "gpt-5.1-mini"
const OpenAIResponseModelGpt5_1ChatLatest OpenAIResponseModel = "gpt-5.1-chat-latest"
const OpenAIResponseModelGpt5 OpenAIResponseModel = "gpt-5"
const OpenAIResponseModelGpt5Mini OpenAIResponseModel = "gpt-5-mini"
const OpenAIResponseModelGpt5Nano OpenAIResponseModel = "gpt-5-nano"
const OpenAIResponseModelGpt5_2025_08_07 OpenAIResponseModel = "gpt-5-2025-08-07"
const OpenAIResponseModelGpt5Mini2025_08_07 OpenAIResponseModel = "gpt-5-mini-2025-08-07"
const OpenAIResponseModelGpt5Nano2025_08_07 OpenAIResponseModel = "gpt-5-nano-2025-08-07"
const OpenAIResponseModelGpt5ChatLatest OpenAIResponseModel = "gpt-5-chat-latest"
const OpenAIResponseModelGpt4_1 OpenAIResponseModel = "gpt-4.1"
const OpenAIResponseModelGpt4_1Mini OpenAIResponseModel = "gpt-4.1-mini"
const OpenAIResponseModelGpt4_1Nano OpenAIResponseModel = "gpt-4.1-nano"
const OpenAIResponseModelGpt4_1_2025_04_14 OpenAIResponseModel = "gpt-4.1-2025-04-14"
const OpenAIResponseModelGpt4_1Mini2025_04_14 OpenAIResponseModel = "gpt-4.1-mini-2025-04-14"
const OpenAIResponseModelGpt4_1Nano2025_04_14 OpenAIResponseModel = "gpt-4.1-nano-2025-04-14"
const OpenAIResponseModelO4Mini OpenAIResponseModel = "o4-mini"
const OpenAIResponseModelO4Mini2025_04_16 OpenAIResponseModel = "o4-mini-2025-04-16"
const OpenAIResponseModelO3 OpenAIResponseModel = "o3"
const OpenAIResponseModelO3_2025_04_16 OpenAIResponseModel = "o3-2025-04-16"
const OpenAIResponseModelO3Mini OpenAIResponseModel = "o3-mini"
const OpenAIResponseModelO3Mini2025_01_31 OpenAIResponseModel = "o3-mini-2025-01-31"
const OpenAIResponseModelO1 OpenAIResponseModel = "o1"
const OpenAIResponseModelO1_2024_12_17 OpenAIResponseModel = "o1-2024-12-17"
const OpenAIResponseModelO1Preview OpenAIResponseModel = "o1-preview"
const OpenAIResponseModelO1Preview2024_09_12 OpenAIResponseModel = "o1-preview-2024-09-12"
const OpenAIResponseModelO1Mini OpenAIResponseModel = "o1-mini"
const OpenAIResponseModelO1Mini2024_09_12 OpenAIResponseModel = "o1-mini-2024-09-12"
const OpenAIResponseModelGpt4o OpenAIResponseModel = "gpt-4o"
const OpenAIResponseModelGpt4o2024_11_20 OpenAIResponseModel = "gpt-4o-2024-11-20"
const OpenAIResponseModelGpt4o2024_08_06 OpenAIResponseModel = "gpt-4o-2024-08-06"
const OpenAIResponseModelGpt4o2024_05_13 OpenAIResponseModel = "gpt-4o-2024-05-13"
const OpenAIResponseModelGpt4oAudioPreview OpenAIResponseModel = "gpt-4o-audio-preview"
const OpenAIResponseModelGpt4oAudioPreview2024_10_01 OpenAIResponseModel = "gpt-4o-audio-preview-2024-10-01"
const OpenAIResponseModelGpt4oAudioPreview2024_12_17 OpenAIResponseModel = "gpt-4o-audio-preview-2024-12-17"
const OpenAIResponseModelGpt4oAudioPreview2025_06_03 OpenAIResponseModel = "gpt-4o-audio-preview-2025-06-03"
const OpenAIResponseModelGpt4oMiniAudioPreview OpenAIResponseModel = "gpt-4o-mini-audio-preview"
const OpenAIResponseModelGpt4oMiniAudioPreview2024_12_17 OpenAIResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"
const OpenAIResponseModelGpt4oSearchPreview OpenAIResponseModel = "gpt-4o-search-preview"
const OpenAIResponseModelGpt4oMiniSearchPreview OpenAIResponseModel = "gpt-4o-mini-search-preview"
const OpenAIResponseModelGpt4oSearchPreview2025_03_11 OpenAIResponseModel = "gpt-4o-search-preview-2025-03-11"
const OpenAIResponseModelGpt4oMiniSearchPreview2025_03_11 OpenAIResponseModel = "gpt-4o-mini-search-preview-2025-03-11"
const OpenAIResponseModelChatgpt4oLatest OpenAIResponseModel = "chatgpt-4o-latest"
const OpenAIResponseModelCodexMiniLatest OpenAIResponseModel = "codex-mini-latest"
const OpenAIResponseModelGpt4oMini OpenAIResponseModel = "gpt-4o-mini"
const OpenAIResponseModelGpt4oMini2024_07_18 OpenAIResponseModel = "gpt-4o-mini-2024-07-18"
const OpenAIResponseModelGpt4Turbo OpenAIResponseModel = "gpt-4-turbo"
const OpenAIResponseModelGpt4Turbo2024_04_09 OpenAIResponseModel = "gpt-4-turbo-2024-04-09"
const OpenAIResponseModelGpt4_0125Preview OpenAIResponseModel = "gpt-4-0125-preview"
const OpenAIResponseModelGpt4TurboPreview OpenAIResponseModel = "gpt-4-turbo-preview"
const OpenAIResponseModelGpt4_1106Preview OpenAIResponseModel = "gpt-4-1106-preview"
const OpenAIResponseModelGpt4VisionPreview OpenAIResponseModel = "gpt-4-vision-preview"
const OpenAIResponseModelGpt4 OpenAIResponseModel = "gpt-4"
const OpenAIResponseModelGpt4_0314 OpenAIResponseModel = "gpt-4-0314"
const OpenAIResponseModelGpt4_0613 OpenAIResponseModel = "gpt-4-0613"
const OpenAIResponseModelGpt4_32k OpenAIResponseModel = "gpt-4-32k"
const OpenAIResponseModelGpt4_32k0314 OpenAIResponseModel = "gpt-4-32k-0314"
const OpenAIResponseModelGpt4_32k0613 OpenAIResponseModel = "gpt-4-32k-0613"
const OpenAIResponseModelGpt3_5Turbo OpenAIResponseModel = "gpt-3.5-turbo"
const OpenAIResponseModelGpt3_5Turbo16k OpenAIResponseModel = "gpt-3.5-turbo-16k"
const OpenAIResponseModelGpt3_5Turbo0301 OpenAIResponseModel = "gpt-3.5-turbo-0301"
const OpenAIResponseModelGpt3_5Turbo0613 OpenAIResponseModel = "gpt-3.5-turbo-0613"
const OpenAIResponseModelGpt3_5Turbo1106 OpenAIResponseModel = "gpt-3.5-turbo-1106"
const OpenAIResponseModelGpt3_5Turbo0125 OpenAIResponseModel = "gpt-3.5-turbo-0125"
const OpenAIResponseModelGpt3_5Turbo16k0613 OpenAIResponseModel = "gpt-3.5-turbo-16k-0613"
const OpenAIResponseModelO1Pro OpenAIResponseModel = "o1-pro"
const OpenAIResponseModelO1Pro2025_03_19 OpenAIResponseModel = "o1-pro-2025-03-19"
const OpenAIResponseModelO3Pro OpenAIResponseModel = "o3-pro"
const OpenAIResponseModelO3Pro2025_06_10 OpenAIResponseModel = "o3-pro-2025-06-10"
const OpenAIResponseModelO3DeepResearch OpenAIResponseModel = "o3-deep-research"
const OpenAIResponseModelO3DeepResearch2025_06_26 OpenAIResponseModel = "o3-deep-research-2025-06-26"
const OpenAIResponseModelO4MiniDeepResearch OpenAIResponseModel = "o4-mini-deep-research"
const OpenAIResponseModelO4MiniDeepResearch2025_06_26 OpenAIResponseModel = "o4-mini-deep-research-2025-06-26"
const OpenAIResponseModelComputerUsePreview OpenAIResponseModel = "computer-use-preview"
const OpenAIResponseModelComputerUsePreview2025_03_11 OpenAIResponseModel = "computer-use-preview-2025-03-11"
const OpenAIResponseModelGpt5Codex OpenAIResponseModel = "gpt-5-codex"
const OpenAIResponseModelGpt5Pro OpenAIResponseModel = "gpt-5-pro"
const OpenAIResponseModelGpt5Pro2025_10_06 OpenAIResponseModel = "gpt-5-pro-2025-10-06"
const OpenAIResponseModelGpt5_1CodexMax OpenAIResponseModel = "gpt-5.1-codex-max"
string
Object Response
Output []OpenAIResponseOutputUnion
One of the following:
type OpenAIResponseOutputMessage struct{…}

An output message from the model.

ID string
Content []OpenAIResponseOutputMessageContentUnion
One of the following:
type OpenAIResponseOutputText struct{…}

A text output from the model.

Annotations []OpenAIResponseOutputTextAnnotationUnion
One of the following:
type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []OpenAIResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type OpenAIResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string
Type Refusal
Role Assistant
Status OpenAIResponseOutputMessageStatus
One of the following:
const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"
const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"
const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"
Type Message
Phase OpenAIResponseOutputMessagePhaseOptional
One of the following:
const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"
const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"
type OpenAIResponseFileSearchToolCall struct{…}

The results of a file search tool call.

See the file search guide for more information.

ID string
Queries []string
Status OpenAIResponseFileSearchToolCallStatus
One of the following:
const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"
const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"
const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"
const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"
const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"
Type FileSearchCall
Results []OpenAIResponseFileSearchToolCallResultOptional
Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]Optional
One of the following:
string
float64
bool
FileID stringOptional
Filename stringOptional
Score float64Optional
Text stringOptional
type OpenAIResponseFunctionToolCall struct{…}

A tool call to run a function.

See the function calling guide for more information.

Arguments string
CallID string
Name string
Type FunctionCall
ID stringOptional
Status OpenAIResponseFunctionToolCallStatusOptional
One of the following:
const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"
const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"
const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"
One of the following:
One of the following:
type OpenAIResponseComputerToolCall struct{…}

A tool call to a computer use tool.

See the computer use guide for more information.

ID string
Action OpenAIResponseComputerToolCallActionUnion

A click action.

One of the following:
type OpenAIResponseComputerToolCallActionActionClick struct{…}

A click action.

Button string
One of the following:
const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"
const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"
const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"
const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"
const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"
Type Click
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}

A double click action.

Type DoubleClick
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDrag struct{…}

A drag action.

Path []OpenAIResponseComputerToolCallActionActionDragPath
X int64
Y int64
Type Drag
type OpenAIResponseComputerToolCallActionActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string
Type Keypress
type OpenAIResponseComputerToolCallActionActionMove struct{…}

A mouse move action.

Type Move
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}

A screenshot action.

Type Screenshot
type OpenAIResponseComputerToolCallActionActionScroll struct{…}

A scroll action.

ScrollX int64
ScrollY int64
Type Scroll
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionType struct{…}

An action to type in text.

Text string
Type Type
type OpenAIResponseComputerToolCallActionActionWait struct{…}

A wait action.

Type Wait
CallID string
PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck
ID string
Code stringOptional
Message stringOptional
Status OpenAIResponseComputerToolCallStatus
One of the following:
const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"
const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"
const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"
Type ComputerCall
type OpenAIResponseReasoningItem struct{…}

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.

ID string
Summary []OpenAIResponseReasoningItemSummary
Text string
Type SummaryText
Type Reasoning
Content []OpenAIResponseReasoningItemContentOptional
Text string
Type ReasoningText
EncryptedContent stringOptional
Status OpenAIResponseReasoningItemStatusOptional
One of the following:
const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"
const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"
const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"
type ResponseCompactionItem struct{…}

A compaction item generated by the v1/responses/compact API.

ID string
EncryptedContent string
Type Compaction
CreatedBy stringOptional
type OpenAITypesResponsesResponseOutputItemImageGenerationCall struct{…}

An image generation request made by the model.

ID string
Status OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus
One of the following:
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "generating"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "failed"
Type ImageGenerationCall
Result stringOptional
type OpenAIResponseCodeInterpreterToolCall struct{…}

A tool call to run code.

ID string
ContainerID string
Status OpenAIResponseCodeInterpreterToolCallStatus
One of the following:
const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"
const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"
const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"
const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"
const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"
Type CodeInterpreterCall
Code stringOptional
Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnionOptional
One of the following:
type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}

The logs output from the code interpreter.

Logs string
Type Logs
type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}

The image output from the code interpreter.

Type Image
URL string
type OpenAITypesResponsesResponseOutputItemLocalShellCall struct{…}

A tool call to run a command on the local shell.

ID string
Action OpenAITypesResponsesResponseOutputItemLocalShellCallAction

Execute a shell command on the server.

Command []string
Env map[string, string]
Type Exec
TimeoutMs int64Optional
User stringOptional
WorkingDirectory stringOptional
CallID string
Status OpenAITypesResponsesResponseOutputItemLocalShellCallStatus
One of the following:
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "incomplete"
Type LocalShellCall
type ResponseFunctionShellToolCall struct{…}

A tool call that executes one or more shell commands in a managed environment.

ID string
Action ResponseFunctionShellToolCallAction

The shell commands and limits that describe how to run the tool call.

Commands []string
MaxOutputLength int64Optional
TimeoutMs int64Optional
CallID string
Status ResponseFunctionShellToolCallStatus
One of the following:
const ResponseFunctionShellToolCallStatusInProgress ResponseFunctionShellToolCallStatus = "in_progress"
const ResponseFunctionShellToolCallStatusCompleted ResponseFunctionShellToolCallStatus = "completed"
const ResponseFunctionShellToolCallStatusIncomplete ResponseFunctionShellToolCallStatus = "incomplete"
Type ShellCall
CreatedBy stringOptional
Environment ResponseFunctionShellToolCallEnvironmentUnionOptional

Represents the use of a local environment to perform shell actions.

One of the following:
type ResponseFunctionShellToolCallEnvironmentResponseLocalEnvironment struct{…}

Represents the use of a local environment to perform shell actions.

Type Local
type ResponseFunctionShellToolCallEnvironmentResponseContainerReference struct{…}

Represents a container created with /v1/containers.

ContainerID string
Type ContainerReference
type ResponseFunctionShellToolCallOutput struct{…}

The output of a shell tool call that was emitted.

ID string
CallID string
Output []ResponseFunctionShellToolCallOutputOutput
Outcome ResponseFunctionShellToolCallOutputOutputOutcomeUnion

Indicates that the shell call exceeded its configured time limit.

One of the following:
type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeTimeout struct{…}

Indicates that the shell call exceeded its configured time limit.

Type Timeout
type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeExit struct{…}

Indicates that the shell commands finished and returned an exit code.

ExitCode int64
Type Exit
Stderr string
Stdout string
CreatedBy stringOptional
Status ResponseFunctionShellToolCallOutputStatus
One of the following:
const ResponseFunctionShellToolCallOutputStatusInProgress ResponseFunctionShellToolCallOutputStatus = "in_progress"
const ResponseFunctionShellToolCallOutputStatusCompleted ResponseFunctionShellToolCallOutputStatus = "completed"
const ResponseFunctionShellToolCallOutputStatusIncomplete ResponseFunctionShellToolCallOutputStatus = "incomplete"
Type ShellCallOutput
CreatedBy stringOptional
MaxOutputLength int64Optional
type ResponseApplyPatchToolCall struct{…}

A tool call that applies file diffs by creating, deleting, or updating files.

ID string
CallID string
Operation ResponseApplyPatchToolCallOperationUnion

Instruction describing how to create a file via the apply_patch tool.

One of the following:
type ResponseApplyPatchToolCallOperationOperationCreateFile struct{…}

Instruction describing how to create a file via the apply_patch tool.

Diff string
Path string
Type CreateFile
type ResponseApplyPatchToolCallOperationOperationDeleteFile struct{…}

Instruction describing how to delete a file via the apply_patch tool.

Path string
Type DeleteFile
type ResponseApplyPatchToolCallOperationOperationUpdateFile struct{…}

Instruction describing how to update a file via the apply_patch tool.

Diff string
Path string
Type UpdateFile
Status ResponseApplyPatchToolCallStatus
One of the following:
const ResponseApplyPatchToolCallStatusInProgress ResponseApplyPatchToolCallStatus = "in_progress"
const ResponseApplyPatchToolCallStatusCompleted ResponseApplyPatchToolCallStatus = "completed"
Type ApplyPatchCall
CreatedBy stringOptional
type ResponseApplyPatchToolCallOutput struct{…}

The output emitted by an apply patch tool call.

ID string
CallID string
Status ResponseApplyPatchToolCallOutputStatus
One of the following:
const ResponseApplyPatchToolCallOutputStatusCompleted ResponseApplyPatchToolCallOutputStatus = "completed"
const ResponseApplyPatchToolCallOutputStatusFailed ResponseApplyPatchToolCallOutputStatus = "failed"
Type ApplyPatchCallOutput
CreatedBy stringOptional
Output stringOptional
type OpenAITypesResponsesResponseOutputItemMcpCall struct{…}

An invocation of a tool on an MCP server.

ID string
Arguments string
Name string
ServerLabel string
Type McpCall
ApprovalRequestID stringOptional
Error stringOptional
Output stringOptional
Status OpenAITypesResponsesResponseOutputItemMcpCallStatusOptional
One of the following:
const OpenAITypesResponsesResponseOutputItemMcpCallStatusInProgress OpenAITypesResponsesResponseOutputItemMcpCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusCompleted OpenAITypesResponsesResponseOutputItemMcpCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseOutputItemMcpCallStatus = "incomplete"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusCalling OpenAITypesResponsesResponseOutputItemMcpCallStatus = "calling"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusFailed OpenAITypesResponsesResponseOutputItemMcpCallStatus = "failed"
type OpenAITypesResponsesResponseOutputItemMcpListTools struct{…}

A list of tools available on an MCP server.

ID string
ServerLabel string
Tools []OpenAITypesResponsesResponseOutputItemMcpListToolsTool
InputSchema any
Name string
Annotations anyOptional
Description stringOptional
Type McpListTools
Error stringOptional
type McpApprovalRequest struct{…}

A request for human approval of a tool invocation.

ID string
Arguments string
Name string
ServerLabel string
Type McpApprovalRequest
type OpenAIResponseCustomToolCall struct{…}

A call to a custom tool created by the model.

CallID string
Input string
Name string
Type CustomToolCall
ID stringOptional
ParallelToolCalls bool
ToolChoice OpenAIResponseToolChoiceUnion

Constrains the tools available to the model to a pre-defined set.

One of the following:
type OpenAIResponseToolChoiceString string
One of the following:
const OpenAIResponseToolChoiceStringNone OpenAIResponseToolChoiceString = "none"
const OpenAIResponseToolChoiceStringAuto OpenAIResponseToolChoiceString = "auto"
const OpenAIResponseToolChoiceStringRequired OpenAIResponseToolChoiceString = "required"
type ToolChoiceAllowed struct{…}

Constrains the tools available to the model to a pre-defined set.

Mode ToolChoiceAllowedMode
One of the following:
const ToolChoiceAllowedModeAuto ToolChoiceAllowedMode = "auto"
const ToolChoiceAllowedModeRequired ToolChoiceAllowedMode = "required"
Tools []map[string, any]
Type AllowedTools
type ToolChoiceTypes struct{…}

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

Type ToolChoiceTypesType
One of the following:
const ToolChoiceTypesTypeFileSearch ToolChoiceTypesType = "file_search"
const ToolChoiceTypesTypeWebSearchPreview ToolChoiceTypesType = "web_search_preview"
const ToolChoiceTypesTypeComputerUsePreview ToolChoiceTypesType = "computer_use_preview"
const ToolChoiceTypesTypeWebSearchPreview2025_03_11 ToolChoiceTypesType = "web_search_preview_2025_03_11"
const ToolChoiceTypesTypeImageGeneration ToolChoiceTypesType = "image_generation"
const ToolChoiceTypesTypeCodeInterpreter ToolChoiceTypesType = "code_interpreter"
type ToolChoiceFunction struct{…}

Use this option to force the model to call a specific function.

Name string
Type Function
type ToolChoiceMcp struct{…}

Use this option to force the model to call a specific tool on a remote MCP server.

ServerLabel string
Type Mcp
Name stringOptional
type ToolChoiceCustom struct{…}

Use this option to force the model to call a specific custom tool.

Name string
Type Custom
type ToolChoiceApplyPatch struct{…}

Forces the model to call the apply_patch tool when executing a tool call.

Type ApplyPatch
type ToolChoiceShell struct{…}

Forces the model to call the shell tool when a tool call is required.

Type Shell
Tools []OpenAIResponseToolUnion
One of the following:
type FunctionTool struct{…}

Defines a function in your own code the model can choose to call.

Learn more about function calling.

Name string
Type Function
Description stringOptional
Parameters map[string, any]Optional
Strict boolOptional
type FileSearchTool struct{…}

A tool that searches for relevant content from uploaded files.

Learn more about the file search tool.

Type FileSearch
VectorStoreIDs []string
Filters FileSearchToolFiltersUnionOptional

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

One of the following:
type FileSearchToolFiltersComparisonFilter struct{…}

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

Key string
Type string
One of the following:
const FileSearchToolFiltersComparisonFilterTypeEq FileSearchToolFiltersComparisonFilterType = "eq"
const FileSearchToolFiltersComparisonFilterTypeNe FileSearchToolFiltersComparisonFilterType = "ne"
const FileSearchToolFiltersComparisonFilterTypeGt FileSearchToolFiltersComparisonFilterType = "gt"
const FileSearchToolFiltersComparisonFilterTypeGte FileSearchToolFiltersComparisonFilterType = "gte"
const FileSearchToolFiltersComparisonFilterTypeLt FileSearchToolFiltersComparisonFilterType = "lt"
const FileSearchToolFiltersComparisonFilterTypeLte FileSearchToolFiltersComparisonFilterType = "lte"
Value FileSearchToolFiltersComparisonFilterValueUnion
One of the following:
string
float64
bool
type FileSearchToolFiltersComparisonFilterValueArray []FileSearchToolFiltersComparisonFilterValueArrayItemUnion
One of the following:
string
float64
type FileSearchToolFiltersCompoundFilter struct{…}

Combine multiple filters using and or or.

Filters []FileSearchToolFiltersCompoundFilterFilter
One of the following:
type FileSearchToolFiltersCompoundFilterFilter struct{…}

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

Key string
Type string
One of the following:
const FileSearchToolFiltersCompoundFilterFilterTypeEq FileSearchToolFiltersCompoundFilterFilterType = "eq"
const FileSearchToolFiltersCompoundFilterFilterTypeNe FileSearchToolFiltersCompoundFilterFilterType = "ne"
const FileSearchToolFiltersCompoundFilterFilterTypeGt FileSearchToolFiltersCompoundFilterFilterType = "gt"
const FileSearchToolFiltersCompoundFilterFilterTypeGte FileSearchToolFiltersCompoundFilterFilterType = "gte"
const FileSearchToolFiltersCompoundFilterFilterTypeLt FileSearchToolFiltersCompoundFilterFilterType = "lt"
const FileSearchToolFiltersCompoundFilterFilterTypeLte FileSearchToolFiltersCompoundFilterFilterType = "lte"
Value FileSearchToolFiltersCompoundFilterFilterValueUnion
One of the following:
string
float64
bool
type FileSearchToolFiltersCompoundFilterFilterValueArray []FileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion
One of the following:
string
float64
Type string
One of the following:
const FileSearchToolFiltersCompoundFilterTypeAnd FileSearchToolFiltersCompoundFilterType = "and"
const FileSearchToolFiltersCompoundFilterTypeOr FileSearchToolFiltersCompoundFilterType = "or"
MaxNumResults int64Optional
RankingOptions FileSearchToolRankingOptionsOptional

Ranking options for search.

Ranker stringOptional
One of the following:
const FileSearchToolRankingOptionsRankerAuto FileSearchToolRankingOptionsRanker = "auto"
const FileSearchToolRankingOptionsRankerDefault2024_11_15 FileSearchToolRankingOptionsRanker = "default-2024-11-15"
ScoreThreshold float64Optional
type ComputerTool struct{…}

A tool that controls a virtual computer.

Learn more about the computer tool.

DisplayHeight int64
DisplayWidth int64
Environment ComputerToolEnvironment
One of the following:
const ComputerToolEnvironmentWindows ComputerToolEnvironment = "windows"
const ComputerToolEnvironmentMac ComputerToolEnvironment = "mac"
const ComputerToolEnvironmentLinux ComputerToolEnvironment = "linux"
const ComputerToolEnvironmentUbuntu ComputerToolEnvironment = "ubuntu"
const ComputerToolEnvironmentBrowser ComputerToolEnvironment = "browser"
Type ComputerUsePreview
type WebSearchTool struct{…}

Search the Internet for sources related to the prompt.

Learn more about the web search tool.

Type WebSearchToolType
One of the following:
const WebSearchToolTypeWebSearch WebSearchToolType = "web_search"
const WebSearchToolTypeWebSearch2025_08_26 WebSearchToolType = "web_search_2025_08_26"
Filters WebSearchToolFiltersOptional

Filters for the search.

AllowedDomains []stringOptional
SearchContextSize WebSearchToolSearchContextSizeOptional
One of the following:
const WebSearchToolSearchContextSizeLow WebSearchToolSearchContextSize = "low"
const WebSearchToolSearchContextSizeMedium WebSearchToolSearchContextSize = "medium"
const WebSearchToolSearchContextSizeHigh WebSearchToolSearchContextSize = "high"
UserLocation WebSearchToolUserLocationOptional

The approximate location of the user.

City stringOptional
Country stringOptional
Region stringOptional
Timezone stringOptional
Type stringOptional
type OpenAIResponseToolMcp struct{…}

Give the model access to additional tools via remote Model Context Protocol (MCP) servers. Learn more about MCP.

ServerLabel string
Type Mcp
AllowedTools OpenAIResponseToolMcpAllowedToolsUnionOptional

A filter object to specify which tools are allowed.

One of the following:
type OpenAIResponseToolMcpAllowedToolsArray []string
type OpenAIResponseToolMcpAllowedToolsMcpAllowedToolsMcpToolFilter struct{…}

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
Authorization stringOptional
ConnectorID stringOptional
One of the following:
const OpenAIResponseToolMcpConnectorIDConnectorDropbox OpenAIResponseToolMcpConnectorID = "connector_dropbox"
const OpenAIResponseToolMcpConnectorIDConnectorGmail OpenAIResponseToolMcpConnectorID = "connector_gmail"
const OpenAIResponseToolMcpConnectorIDConnectorGooglecalendar OpenAIResponseToolMcpConnectorID = "connector_googlecalendar"
const OpenAIResponseToolMcpConnectorIDConnectorGoogledrive OpenAIResponseToolMcpConnectorID = "connector_googledrive"
const OpenAIResponseToolMcpConnectorIDConnectorMicrosoftteams OpenAIResponseToolMcpConnectorID = "connector_microsoftteams"
const OpenAIResponseToolMcpConnectorIDConnectorOutlookcalendar OpenAIResponseToolMcpConnectorID = "connector_outlookcalendar"
const OpenAIResponseToolMcpConnectorIDConnectorOutlookemail OpenAIResponseToolMcpConnectorID = "connector_outlookemail"
const OpenAIResponseToolMcpConnectorIDConnectorSharepoint OpenAIResponseToolMcpConnectorID = "connector_sharepoint"
Headers map[string, string]Optional
RequireApproval OpenAIResponseToolMcpRequireApprovalUnionOptional

Specify which of the MCP server’s tools require approval.

Can be always, never, or a filter object associated with tools that require approval.

One of the following:
type OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilter struct{…}

Specify which of the MCP server’s tools require approval.

Can be always, never, or a filter object associated with tools that require approval.

Always OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilterAlwaysOptional

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
Never OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilterNeverOptional

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
type OpenAIResponseToolMcpRequireApprovalString string
One of the following:
const OpenAIResponseToolMcpRequireApprovalStringAlways OpenAIResponseToolMcpRequireApprovalString = "always"
const OpenAIResponseToolMcpRequireApprovalStringNever OpenAIResponseToolMcpRequireApprovalString = "never"
ServerDescription stringOptional
ServerURL stringOptional
type OpenAIResponseToolCodeInterpreter struct{…}

A tool that runs Python code to help generate a response to a prompt.

Container OpenAIResponseToolCodeInterpreterContainerUnion

Configuration for a code interpreter container.

Optionally specify the IDs of the files to run the code on.

One of the following:
string
type OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAuto struct{…}

Configuration for a code interpreter container.

Optionally specify the IDs of the files to run the code on.

Type Auto
FileIDs []stringOptional
MemoryLimit stringOptional
One of the following:
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"
NetworkPolicy OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnionOptional
One of the following:
type ContainerNetworkPolicyDisabled struct{…}
Type Disabled
type ContainerNetworkPolicyAllowlist struct{…}
AllowedDomains []string
Type Allowlist
DomainSecrets []ContainerNetworkPolicyAllowlistDomainSecretOptional
Domain string
Name string
Value string
Type CodeInterpreter
type OpenAIResponseToolImageGeneration struct{…}

A tool that generates images using the GPT image models.

Type ImageGeneration
Action stringOptional
One of the following:
const OpenAIResponseToolImageGenerationActionGenerate OpenAIResponseToolImageGenerationAction = "generate"
const OpenAIResponseToolImageGenerationActionEdit OpenAIResponseToolImageGenerationAction = "edit"
const OpenAIResponseToolImageGenerationActionAuto OpenAIResponseToolImageGenerationAction = "auto"
Background stringOptional
One of the following:
const OpenAIResponseToolImageGenerationBackgroundTransparent OpenAIResponseToolImageGenerationBackground = "transparent"
const OpenAIResponseToolImageGenerationBackgroundOpaque OpenAIResponseToolImageGenerationBackground = "opaque"
const OpenAIResponseToolImageGenerationBackgroundAuto OpenAIResponseToolImageGenerationBackground = "auto"
InputFidelity stringOptional
One of the following:
const OpenAIResponseToolImageGenerationInputFidelityHigh OpenAIResponseToolImageGenerationInputFidelity = "high"
const OpenAIResponseToolImageGenerationInputFidelityLow OpenAIResponseToolImageGenerationInputFidelity = "low"
InputImageMask OpenAIResponseToolImageGenerationInputImageMaskOptional

Optional mask for inpainting.

Contains image_url (string, optional) and file_id (string, optional).

FileID stringOptional
ImageURL stringOptional
Model stringOptional
One of the following:
string
string
One of the following:
const OpenAIResponseToolImageGenerationModelGptImage1 OpenAIResponseToolImageGenerationModel = "gpt-image-1"
const OpenAIResponseToolImageGenerationModelGptImage1Mini OpenAIResponseToolImageGenerationModel = "gpt-image-1-mini"
const OpenAIResponseToolImageGenerationModelGptImage1_5 OpenAIResponseToolImageGenerationModel = "gpt-image-1.5"
Moderation stringOptional
One of the following:
const OpenAIResponseToolImageGenerationModerationAuto OpenAIResponseToolImageGenerationModeration = "auto"
const OpenAIResponseToolImageGenerationModerationLow OpenAIResponseToolImageGenerationModeration = "low"
OutputCompression int64Optional
OutputFormat stringOptional
One of the following:
const OpenAIResponseToolImageGenerationOutputFormatPng OpenAIResponseToolImageGenerationOutputFormat = "png"
const OpenAIResponseToolImageGenerationOutputFormatWebp OpenAIResponseToolImageGenerationOutputFormat = "webp"
const OpenAIResponseToolImageGenerationOutputFormatJpeg OpenAIResponseToolImageGenerationOutputFormat = "jpeg"
PartialImages int64Optional
Quality stringOptional
One of the following:
const OpenAIResponseToolImageGenerationQualityLow OpenAIResponseToolImageGenerationQuality = "low"
const OpenAIResponseToolImageGenerationQualityMedium OpenAIResponseToolImageGenerationQuality = "medium"
const OpenAIResponseToolImageGenerationQualityHigh OpenAIResponseToolImageGenerationQuality = "high"
const OpenAIResponseToolImageGenerationQualityAuto OpenAIResponseToolImageGenerationQuality = "auto"
Size stringOptional
One of the following:
const OpenAIResponseToolImageGenerationSize1024x1024 OpenAIResponseToolImageGenerationSize = "1024x1024"
const OpenAIResponseToolImageGenerationSize1024x1536 OpenAIResponseToolImageGenerationSize = "1024x1536"
const OpenAIResponseToolImageGenerationSize1536x1024 OpenAIResponseToolImageGenerationSize = "1536x1024"
const OpenAIResponseToolImageGenerationSizeAuto OpenAIResponseToolImageGenerationSize = "auto"
type OpenAIResponseToolLocalShell struct{…}

A tool that allows the model to execute shell commands in a local environment.

Type LocalShell
type FunctionShellTool struct{…}

A tool that allows the model to execute shell commands.

Type Shell
Environment FunctionShellToolEnvironmentUnionOptional
One of the following:
type FunctionShellToolEnvironmentContainerAuto struct{…}
Type ContainerAuto
FileIDs []stringOptional
MemoryLimit stringOptional
One of the following:
const FunctionShellToolEnvironmentContainerAutoMemoryLimit1g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "1g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit4g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "4g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit16g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "16g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit64g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "64g"
NetworkPolicy FunctionShellToolEnvironmentContainerAutoNetworkPolicyUnionOptional
One of the following:
type ContainerNetworkPolicyDisabled struct{…}
Type Disabled
type ContainerNetworkPolicyAllowlist struct{…}
AllowedDomains []string
Type Allowlist
DomainSecrets []ContainerNetworkPolicyAllowlistDomainSecretOptional
Domain string
Name string
Value string
Skills []FunctionShellToolEnvironmentContainerAutoSkillUnionOptional
One of the following:
type FunctionShellToolEnvironmentContainerAutoSkillSkillReference struct{…}
SkillID string
Type SkillReference
Version stringOptional
type FunctionShellToolEnvironmentContainerAutoSkillInlineSkill struct{…}
Description string
Name string
Source FunctionShellToolEnvironmentContainerAutoSkillInlineSkillSource

Inline skill payload

Data string
MediaType ApplicationZip
Type Base64
Type Inline
type LocalEnvironment struct{…}
Type Local
Skills []LocalEnvironmentSkillOptional
Description string
Name string
Path string
type ContainerReference struct{…}
ContainerID string
Type ContainerReference
type CustomTool struct{…}

A custom tool that processes input using a specified format.

Learn more about custom tools

Name string
Type Custom
Description stringOptional
Format CustomToolFormatUnionOptional

Unconstrained free-form text.

One of the following:
type CustomToolFormatText struct{…}

Unconstrained free-form text.

Type Text
type CustomToolFormatGrammar struct{…}

A grammar defined by the user.

Definition string
Syntax string
One of the following:
const CustomToolFormatGrammarSyntaxLark CustomToolFormatGrammarSyntax = "lark"
const CustomToolFormatGrammarSyntaxRegex CustomToolFormatGrammarSyntax = "regex"
Type Grammar
type WebSearchPreviewTool struct{…}

This tool searches the web for relevant results to use in a response.

Learn more about the web search tool.

Type WebSearchPreviewToolType
One of the following:
const WebSearchPreviewToolTypeWebSearchPreview WebSearchPreviewToolType = "web_search_preview"
const WebSearchPreviewToolTypeWebSearchPreview2025_03_11 WebSearchPreviewToolType = "web_search_preview_2025_03_11"
SearchContextSize WebSearchPreviewToolSearchContextSizeOptional
One of the following:
const WebSearchPreviewToolSearchContextSizeLow WebSearchPreviewToolSearchContextSize = "low"
const WebSearchPreviewToolSearchContextSizeMedium WebSearchPreviewToolSearchContextSize = "medium"
const WebSearchPreviewToolSearchContextSizeHigh WebSearchPreviewToolSearchContextSize = "high"
UserLocation WebSearchPreviewToolUserLocationOptional

The user’s location.

Type Approximate
City stringOptional
Country stringOptional
Region stringOptional
Timezone stringOptional
type ApplyPatchTool struct{…}

Allows the assistant to create, delete, or update files using unified diffs.

Type ApplyPatch
Background boolOptional
CompletedAt float64Optional
Conversation ConversationOptional

The conversation that this response belonged to.

Input items and output items from this response were automatically added to this conversation.

ID string
Error OpenAIResponseErrorOptional

An error object returned when the model fails to generate a Response.

Code OpenAIResponseErrorCode
One of the following:
const OpenAIResponseErrorCodeServerError OpenAIResponseErrorCode = "server_error"
const OpenAIResponseErrorCodeRateLimitExceeded OpenAIResponseErrorCode = "rate_limit_exceeded"
const OpenAIResponseErrorCodeInvalidPrompt OpenAIResponseErrorCode = "invalid_prompt"
const OpenAIResponseErrorCodeVectorStoreTimeout OpenAIResponseErrorCode = "vector_store_timeout"
const OpenAIResponseErrorCodeInvalidImage OpenAIResponseErrorCode = "invalid_image"
const OpenAIResponseErrorCodeInvalidImageFormat OpenAIResponseErrorCode = "invalid_image_format"
const OpenAIResponseErrorCodeInvalidBase64Image OpenAIResponseErrorCode = "invalid_base64_image"
const OpenAIResponseErrorCodeInvalidImageURL OpenAIResponseErrorCode = "invalid_image_url"
const OpenAIResponseErrorCodeImageTooLarge OpenAIResponseErrorCode = "image_too_large"
const OpenAIResponseErrorCodeImageTooSmall OpenAIResponseErrorCode = "image_too_small"
const OpenAIResponseErrorCodeImageParseError OpenAIResponseErrorCode = "image_parse_error"
const OpenAIResponseErrorCodeImageContentPolicyViolation OpenAIResponseErrorCode = "image_content_policy_violation"
const OpenAIResponseErrorCodeInvalidImageMode OpenAIResponseErrorCode = "invalid_image_mode"
const OpenAIResponseErrorCodeImageFileTooLarge OpenAIResponseErrorCode = "image_file_too_large"
const OpenAIResponseErrorCodeUnsupportedImageMediaType OpenAIResponseErrorCode = "unsupported_image_media_type"
const OpenAIResponseErrorCodeEmptyImageFile OpenAIResponseErrorCode = "empty_image_file"
const OpenAIResponseErrorCodeFailedToDownloadImage OpenAIResponseErrorCode = "failed_to_download_image"
const OpenAIResponseErrorCodeImageFileNotFound OpenAIResponseErrorCode = "image_file_not_found"
Message string
IncompleteDetails IncompleteDetailsOptional

Details about why the response is incomplete.

Reason IncompleteDetailsReasonOptional
One of the following:
const IncompleteDetailsReasonMaxOutputTokens IncompleteDetailsReason = "max_output_tokens"
const IncompleteDetailsReasonContentFilter IncompleteDetailsReason = "content_filter"
Instructions OpenAIResponseInstructionsUnionOptional
One of the following:
string
type OpenAIResponseInstructionsInputItems []OpenAIResponseInstructionsInputItemUnion
One of the following:
type EasyInputMessage struct{…}

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 EasyInputMessageContentUnion
One of the following:
string
type EasyInputMessageContentInputItems []EasyInputMessageContentInputItemUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Role EasyInputMessageRole
One of the following:
const EasyInputMessageRoleUser EasyInputMessageRole = "user"
const EasyInputMessageRoleAssistant EasyInputMessageRole = "assistant"
const EasyInputMessageRoleSystem EasyInputMessageRole = "system"
const EasyInputMessageRoleDeveloper EasyInputMessageRole = "developer"
Phase EasyInputMessagePhaseOptional
One of the following:
const EasyInputMessagePhaseCommentary EasyInputMessagePhase = "commentary"
const EasyInputMessagePhaseFinalAnswer EasyInputMessagePhase = "final_answer"
Type EasyInputMessageTypeOptional
type OpenAITypesResponsesResponseInputItemMessage struct{…}

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 []OpenAITypesResponsesResponseInputItemMessageContentUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Role OpenAITypesResponsesResponseInputItemMessageRole
One of the following:
const OpenAITypesResponsesResponseInputItemMessageRoleUser OpenAITypesResponsesResponseInputItemMessageRole = "user"
const OpenAITypesResponsesResponseInputItemMessageRoleSystem OpenAITypesResponsesResponseInputItemMessageRole = "system"
const OpenAITypesResponsesResponseInputItemMessageRoleDeveloper OpenAITypesResponsesResponseInputItemMessageRole = "developer"
Status OpenAITypesResponsesResponseInputItemMessageStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemMessageStatusInProgress OpenAITypesResponsesResponseInputItemMessageStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemMessageStatusCompleted OpenAITypesResponsesResponseInputItemMessageStatus = "completed"
const OpenAITypesResponsesResponseInputItemMessageStatusIncomplete OpenAITypesResponsesResponseInputItemMessageStatus = "incomplete"
Type OpenAITypesResponsesResponseInputItemMessageTypeOptional
type OpenAIResponseOutputMessage struct{…}

An output message from the model.

ID string
Content []OpenAIResponseOutputMessageContentUnion
One of the following:
type OpenAIResponseOutputText struct{…}

A text output from the model.

Annotations []OpenAIResponseOutputTextAnnotationUnion
One of the following:
type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []OpenAIResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type OpenAIResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string
Type Refusal
Role Assistant
Status OpenAIResponseOutputMessageStatus
One of the following:
const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"
const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"
const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"
Type Message
Phase OpenAIResponseOutputMessagePhaseOptional
One of the following:
const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"
const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"
type OpenAIResponseFileSearchToolCall struct{…}

The results of a file search tool call.

See the file search guide for more information.

ID string
Queries []string
Status OpenAIResponseFileSearchToolCallStatus
One of the following:
const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"
const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"
const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"
const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"
const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"
Type FileSearchCall
Results []OpenAIResponseFileSearchToolCallResultOptional
Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]Optional
One of the following:
string
float64
bool
FileID stringOptional
Filename stringOptional
Score float64Optional
Text stringOptional
type OpenAIResponseComputerToolCall struct{…}

A tool call to a computer use tool.

See the computer use guide for more information.

ID string
Action OpenAIResponseComputerToolCallActionUnion

A click action.

One of the following:
type OpenAIResponseComputerToolCallActionActionClick struct{…}

A click action.

Button string
One of the following:
const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"
const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"
const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"
const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"
const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"
Type Click
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}

A double click action.

Type DoubleClick
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDrag struct{…}

A drag action.

Path []OpenAIResponseComputerToolCallActionActionDragPath
X int64
Y int64
Type Drag
type OpenAIResponseComputerToolCallActionActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string
Type Keypress
type OpenAIResponseComputerToolCallActionActionMove struct{…}

A mouse move action.

Type Move
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}

A screenshot action.

Type Screenshot
type OpenAIResponseComputerToolCallActionActionScroll struct{…}

A scroll action.

ScrollX int64
ScrollY int64
Type Scroll
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionType struct{…}

An action to type in text.

Text string
Type Type
type OpenAIResponseComputerToolCallActionActionWait struct{…}

A wait action.

Type Wait
CallID string
PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck
ID string
Code stringOptional
Message stringOptional
Status OpenAIResponseComputerToolCallStatus
One of the following:
const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"
const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"
const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"
Type ComputerCall
type OpenAITypesResponsesResponseInputItemComputerCallOutput struct{…}

The output of a computer tool call.

CallID string

A computer screenshot image used with the computer use tool.

Type ComputerScreenshot
FileID stringOptional
ImageURL stringOptional
Type ComputerCallOutput
ID stringOptional
AcknowledgedSafetyChecks []OpenAITypesResponsesResponseInputItemComputerCallOutputAcknowledgedSafetyCheckOptional
ID string
Code stringOptional
Message stringOptional
Status OpenAITypesResponsesResponseInputItemComputerCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "incomplete"
One of the following:
One of the following:
type OpenAIResponseFunctionToolCall struct{…}

A tool call to run a function.

See the function calling guide for more information.

Arguments string
CallID string
Name string
Type FunctionCall
ID stringOptional
Status OpenAIResponseFunctionToolCallStatusOptional
One of the following:
const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"
const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"
const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"
type OpenAITypesResponsesResponseInputItemFunctionCallOutput struct{…}

The output of a function tool call.

CallID string
Output OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputUnion
One of the following:
string
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentList []OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemUnion
One of the following:
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputTextContent struct{…}

A text input to the model.

Text string
Type InputText
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContent struct{…}

An image input to the model.

Learn about image inputs

Type InputImage
Detail stringOptional
One of the following:
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailLow OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "low"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailHigh OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "high"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailAuto OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "auto"
FileID stringOptional
ImageURL stringOptional
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputFileContent struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Type FunctionCallOutput
ID stringOptional
Status OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "incomplete"
type OpenAIResponseReasoningItem struct{…}

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.

ID string
Summary []OpenAIResponseReasoningItemSummary
Text string
Type SummaryText
Type Reasoning
Content []OpenAIResponseReasoningItemContentOptional
Text string
Type ReasoningText
EncryptedContent stringOptional
Status OpenAIResponseReasoningItemStatusOptional
One of the following:
const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"
const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"
const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"
type ResponseCompactionItemParamResp struct{…}

A compaction item generated by the v1/responses/compact API.

EncryptedContent string
Type Compaction
ID stringOptional
type OpenAITypesResponsesResponseInputItemImageGenerationCall struct{…}

An image generation request made by the model.

ID string
Status OpenAITypesResponsesResponseInputItemImageGenerationCallStatus
One of the following:
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "generating"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "failed"
Type ImageGenerationCall
Result stringOptional
type OpenAIResponseCodeInterpreterToolCall struct{…}

A tool call to run code.

ID string
ContainerID string
Status OpenAIResponseCodeInterpreterToolCallStatus
One of the following:
const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"
const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"
const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"
const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"
const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"
Type CodeInterpreterCall
Code stringOptional
Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnionOptional
One of the following:
type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}

The logs output from the code interpreter.

Logs string
Type Logs
type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}

The image output from the code interpreter.

Type Image
URL string
type OpenAITypesResponsesResponseInputItemLocalShellCall struct{…}

A tool call to run a command on the local shell.

ID string
Action OpenAITypesResponsesResponseInputItemLocalShellCallAction

Execute a shell command on the server.

Command []string
Env map[string, string]
Type Exec
TimeoutMs int64Optional
User stringOptional
WorkingDirectory stringOptional
CallID string
Status OpenAITypesResponsesResponseInputItemLocalShellCallStatus
One of the following:
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "incomplete"
Type LocalShellCall
type OpenAITypesResponsesResponseInputItemLocalShellCallOutput struct{…}

The output of a local shell tool call.

ID string
Output string
Type LocalShellCallOutput
Status OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "incomplete"
type ShellCall struct{…}

A tool representing a request to execute one or more shell commands.

Action ShellCallAction

The shell commands and limits that describe how to run the tool call.

Commands []string
MaxOutputLength int64Optional
TimeoutMs int64Optional
CallID string
Type ShellCall
ID stringOptional
Environment ShellCallEnvironmentUnionOptional
One of the following:
type LocalEnvironment struct{…}
Type Local
Skills []LocalEnvironmentSkillOptional
Description string
Name string
Path string
type ContainerReference struct{…}
ContainerID string
Type ContainerReference
Status ShellCallStatusOptional
One of the following:
const ShellCallStatusInProgress ShellCallStatus = "in_progress"
const ShellCallStatusCompleted ShellCallStatus = "completed"
const ShellCallStatusIncomplete ShellCallStatus = "incomplete"
type ShellCallOutput struct{…}

The streamed output items emitted by a shell tool call.

CallID string
Output []ShellCallOutputOutput
Outcome ShellCallOutputOutputOutcomeUnion

Indicates that the shell call exceeded its configured time limit.

One of the following:
type ShellCallOutputOutputOutcomeOutcomeTimeout struct{…}

Indicates that the shell call exceeded its configured time limit.

Type Timeout
type ShellCallOutputOutputOutcomeOutcomeExit struct{…}

Indicates that the shell commands finished and returned an exit code.

ExitCode int64
Type Exit
Stderr string
Stdout string
Type ShellCallOutput
ID stringOptional
MaxOutputLength int64Optional
Status ShellCallOutputStatusOptional
One of the following:
const ShellCallOutputStatusInProgress ShellCallOutputStatus = "in_progress"
const ShellCallOutputStatusCompleted ShellCallOutputStatus = "completed"
const ShellCallOutputStatusIncomplete ShellCallOutputStatus = "incomplete"
type ApplyPatchCall struct{…}

A tool call representing a request to create, delete, or update files using diff patches.

CallID string
Operation ApplyPatchCallOperationUnion

Instruction for creating a new file via the apply_patch tool.

One of the following:
type ApplyPatchCallOperationApplyPatchCallOperationCreateFile struct{…}

Instruction for creating a new file via the apply_patch tool.

Diff string
Path string
Type CreateFile
type ApplyPatchCallOperationApplyPatchCallOperationDeleteFile struct{…}

Instruction for deleting an existing file via the apply_patch tool.

Path string
Type DeleteFile
type ApplyPatchCallOperationApplyPatchCallOperationUpdateFile struct{…}

Instruction for updating an existing file via the apply_patch tool.

Diff string
Path string
Type UpdateFile
Status ApplyPatchCallStatus
One of the following:
const ApplyPatchCallStatusInProgress ApplyPatchCallStatus = "in_progress"
const ApplyPatchCallStatusCompleted ApplyPatchCallStatus = "completed"
Type ApplyPatchCall
ID stringOptional
type ApplyPatchCallOutput struct{…}

The streamed output emitted by an apply patch tool call.

CallID string
Status ApplyPatchCallOutputStatus
One of the following:
const ApplyPatchCallOutputStatusCompleted ApplyPatchCallOutputStatus = "completed"
const ApplyPatchCallOutputStatusFailed ApplyPatchCallOutputStatus = "failed"
Type ApplyPatchCallOutput
ID stringOptional
Output stringOptional
type OpenAITypesResponsesResponseInputItemMcpListTools struct{…}

A list of tools available on an MCP server.

ID string
ServerLabel string
Tools []OpenAITypesResponsesResponseInputItemMcpListToolsTool
InputSchema any
Name string
Annotations anyOptional
Description stringOptional
Type McpListTools
Error stringOptional
type McpApprovalRequest struct{…}

A request for human approval of a tool invocation.

ID string
Arguments string
Name string
ServerLabel string
Type McpApprovalRequest
type OpenAITypesResponsesResponseInputItemMcpApprovalResponse struct{…}

A response to an MCP approval request.

ApprovalRequestID string
Approve bool
Type McpApprovalResponse
ID stringOptional
Reason stringOptional
type OpenAITypesResponsesResponseInputItemMcpCall struct{…}

An invocation of a tool on an MCP server.

ID string
Arguments string
Name string
ServerLabel string
Type McpCall
ApprovalRequestID stringOptional
Error stringOptional
Output stringOptional
Status OpenAITypesResponsesResponseInputItemMcpCallStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemMcpCallStatusInProgress OpenAITypesResponsesResponseInputItemMcpCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemMcpCallStatusCompleted OpenAITypesResponsesResponseInputItemMcpCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseInputItemMcpCallStatus = "incomplete"
const OpenAITypesResponsesResponseInputItemMcpCallStatusCalling OpenAITypesResponsesResponseInputItemMcpCallStatus = "calling"
const OpenAITypesResponsesResponseInputItemMcpCallStatusFailed OpenAITypesResponsesResponseInputItemMcpCallStatus = "failed"
type OpenAIResponseCustomToolCallOutput struct{…}

The output of a custom tool call from your code, being sent back to the model.

CallID string
Output OpenAIResponseCustomToolCallOutputOutputUnion
One of the following:
string
type OpenAIResponseCustomToolCallOutputOutputOutputContentList []OpenAIResponseCustomToolCallOutputOutputOutputContentListItemUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Type CustomToolCallOutput
ID stringOptional
type OpenAIResponseCustomToolCall struct{…}

A call to a custom tool created by the model.

CallID string
Input string
Name string
Type CustomToolCall
ID stringOptional
type OpenAITypesResponsesResponseInputItemItemReference struct{…}

An internal identifier for an item to reference.

ID string
Type OpenAITypesResponsesResponseInputItemItemReferenceTypeOptional
MaxOutputTokens int64Optional
MaxToolCalls int64Optional
Metadata map[string, string]Optional
PreviousResponseID stringOptional
Prompt OpenAIResponsePromptOptional

Reference to a prompt template and its variables. Learn more.

ID string
Variables map[string, OpenAIResponsePromptVariableUnion]Optional
One of the following:
string
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Version stringOptional
PromptCacheKey stringOptional
PromptCacheRetention OpenAIResponsePromptCacheRetentionOptional
One of the following:
const OpenAIResponsePromptCacheRetentionInMemory OpenAIResponsePromptCacheRetention = "in-memory"
const OpenAIResponsePromptCacheRetention24h OpenAIResponsePromptCacheRetention = "24h"
Reasoning ReasoningOptional

gpt-5 and o-series models only

Configuration options for reasoning models.

Effort ReasoningEffortOptional
One of the following:
const ReasoningEffortNone ReasoningEffort = "none"
const ReasoningEffortMinimal ReasoningEffort = "minimal"
const ReasoningEffortLow ReasoningEffort = "low"
const ReasoningEffortMedium ReasoningEffort = "medium"
const ReasoningEffortHigh ReasoningEffort = "high"
const ReasoningEffortXhigh ReasoningEffort = "xhigh"
GenerateSummary ReasoningGenerateSummaryOptional
One of the following:
const ReasoningGenerateSummaryAuto ReasoningGenerateSummary = "auto"
const ReasoningGenerateSummaryConcise ReasoningGenerateSummary = "concise"
const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"
Summary ReasoningSummaryOptional
One of the following:
const ReasoningSummaryAuto ReasoningSummary = "auto"
const ReasoningSummaryConcise ReasoningSummary = "concise"
const ReasoningSummaryDetailed ReasoningSummary = "detailed"
SafetyIdentifier stringOptional
ServiceTier OpenAIResponseServiceTierOptional
One of the following:
const OpenAIResponseServiceTierAuto OpenAIResponseServiceTier = "auto"
const OpenAIResponseServiceTierDefault OpenAIResponseServiceTier = "default"
const OpenAIResponseServiceTierFlex OpenAIResponseServiceTier = "flex"
const OpenAIResponseServiceTierScale OpenAIResponseServiceTier = "scale"
const OpenAIResponseServiceTierPriority OpenAIResponseServiceTier = "priority"
Status OpenAIResponseStatusOptional
One of the following:
const OpenAIResponseStatusCompleted OpenAIResponseStatus = "completed"
const OpenAIResponseStatusFailed OpenAIResponseStatus = "failed"
const OpenAIResponseStatusInProgress OpenAIResponseStatus = "in_progress"
const OpenAIResponseStatusCancelled OpenAIResponseStatus = "cancelled"
const OpenAIResponseStatusQueued OpenAIResponseStatus = "queued"
const OpenAIResponseStatusIncomplete OpenAIResponseStatus = "incomplete"
Temperature float64Optional

Configuration options for a text response from the model.

Can be plain text or structured JSON data. Learn more:

Format OpenAIResponseTextConfigFormatUnionOptional

Default response format. Used to generate text responses.

One of the following:
type OpenAIResponseTextConfigFormatResponseFormatText struct{…}

Default response format. Used to generate text responses.

Type Text
type OpenAIResponseTextConfigFormatResponseFormatTextJsonSchemaConfig struct{…}

JSON Schema response format.

Used to generate structured JSON responses. Learn more about Structured Outputs.

Name string
Schema map[string, any]
Type JsonSchema
Description stringOptional
Strict boolOptional
type OpenAIResponseTextConfigFormatResponseFormatJsonObject struct{…}

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.

Type JsonObject
Verbosity OpenAIResponseTextConfigVerbosityOptional
One of the following:
const OpenAIResponseTextConfigVerbosityLow OpenAIResponseTextConfigVerbosity = "low"
const OpenAIResponseTextConfigVerbosityMedium OpenAIResponseTextConfigVerbosity = "medium"
const OpenAIResponseTextConfigVerbosityHigh OpenAIResponseTextConfigVerbosity = "high"
TopLogprobs int64Optional
TopP float64Optional
Truncation OpenAIResponseTruncationOptional
One of the following:
const OpenAIResponseTruncationAuto OpenAIResponseTruncation = "auto"
const OpenAIResponseTruncationDisabled OpenAIResponseTruncation = "disabled"
Usage OpenAIResponseUsageOptional

Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.

InputTokens int64
InputTokensDetails OpenAIResponseUsageInputTokensDetails

A detailed breakdown of the input tokens.

CachedTokens int64
OutputTokens int64
OutputTokensDetails OpenAIResponseUsageOutputTokensDetails

A detailed breakdown of the output tokens.

ReasoningTokens int64
TotalTokens int64
User stringOptional
SequenceNumber int64
Type ResponseInProgress
type ResponseNewResponseResponseFailedEvent struct{…}

An event that is emitted when a response fails.

ID string
CreatedAt float64
Model OpenAIResponseModel
One of the following:
type OpenAIResponseModel string
One of the following:
const OpenAIResponseModelGpt5_2 OpenAIResponseModel = "gpt-5.2"
const OpenAIResponseModelGpt5_2_2025_12_11 OpenAIResponseModel = "gpt-5.2-2025-12-11"
const OpenAIResponseModelGpt5_2ChatLatest OpenAIResponseModel = "gpt-5.2-chat-latest"
const OpenAIResponseModelGpt5_2Pro OpenAIResponseModel = "gpt-5.2-pro"
const OpenAIResponseModelGpt5_2Pro2025_12_11 OpenAIResponseModel = "gpt-5.2-pro-2025-12-11"
const OpenAIResponseModelGpt5_1 OpenAIResponseModel = "gpt-5.1"
const OpenAIResponseModelGpt5_1_2025_11_13 OpenAIResponseModel = "gpt-5.1-2025-11-13"
const OpenAIResponseModelGpt5_1Codex OpenAIResponseModel = "gpt-5.1-codex"
const OpenAIResponseModelGpt5_1Mini OpenAIResponseModel = "gpt-5.1-mini"
const OpenAIResponseModelGpt5_1ChatLatest OpenAIResponseModel = "gpt-5.1-chat-latest"
const OpenAIResponseModelGpt5 OpenAIResponseModel = "gpt-5"
const OpenAIResponseModelGpt5Mini OpenAIResponseModel = "gpt-5-mini"
const OpenAIResponseModelGpt5Nano OpenAIResponseModel = "gpt-5-nano"
const OpenAIResponseModelGpt5_2025_08_07 OpenAIResponseModel = "gpt-5-2025-08-07"
const OpenAIResponseModelGpt5Mini2025_08_07 OpenAIResponseModel = "gpt-5-mini-2025-08-07"
const OpenAIResponseModelGpt5Nano2025_08_07 OpenAIResponseModel = "gpt-5-nano-2025-08-07"
const OpenAIResponseModelGpt5ChatLatest OpenAIResponseModel = "gpt-5-chat-latest"
const OpenAIResponseModelGpt4_1 OpenAIResponseModel = "gpt-4.1"
const OpenAIResponseModelGpt4_1Mini OpenAIResponseModel = "gpt-4.1-mini"
const OpenAIResponseModelGpt4_1Nano OpenAIResponseModel = "gpt-4.1-nano"
const OpenAIResponseModelGpt4_1_2025_04_14 OpenAIResponseModel = "gpt-4.1-2025-04-14"
const OpenAIResponseModelGpt4_1Mini2025_04_14 OpenAIResponseModel = "gpt-4.1-mini-2025-04-14"
const OpenAIResponseModelGpt4_1Nano2025_04_14 OpenAIResponseModel = "gpt-4.1-nano-2025-04-14"
const OpenAIResponseModelO4Mini OpenAIResponseModel = "o4-mini"
const OpenAIResponseModelO4Mini2025_04_16 OpenAIResponseModel = "o4-mini-2025-04-16"
const OpenAIResponseModelO3 OpenAIResponseModel = "o3"
const OpenAIResponseModelO3_2025_04_16 OpenAIResponseModel = "o3-2025-04-16"
const OpenAIResponseModelO3Mini OpenAIResponseModel = "o3-mini"
const OpenAIResponseModelO3Mini2025_01_31 OpenAIResponseModel = "o3-mini-2025-01-31"
const OpenAIResponseModelO1 OpenAIResponseModel = "o1"
const OpenAIResponseModelO1_2024_12_17 OpenAIResponseModel = "o1-2024-12-17"
const OpenAIResponseModelO1Preview OpenAIResponseModel = "o1-preview"
const OpenAIResponseModelO1Preview2024_09_12 OpenAIResponseModel = "o1-preview-2024-09-12"
const OpenAIResponseModelO1Mini OpenAIResponseModel = "o1-mini"
const OpenAIResponseModelO1Mini2024_09_12 OpenAIResponseModel = "o1-mini-2024-09-12"
const OpenAIResponseModelGpt4o OpenAIResponseModel = "gpt-4o"
const OpenAIResponseModelGpt4o2024_11_20 OpenAIResponseModel = "gpt-4o-2024-11-20"
const OpenAIResponseModelGpt4o2024_08_06 OpenAIResponseModel = "gpt-4o-2024-08-06"
const OpenAIResponseModelGpt4o2024_05_13 OpenAIResponseModel = "gpt-4o-2024-05-13"
const OpenAIResponseModelGpt4oAudioPreview OpenAIResponseModel = "gpt-4o-audio-preview"
const OpenAIResponseModelGpt4oAudioPreview2024_10_01 OpenAIResponseModel = "gpt-4o-audio-preview-2024-10-01"
const OpenAIResponseModelGpt4oAudioPreview2024_12_17 OpenAIResponseModel = "gpt-4o-audio-preview-2024-12-17"
const OpenAIResponseModelGpt4oAudioPreview2025_06_03 OpenAIResponseModel = "gpt-4o-audio-preview-2025-06-03"
const OpenAIResponseModelGpt4oMiniAudioPreview OpenAIResponseModel = "gpt-4o-mini-audio-preview"
const OpenAIResponseModelGpt4oMiniAudioPreview2024_12_17 OpenAIResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"
const OpenAIResponseModelGpt4oSearchPreview OpenAIResponseModel = "gpt-4o-search-preview"
const OpenAIResponseModelGpt4oMiniSearchPreview OpenAIResponseModel = "gpt-4o-mini-search-preview"
const OpenAIResponseModelGpt4oSearchPreview2025_03_11 OpenAIResponseModel = "gpt-4o-search-preview-2025-03-11"
const OpenAIResponseModelGpt4oMiniSearchPreview2025_03_11 OpenAIResponseModel = "gpt-4o-mini-search-preview-2025-03-11"
const OpenAIResponseModelChatgpt4oLatest OpenAIResponseModel = "chatgpt-4o-latest"
const OpenAIResponseModelCodexMiniLatest OpenAIResponseModel = "codex-mini-latest"
const OpenAIResponseModelGpt4oMini OpenAIResponseModel = "gpt-4o-mini"
const OpenAIResponseModelGpt4oMini2024_07_18 OpenAIResponseModel = "gpt-4o-mini-2024-07-18"
const OpenAIResponseModelGpt4Turbo OpenAIResponseModel = "gpt-4-turbo"
const OpenAIResponseModelGpt4Turbo2024_04_09 OpenAIResponseModel = "gpt-4-turbo-2024-04-09"
const OpenAIResponseModelGpt4_0125Preview OpenAIResponseModel = "gpt-4-0125-preview"
const OpenAIResponseModelGpt4TurboPreview OpenAIResponseModel = "gpt-4-turbo-preview"
const OpenAIResponseModelGpt4_1106Preview OpenAIResponseModel = "gpt-4-1106-preview"
const OpenAIResponseModelGpt4VisionPreview OpenAIResponseModel = "gpt-4-vision-preview"
const OpenAIResponseModelGpt4 OpenAIResponseModel = "gpt-4"
const OpenAIResponseModelGpt4_0314 OpenAIResponseModel = "gpt-4-0314"
const OpenAIResponseModelGpt4_0613 OpenAIResponseModel = "gpt-4-0613"
const OpenAIResponseModelGpt4_32k OpenAIResponseModel = "gpt-4-32k"
const OpenAIResponseModelGpt4_32k0314 OpenAIResponseModel = "gpt-4-32k-0314"
const OpenAIResponseModelGpt4_32k0613 OpenAIResponseModel = "gpt-4-32k-0613"
const OpenAIResponseModelGpt3_5Turbo OpenAIResponseModel = "gpt-3.5-turbo"
const OpenAIResponseModelGpt3_5Turbo16k OpenAIResponseModel = "gpt-3.5-turbo-16k"
const OpenAIResponseModelGpt3_5Turbo0301 OpenAIResponseModel = "gpt-3.5-turbo-0301"
const OpenAIResponseModelGpt3_5Turbo0613 OpenAIResponseModel = "gpt-3.5-turbo-0613"
const OpenAIResponseModelGpt3_5Turbo1106 OpenAIResponseModel = "gpt-3.5-turbo-1106"
const OpenAIResponseModelGpt3_5Turbo0125 OpenAIResponseModel = "gpt-3.5-turbo-0125"
const OpenAIResponseModelGpt3_5Turbo16k0613 OpenAIResponseModel = "gpt-3.5-turbo-16k-0613"
const OpenAIResponseModelO1Pro OpenAIResponseModel = "o1-pro"
const OpenAIResponseModelO1Pro2025_03_19 OpenAIResponseModel = "o1-pro-2025-03-19"
const OpenAIResponseModelO3Pro OpenAIResponseModel = "o3-pro"
const OpenAIResponseModelO3Pro2025_06_10 OpenAIResponseModel = "o3-pro-2025-06-10"
const OpenAIResponseModelO3DeepResearch OpenAIResponseModel = "o3-deep-research"
const OpenAIResponseModelO3DeepResearch2025_06_26 OpenAIResponseModel = "o3-deep-research-2025-06-26"
const OpenAIResponseModelO4MiniDeepResearch OpenAIResponseModel = "o4-mini-deep-research"
const OpenAIResponseModelO4MiniDeepResearch2025_06_26 OpenAIResponseModel = "o4-mini-deep-research-2025-06-26"
const OpenAIResponseModelComputerUsePreview OpenAIResponseModel = "computer-use-preview"
const OpenAIResponseModelComputerUsePreview2025_03_11 OpenAIResponseModel = "computer-use-preview-2025-03-11"
const OpenAIResponseModelGpt5Codex OpenAIResponseModel = "gpt-5-codex"
const OpenAIResponseModelGpt5Pro OpenAIResponseModel = "gpt-5-pro"
const OpenAIResponseModelGpt5Pro2025_10_06 OpenAIResponseModel = "gpt-5-pro-2025-10-06"
const OpenAIResponseModelGpt5_1CodexMax OpenAIResponseModel = "gpt-5.1-codex-max"
string
Object Response
Output []OpenAIResponseOutputUnion
One of the following:
type OpenAIResponseOutputMessage struct{…}

An output message from the model.

ID string
Content []OpenAIResponseOutputMessageContentUnion
One of the following:
type OpenAIResponseOutputText struct{…}

A text output from the model.

Annotations []OpenAIResponseOutputTextAnnotationUnion
One of the following:
type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []OpenAIResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type OpenAIResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string
Type Refusal
Role Assistant
Status OpenAIResponseOutputMessageStatus
One of the following:
const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"
const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"
const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"
Type Message
Phase OpenAIResponseOutputMessagePhaseOptional
One of the following:
const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"
const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"
type OpenAIResponseFileSearchToolCall struct{…}

The results of a file search tool call.

See the file search guide for more information.

ID string
Queries []string
Status OpenAIResponseFileSearchToolCallStatus
One of the following:
const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"
const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"
const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"
const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"
const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"
Type FileSearchCall
Results []OpenAIResponseFileSearchToolCallResultOptional
Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]Optional
One of the following:
string
float64
bool
FileID stringOptional
Filename stringOptional
Score float64Optional
Text stringOptional
type OpenAIResponseFunctionToolCall struct{…}

A tool call to run a function.

See the function calling guide for more information.

Arguments string
CallID string
Name string
Type FunctionCall
ID stringOptional
Status OpenAIResponseFunctionToolCallStatusOptional
One of the following:
const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"
const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"
const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"
One of the following:
One of the following:
type OpenAIResponseComputerToolCall struct{…}

A tool call to a computer use tool.

See the computer use guide for more information.

ID string
Action OpenAIResponseComputerToolCallActionUnion

A click action.

One of the following:
type OpenAIResponseComputerToolCallActionActionClick struct{…}

A click action.

Button string
One of the following:
const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"
const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"
const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"
const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"
const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"
Type Click
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}

A double click action.

Type DoubleClick
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDrag struct{…}

A drag action.

Path []OpenAIResponseComputerToolCallActionActionDragPath
X int64
Y int64
Type Drag
type OpenAIResponseComputerToolCallActionActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string
Type Keypress
type OpenAIResponseComputerToolCallActionActionMove struct{…}

A mouse move action.

Type Move
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}

A screenshot action.

Type Screenshot
type OpenAIResponseComputerToolCallActionActionScroll struct{…}

A scroll action.

ScrollX int64
ScrollY int64
Type Scroll
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionType struct{…}

An action to type in text.

Text string
Type Type
type OpenAIResponseComputerToolCallActionActionWait struct{…}

A wait action.

Type Wait
CallID string
PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck
ID string
Code stringOptional
Message stringOptional
Status OpenAIResponseComputerToolCallStatus
One of the following:
const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"
const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"
const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"
Type ComputerCall
type OpenAIResponseReasoningItem struct{…}

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.

ID string
Summary []OpenAIResponseReasoningItemSummary
Text string
Type SummaryText
Type Reasoning
Content []OpenAIResponseReasoningItemContentOptional
Text string
Type ReasoningText
EncryptedContent stringOptional
Status OpenAIResponseReasoningItemStatusOptional
One of the following:
const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"
const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"
const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"
type ResponseCompactionItem struct{…}

A compaction item generated by the v1/responses/compact API.

ID string
EncryptedContent string
Type Compaction
CreatedBy stringOptional
type OpenAITypesResponsesResponseOutputItemImageGenerationCall struct{…}

An image generation request made by the model.

ID string
Status OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus
One of the following:
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "generating"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "failed"
Type ImageGenerationCall
Result stringOptional
type OpenAIResponseCodeInterpreterToolCall struct{…}

A tool call to run code.

ID string
ContainerID string
Status OpenAIResponseCodeInterpreterToolCallStatus
One of the following:
const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"
const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"
const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"
const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"
const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"
Type CodeInterpreterCall
Code stringOptional
Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnionOptional
One of the following:
type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}

The logs output from the code interpreter.

Logs string
Type Logs
type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}

The image output from the code interpreter.

Type Image
URL string
type OpenAITypesResponsesResponseOutputItemLocalShellCall struct{…}

A tool call to run a command on the local shell.

ID string
Action OpenAITypesResponsesResponseOutputItemLocalShellCallAction

Execute a shell command on the server.

Command []string
Env map[string, string]
Type Exec
TimeoutMs int64Optional
User stringOptional
WorkingDirectory stringOptional
CallID string
Status OpenAITypesResponsesResponseOutputItemLocalShellCallStatus
One of the following:
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "incomplete"
Type LocalShellCall
type ResponseFunctionShellToolCall struct{…}

A tool call that executes one or more shell commands in a managed environment.

ID string
Action ResponseFunctionShellToolCallAction

The shell commands and limits that describe how to run the tool call.

Commands []string
MaxOutputLength int64Optional
TimeoutMs int64Optional
CallID string
Status ResponseFunctionShellToolCallStatus
One of the following:
const ResponseFunctionShellToolCallStatusInProgress ResponseFunctionShellToolCallStatus = "in_progress"
const ResponseFunctionShellToolCallStatusCompleted ResponseFunctionShellToolCallStatus = "completed"
const ResponseFunctionShellToolCallStatusIncomplete ResponseFunctionShellToolCallStatus = "incomplete"
Type ShellCall
CreatedBy stringOptional
Environment ResponseFunctionShellToolCallEnvironmentUnionOptional

Represents the use of a local environment to perform shell actions.

One of the following:
type ResponseFunctionShellToolCallEnvironmentResponseLocalEnvironment struct{…}

Represents the use of a local environment to perform shell actions.

Type Local
type ResponseFunctionShellToolCallEnvironmentResponseContainerReference struct{…}

Represents a container created with /v1/containers.

ContainerID string
Type ContainerReference
type ResponseFunctionShellToolCallOutput struct{…}

The output of a shell tool call that was emitted.

ID string
CallID string
Output []ResponseFunctionShellToolCallOutputOutput
Outcome ResponseFunctionShellToolCallOutputOutputOutcomeUnion

Indicates that the shell call exceeded its configured time limit.

One of the following:
type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeTimeout struct{…}

Indicates that the shell call exceeded its configured time limit.

Type Timeout
type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeExit struct{…}

Indicates that the shell commands finished and returned an exit code.

ExitCode int64
Type Exit
Stderr string
Stdout string
CreatedBy stringOptional
Status ResponseFunctionShellToolCallOutputStatus
One of the following:
const ResponseFunctionShellToolCallOutputStatusInProgress ResponseFunctionShellToolCallOutputStatus = "in_progress"
const ResponseFunctionShellToolCallOutputStatusCompleted ResponseFunctionShellToolCallOutputStatus = "completed"
const ResponseFunctionShellToolCallOutputStatusIncomplete ResponseFunctionShellToolCallOutputStatus = "incomplete"
Type ShellCallOutput
CreatedBy stringOptional
MaxOutputLength int64Optional
type ResponseApplyPatchToolCall struct{…}

A tool call that applies file diffs by creating, deleting, or updating files.

ID string
CallID string
Operation ResponseApplyPatchToolCallOperationUnion

Instruction describing how to create a file via the apply_patch tool.

One of the following:
type ResponseApplyPatchToolCallOperationOperationCreateFile struct{…}

Instruction describing how to create a file via the apply_patch tool.

Diff string
Path string
Type CreateFile
type ResponseApplyPatchToolCallOperationOperationDeleteFile struct{…}

Instruction describing how to delete a file via the apply_patch tool.

Path string
Type DeleteFile
type ResponseApplyPatchToolCallOperationOperationUpdateFile struct{…}

Instruction describing how to update a file via the apply_patch tool.

Diff string
Path string
Type UpdateFile
Status ResponseApplyPatchToolCallStatus
One of the following:
const ResponseApplyPatchToolCallStatusInProgress ResponseApplyPatchToolCallStatus = "in_progress"
const ResponseApplyPatchToolCallStatusCompleted ResponseApplyPatchToolCallStatus = "completed"
Type ApplyPatchCall
CreatedBy stringOptional
type ResponseApplyPatchToolCallOutput struct{…}

The output emitted by an apply patch tool call.

ID string
CallID string
Status ResponseApplyPatchToolCallOutputStatus
One of the following:
const ResponseApplyPatchToolCallOutputStatusCompleted ResponseApplyPatchToolCallOutputStatus = "completed"
const ResponseApplyPatchToolCallOutputStatusFailed ResponseApplyPatchToolCallOutputStatus = "failed"
Type ApplyPatchCallOutput
CreatedBy stringOptional
Output stringOptional
type OpenAITypesResponsesResponseOutputItemMcpCall struct{…}

An invocation of a tool on an MCP server.

ID string
Arguments string
Name string
ServerLabel string
Type McpCall
ApprovalRequestID stringOptional
Error stringOptional
Output stringOptional
Status OpenAITypesResponsesResponseOutputItemMcpCallStatusOptional
One of the following:
const OpenAITypesResponsesResponseOutputItemMcpCallStatusInProgress OpenAITypesResponsesResponseOutputItemMcpCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusCompleted OpenAITypesResponsesResponseOutputItemMcpCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseOutputItemMcpCallStatus = "incomplete"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusCalling OpenAITypesResponsesResponseOutputItemMcpCallStatus = "calling"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusFailed OpenAITypesResponsesResponseOutputItemMcpCallStatus = "failed"
type OpenAITypesResponsesResponseOutputItemMcpListTools struct{…}

A list of tools available on an MCP server.

ID string
ServerLabel string
Tools []OpenAITypesResponsesResponseOutputItemMcpListToolsTool
InputSchema any
Name string
Annotations anyOptional
Description stringOptional
Type McpListTools
Error stringOptional
type McpApprovalRequest struct{…}

A request for human approval of a tool invocation.

ID string
Arguments string
Name string
ServerLabel string
Type McpApprovalRequest
type OpenAIResponseCustomToolCall struct{…}

A call to a custom tool created by the model.

CallID string
Input string
Name string
Type CustomToolCall
ID stringOptional
ParallelToolCalls bool
ToolChoice OpenAIResponseToolChoiceUnion

Constrains the tools available to the model to a pre-defined set.

One of the following:
type OpenAIResponseToolChoiceString string
One of the following:
const OpenAIResponseToolChoiceStringNone OpenAIResponseToolChoiceString = "none"
const OpenAIResponseToolChoiceStringAuto OpenAIResponseToolChoiceString = "auto"
const OpenAIResponseToolChoiceStringRequired OpenAIResponseToolChoiceString = "required"
type ToolChoiceAllowed struct{…}

Constrains the tools available to the model to a pre-defined set.

Mode ToolChoiceAllowedMode
One of the following:
const ToolChoiceAllowedModeAuto ToolChoiceAllowedMode = "auto"
const ToolChoiceAllowedModeRequired ToolChoiceAllowedMode = "required"
Tools []map[string, any]
Type AllowedTools
type ToolChoiceTypes struct{…}

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

Type ToolChoiceTypesType
One of the following:
const ToolChoiceTypesTypeFileSearch ToolChoiceTypesType = "file_search"
const ToolChoiceTypesTypeWebSearchPreview ToolChoiceTypesType = "web_search_preview"
const ToolChoiceTypesTypeComputerUsePreview ToolChoiceTypesType = "computer_use_preview"
const ToolChoiceTypesTypeWebSearchPreview2025_03_11 ToolChoiceTypesType = "web_search_preview_2025_03_11"
const ToolChoiceTypesTypeImageGeneration ToolChoiceTypesType = "image_generation"
const ToolChoiceTypesTypeCodeInterpreter ToolChoiceTypesType = "code_interpreter"
type ToolChoiceFunction struct{…}

Use this option to force the model to call a specific function.

Name string
Type Function
type ToolChoiceMcp struct{…}

Use this option to force the model to call a specific tool on a remote MCP server.

ServerLabel string
Type Mcp
Name stringOptional
type ToolChoiceCustom struct{…}

Use this option to force the model to call a specific custom tool.

Name string
Type Custom
type ToolChoiceApplyPatch struct{…}

Forces the model to call the apply_patch tool when executing a tool call.

Type ApplyPatch
type ToolChoiceShell struct{…}

Forces the model to call the shell tool when a tool call is required.

Type Shell
Tools []OpenAIResponseToolUnion
One of the following:
type FunctionTool struct{…}

Defines a function in your own code the model can choose to call.

Learn more about function calling.

Name string
Type Function
Description stringOptional
Parameters map[string, any]Optional
Strict boolOptional
type FileSearchTool struct{…}

A tool that searches for relevant content from uploaded files.

Learn more about the file search tool.

Type FileSearch
VectorStoreIDs []string
Filters FileSearchToolFiltersUnionOptional

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

One of the following:
type FileSearchToolFiltersComparisonFilter struct{…}

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

Key string
Type string
One of the following:
const FileSearchToolFiltersComparisonFilterTypeEq FileSearchToolFiltersComparisonFilterType = "eq"
const FileSearchToolFiltersComparisonFilterTypeNe FileSearchToolFiltersComparisonFilterType = "ne"
const FileSearchToolFiltersComparisonFilterTypeGt FileSearchToolFiltersComparisonFilterType = "gt"
const FileSearchToolFiltersComparisonFilterTypeGte FileSearchToolFiltersComparisonFilterType = "gte"
const FileSearchToolFiltersComparisonFilterTypeLt FileSearchToolFiltersComparisonFilterType = "lt"
const FileSearchToolFiltersComparisonFilterTypeLte FileSearchToolFiltersComparisonFilterType = "lte"
Value FileSearchToolFiltersComparisonFilterValueUnion
One of the following:
string
float64
bool
type FileSearchToolFiltersComparisonFilterValueArray []FileSearchToolFiltersComparisonFilterValueArrayItemUnion
One of the following:
string
float64
type FileSearchToolFiltersCompoundFilter struct{…}

Combine multiple filters using and or or.

Filters []FileSearchToolFiltersCompoundFilterFilter
One of the following:
type FileSearchToolFiltersCompoundFilterFilter struct{…}

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

Key string
Type string
One of the following:
const FileSearchToolFiltersCompoundFilterFilterTypeEq FileSearchToolFiltersCompoundFilterFilterType = "eq"
const FileSearchToolFiltersCompoundFilterFilterTypeNe FileSearchToolFiltersCompoundFilterFilterType = "ne"
const FileSearchToolFiltersCompoundFilterFilterTypeGt FileSearchToolFiltersCompoundFilterFilterType = "gt"
const FileSearchToolFiltersCompoundFilterFilterTypeGte FileSearchToolFiltersCompoundFilterFilterType = "gte"
const FileSearchToolFiltersCompoundFilterFilterTypeLt FileSearchToolFiltersCompoundFilterFilterType = "lt"
const FileSearchToolFiltersCompoundFilterFilterTypeLte FileSearchToolFiltersCompoundFilterFilterType = "lte"
Value FileSearchToolFiltersCompoundFilterFilterValueUnion
One of the following:
string
float64
bool
type FileSearchToolFiltersCompoundFilterFilterValueArray []FileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion
One of the following:
string
float64
Type string
One of the following:
const FileSearchToolFiltersCompoundFilterTypeAnd FileSearchToolFiltersCompoundFilterType = "and"
const FileSearchToolFiltersCompoundFilterTypeOr FileSearchToolFiltersCompoundFilterType = "or"
MaxNumResults int64Optional
RankingOptions FileSearchToolRankingOptionsOptional

Ranking options for search.

Ranker stringOptional
One of the following:
const FileSearchToolRankingOptionsRankerAuto FileSearchToolRankingOptionsRanker = "auto"
const FileSearchToolRankingOptionsRankerDefault2024_11_15 FileSearchToolRankingOptionsRanker = "default-2024-11-15"
ScoreThreshold float64Optional
type ComputerTool struct{…}

A tool that controls a virtual computer.

Learn more about the computer tool.

DisplayHeight int64
DisplayWidth int64
Environment ComputerToolEnvironment
One of the following:
const ComputerToolEnvironmentWindows ComputerToolEnvironment = "windows"
const ComputerToolEnvironmentMac ComputerToolEnvironment = "mac"
const ComputerToolEnvironmentLinux ComputerToolEnvironment = "linux"
const ComputerToolEnvironmentUbuntu ComputerToolEnvironment = "ubuntu"
const ComputerToolEnvironmentBrowser ComputerToolEnvironment = "browser"
Type ComputerUsePreview
type WebSearchTool struct{…}

Search the Internet for sources related to the prompt.

Learn more about the web search tool.

Type WebSearchToolType
One of the following:
const WebSearchToolTypeWebSearch WebSearchToolType = "web_search"
const WebSearchToolTypeWebSearch2025_08_26 WebSearchToolType = "web_search_2025_08_26"
Filters WebSearchToolFiltersOptional

Filters for the search.

AllowedDomains []stringOptional
SearchContextSize WebSearchToolSearchContextSizeOptional
One of the following:
const WebSearchToolSearchContextSizeLow WebSearchToolSearchContextSize = "low"
const WebSearchToolSearchContextSizeMedium WebSearchToolSearchContextSize = "medium"
const WebSearchToolSearchContextSizeHigh WebSearchToolSearchContextSize = "high"
UserLocation WebSearchToolUserLocationOptional

The approximate location of the user.

City stringOptional
Country stringOptional
Region stringOptional
Timezone stringOptional
Type stringOptional
type OpenAIResponseToolMcp struct{…}

Give the model access to additional tools via remote Model Context Protocol (MCP) servers. Learn more about MCP.

ServerLabel string
Type Mcp
AllowedTools OpenAIResponseToolMcpAllowedToolsUnionOptional

A filter object to specify which tools are allowed.

One of the following:
type OpenAIResponseToolMcpAllowedToolsArray []string
type OpenAIResponseToolMcpAllowedToolsMcpAllowedToolsMcpToolFilter struct{…}

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
Authorization stringOptional
ConnectorID stringOptional
One of the following:
const OpenAIResponseToolMcpConnectorIDConnectorDropbox OpenAIResponseToolMcpConnectorID = "connector_dropbox"
const OpenAIResponseToolMcpConnectorIDConnectorGmail OpenAIResponseToolMcpConnectorID = "connector_gmail"
const OpenAIResponseToolMcpConnectorIDConnectorGooglecalendar OpenAIResponseToolMcpConnectorID = "connector_googlecalendar"
const OpenAIResponseToolMcpConnectorIDConnectorGoogledrive OpenAIResponseToolMcpConnectorID = "connector_googledrive"
const OpenAIResponseToolMcpConnectorIDConnectorMicrosoftteams OpenAIResponseToolMcpConnectorID = "connector_microsoftteams"
const OpenAIResponseToolMcpConnectorIDConnectorOutlookcalendar OpenAIResponseToolMcpConnectorID = "connector_outlookcalendar"
const OpenAIResponseToolMcpConnectorIDConnectorOutlookemail OpenAIResponseToolMcpConnectorID = "connector_outlookemail"
const OpenAIResponseToolMcpConnectorIDConnectorSharepoint OpenAIResponseToolMcpConnectorID = "connector_sharepoint"
Headers map[string, string]Optional
RequireApproval OpenAIResponseToolMcpRequireApprovalUnionOptional

Specify which of the MCP server’s tools require approval.

Can be always, never, or a filter object associated with tools that require approval.

One of the following:
type OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilter struct{…}

Specify which of the MCP server’s tools require approval.

Can be always, never, or a filter object associated with tools that require approval.

Always OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilterAlwaysOptional

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
Never OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilterNeverOptional

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
type OpenAIResponseToolMcpRequireApprovalString string
One of the following:
const OpenAIResponseToolMcpRequireApprovalStringAlways OpenAIResponseToolMcpRequireApprovalString = "always"
const OpenAIResponseToolMcpRequireApprovalStringNever OpenAIResponseToolMcpRequireApprovalString = "never"
ServerDescription stringOptional
ServerURL stringOptional
type OpenAIResponseToolCodeInterpreter struct{…}

A tool that runs Python code to help generate a response to a prompt.

Container OpenAIResponseToolCodeInterpreterContainerUnion

Configuration for a code interpreter container.

Optionally specify the IDs of the files to run the code on.

One of the following:
string
type OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAuto struct{…}

Configuration for a code interpreter container.

Optionally specify the IDs of the files to run the code on.

Type Auto
FileIDs []stringOptional
MemoryLimit stringOptional
One of the following:
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"
NetworkPolicy OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnionOptional
One of the following:
type ContainerNetworkPolicyDisabled struct{…}
Type Disabled
type ContainerNetworkPolicyAllowlist struct{…}
AllowedDomains []string
Type Allowlist
DomainSecrets []ContainerNetworkPolicyAllowlistDomainSecretOptional
Domain string
Name string
Value string
Type CodeInterpreter
type OpenAIResponseToolImageGeneration struct{…}

A tool that generates images using the GPT image models.

Type ImageGeneration
Action stringOptional
One of the following:
const OpenAIResponseToolImageGenerationActionGenerate OpenAIResponseToolImageGenerationAction = "generate"
const OpenAIResponseToolImageGenerationActionEdit OpenAIResponseToolImageGenerationAction = "edit"
const OpenAIResponseToolImageGenerationActionAuto OpenAIResponseToolImageGenerationAction = "auto"
Background stringOptional
One of the following:
const OpenAIResponseToolImageGenerationBackgroundTransparent OpenAIResponseToolImageGenerationBackground = "transparent"
const OpenAIResponseToolImageGenerationBackgroundOpaque OpenAIResponseToolImageGenerationBackground = "opaque"
const OpenAIResponseToolImageGenerationBackgroundAuto OpenAIResponseToolImageGenerationBackground = "auto"
InputFidelity stringOptional
One of the following:
const OpenAIResponseToolImageGenerationInputFidelityHigh OpenAIResponseToolImageGenerationInputFidelity = "high"
const OpenAIResponseToolImageGenerationInputFidelityLow OpenAIResponseToolImageGenerationInputFidelity = "low"
InputImageMask OpenAIResponseToolImageGenerationInputImageMaskOptional

Optional mask for inpainting.

Contains image_url (string, optional) and file_id (string, optional).

FileID stringOptional
ImageURL stringOptional
Model stringOptional
One of the following:
string
string
One of the following:
const OpenAIResponseToolImageGenerationModelGptImage1 OpenAIResponseToolImageGenerationModel = "gpt-image-1"
const OpenAIResponseToolImageGenerationModelGptImage1Mini OpenAIResponseToolImageGenerationModel = "gpt-image-1-mini"
const OpenAIResponseToolImageGenerationModelGptImage1_5 OpenAIResponseToolImageGenerationModel = "gpt-image-1.5"
Moderation stringOptional
One of the following:
const OpenAIResponseToolImageGenerationModerationAuto OpenAIResponseToolImageGenerationModeration = "auto"
const OpenAIResponseToolImageGenerationModerationLow OpenAIResponseToolImageGenerationModeration = "low"
OutputCompression int64Optional
OutputFormat stringOptional
One of the following:
const OpenAIResponseToolImageGenerationOutputFormatPng OpenAIResponseToolImageGenerationOutputFormat = "png"
const OpenAIResponseToolImageGenerationOutputFormatWebp OpenAIResponseToolImageGenerationOutputFormat = "webp"
const OpenAIResponseToolImageGenerationOutputFormatJpeg OpenAIResponseToolImageGenerationOutputFormat = "jpeg"
PartialImages int64Optional
Quality stringOptional
One of the following:
const OpenAIResponseToolImageGenerationQualityLow OpenAIResponseToolImageGenerationQuality = "low"
const OpenAIResponseToolImageGenerationQualityMedium OpenAIResponseToolImageGenerationQuality = "medium"
const OpenAIResponseToolImageGenerationQualityHigh OpenAIResponseToolImageGenerationQuality = "high"
const OpenAIResponseToolImageGenerationQualityAuto OpenAIResponseToolImageGenerationQuality = "auto"
Size stringOptional
One of the following:
const OpenAIResponseToolImageGenerationSize1024x1024 OpenAIResponseToolImageGenerationSize = "1024x1024"
const OpenAIResponseToolImageGenerationSize1024x1536 OpenAIResponseToolImageGenerationSize = "1024x1536"
const OpenAIResponseToolImageGenerationSize1536x1024 OpenAIResponseToolImageGenerationSize = "1536x1024"
const OpenAIResponseToolImageGenerationSizeAuto OpenAIResponseToolImageGenerationSize = "auto"
type OpenAIResponseToolLocalShell struct{…}

A tool that allows the model to execute shell commands in a local environment.

Type LocalShell
type FunctionShellTool struct{…}

A tool that allows the model to execute shell commands.

Type Shell
Environment FunctionShellToolEnvironmentUnionOptional
One of the following:
type FunctionShellToolEnvironmentContainerAuto struct{…}
Type ContainerAuto
FileIDs []stringOptional
MemoryLimit stringOptional
One of the following:
const FunctionShellToolEnvironmentContainerAutoMemoryLimit1g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "1g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit4g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "4g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit16g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "16g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit64g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "64g"
NetworkPolicy FunctionShellToolEnvironmentContainerAutoNetworkPolicyUnionOptional
One of the following:
type ContainerNetworkPolicyDisabled struct{…}
Type Disabled
type ContainerNetworkPolicyAllowlist struct{…}
AllowedDomains []string
Type Allowlist
DomainSecrets []ContainerNetworkPolicyAllowlistDomainSecretOptional
Domain string
Name string
Value string
Skills []FunctionShellToolEnvironmentContainerAutoSkillUnionOptional
One of the following:
type FunctionShellToolEnvironmentContainerAutoSkillSkillReference struct{…}
SkillID string
Type SkillReference
Version stringOptional
type FunctionShellToolEnvironmentContainerAutoSkillInlineSkill struct{…}
Description string
Name string
Source FunctionShellToolEnvironmentContainerAutoSkillInlineSkillSource

Inline skill payload

Data string
MediaType ApplicationZip
Type Base64
Type Inline
type LocalEnvironment struct{…}
Type Local
Skills []LocalEnvironmentSkillOptional
Description string
Name string
Path string
type ContainerReference struct{…}
ContainerID string
Type ContainerReference
type CustomTool struct{…}

A custom tool that processes input using a specified format.

Learn more about custom tools

Name string
Type Custom
Description stringOptional
Format CustomToolFormatUnionOptional

Unconstrained free-form text.

One of the following:
type CustomToolFormatText struct{…}

Unconstrained free-form text.

Type Text
type CustomToolFormatGrammar struct{…}

A grammar defined by the user.

Definition string
Syntax string
One of the following:
const CustomToolFormatGrammarSyntaxLark CustomToolFormatGrammarSyntax = "lark"
const CustomToolFormatGrammarSyntaxRegex CustomToolFormatGrammarSyntax = "regex"
Type Grammar
type WebSearchPreviewTool struct{…}

This tool searches the web for relevant results to use in a response.

Learn more about the web search tool.

Type WebSearchPreviewToolType
One of the following:
const WebSearchPreviewToolTypeWebSearchPreview WebSearchPreviewToolType = "web_search_preview"
const WebSearchPreviewToolTypeWebSearchPreview2025_03_11 WebSearchPreviewToolType = "web_search_preview_2025_03_11"
SearchContextSize WebSearchPreviewToolSearchContextSizeOptional
One of the following:
const WebSearchPreviewToolSearchContextSizeLow WebSearchPreviewToolSearchContextSize = "low"
const WebSearchPreviewToolSearchContextSizeMedium WebSearchPreviewToolSearchContextSize = "medium"
const WebSearchPreviewToolSearchContextSizeHigh WebSearchPreviewToolSearchContextSize = "high"
UserLocation WebSearchPreviewToolUserLocationOptional

The user’s location.

Type Approximate
City stringOptional
Country stringOptional
Region stringOptional
Timezone stringOptional
type ApplyPatchTool struct{…}

Allows the assistant to create, delete, or update files using unified diffs.

Type ApplyPatch
Background boolOptional
CompletedAt float64Optional
Conversation ConversationOptional

The conversation that this response belonged to.

Input items and output items from this response were automatically added to this conversation.

ID string
Error OpenAIResponseErrorOptional

An error object returned when the model fails to generate a Response.

Code OpenAIResponseErrorCode
One of the following:
const OpenAIResponseErrorCodeServerError OpenAIResponseErrorCode = "server_error"
const OpenAIResponseErrorCodeRateLimitExceeded OpenAIResponseErrorCode = "rate_limit_exceeded"
const OpenAIResponseErrorCodeInvalidPrompt OpenAIResponseErrorCode = "invalid_prompt"
const OpenAIResponseErrorCodeVectorStoreTimeout OpenAIResponseErrorCode = "vector_store_timeout"
const OpenAIResponseErrorCodeInvalidImage OpenAIResponseErrorCode = "invalid_image"
const OpenAIResponseErrorCodeInvalidImageFormat OpenAIResponseErrorCode = "invalid_image_format"
const OpenAIResponseErrorCodeInvalidBase64Image OpenAIResponseErrorCode = "invalid_base64_image"
const OpenAIResponseErrorCodeInvalidImageURL OpenAIResponseErrorCode = "invalid_image_url"
const OpenAIResponseErrorCodeImageTooLarge OpenAIResponseErrorCode = "image_too_large"
const OpenAIResponseErrorCodeImageTooSmall OpenAIResponseErrorCode = "image_too_small"
const OpenAIResponseErrorCodeImageParseError OpenAIResponseErrorCode = "image_parse_error"
const OpenAIResponseErrorCodeImageContentPolicyViolation OpenAIResponseErrorCode = "image_content_policy_violation"
const OpenAIResponseErrorCodeInvalidImageMode OpenAIResponseErrorCode = "invalid_image_mode"
const OpenAIResponseErrorCodeImageFileTooLarge OpenAIResponseErrorCode = "image_file_too_large"
const OpenAIResponseErrorCodeUnsupportedImageMediaType OpenAIResponseErrorCode = "unsupported_image_media_type"
const OpenAIResponseErrorCodeEmptyImageFile OpenAIResponseErrorCode = "empty_image_file"
const OpenAIResponseErrorCodeFailedToDownloadImage OpenAIResponseErrorCode = "failed_to_download_image"
const OpenAIResponseErrorCodeImageFileNotFound OpenAIResponseErrorCode = "image_file_not_found"
Message string
IncompleteDetails IncompleteDetailsOptional

Details about why the response is incomplete.

Reason IncompleteDetailsReasonOptional
One of the following:
const IncompleteDetailsReasonMaxOutputTokens IncompleteDetailsReason = "max_output_tokens"
const IncompleteDetailsReasonContentFilter IncompleteDetailsReason = "content_filter"
Instructions OpenAIResponseInstructionsUnionOptional
One of the following:
string
type OpenAIResponseInstructionsInputItems []OpenAIResponseInstructionsInputItemUnion
One of the following:
type EasyInputMessage struct{…}

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 EasyInputMessageContentUnion
One of the following:
string
type EasyInputMessageContentInputItems []EasyInputMessageContentInputItemUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Role EasyInputMessageRole
One of the following:
const EasyInputMessageRoleUser EasyInputMessageRole = "user"
const EasyInputMessageRoleAssistant EasyInputMessageRole = "assistant"
const EasyInputMessageRoleSystem EasyInputMessageRole = "system"
const EasyInputMessageRoleDeveloper EasyInputMessageRole = "developer"
Phase EasyInputMessagePhaseOptional
One of the following:
const EasyInputMessagePhaseCommentary EasyInputMessagePhase = "commentary"
const EasyInputMessagePhaseFinalAnswer EasyInputMessagePhase = "final_answer"
Type EasyInputMessageTypeOptional
type OpenAITypesResponsesResponseInputItemMessage struct{…}

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 []OpenAITypesResponsesResponseInputItemMessageContentUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Role OpenAITypesResponsesResponseInputItemMessageRole
One of the following:
const OpenAITypesResponsesResponseInputItemMessageRoleUser OpenAITypesResponsesResponseInputItemMessageRole = "user"
const OpenAITypesResponsesResponseInputItemMessageRoleSystem OpenAITypesResponsesResponseInputItemMessageRole = "system"
const OpenAITypesResponsesResponseInputItemMessageRoleDeveloper OpenAITypesResponsesResponseInputItemMessageRole = "developer"
Status OpenAITypesResponsesResponseInputItemMessageStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemMessageStatusInProgress OpenAITypesResponsesResponseInputItemMessageStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemMessageStatusCompleted OpenAITypesResponsesResponseInputItemMessageStatus = "completed"
const OpenAITypesResponsesResponseInputItemMessageStatusIncomplete OpenAITypesResponsesResponseInputItemMessageStatus = "incomplete"
Type OpenAITypesResponsesResponseInputItemMessageTypeOptional
type OpenAIResponseOutputMessage struct{…}

An output message from the model.

ID string
Content []OpenAIResponseOutputMessageContentUnion
One of the following:
type OpenAIResponseOutputText struct{…}

A text output from the model.

Annotations []OpenAIResponseOutputTextAnnotationUnion
One of the following:
type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []OpenAIResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type OpenAIResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string
Type Refusal
Role Assistant
Status OpenAIResponseOutputMessageStatus
One of the following:
const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"
const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"
const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"
Type Message
Phase OpenAIResponseOutputMessagePhaseOptional
One of the following:
const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"
const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"
type OpenAIResponseFileSearchToolCall struct{…}

The results of a file search tool call.

See the file search guide for more information.

ID string
Queries []string
Status OpenAIResponseFileSearchToolCallStatus
One of the following:
const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"
const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"
const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"
const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"
const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"
Type FileSearchCall
Results []OpenAIResponseFileSearchToolCallResultOptional
Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]Optional
One of the following:
string
float64
bool
FileID stringOptional
Filename stringOptional
Score float64Optional
Text stringOptional
type OpenAIResponseComputerToolCall struct{…}

A tool call to a computer use tool.

See the computer use guide for more information.

ID string
Action OpenAIResponseComputerToolCallActionUnion

A click action.

One of the following:
type OpenAIResponseComputerToolCallActionActionClick struct{…}

A click action.

Button string
One of the following:
const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"
const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"
const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"
const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"
const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"
Type Click
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}

A double click action.

Type DoubleClick
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDrag struct{…}

A drag action.

Path []OpenAIResponseComputerToolCallActionActionDragPath
X int64
Y int64
Type Drag
type OpenAIResponseComputerToolCallActionActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string
Type Keypress
type OpenAIResponseComputerToolCallActionActionMove struct{…}

A mouse move action.

Type Move
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}

A screenshot action.

Type Screenshot
type OpenAIResponseComputerToolCallActionActionScroll struct{…}

A scroll action.

ScrollX int64
ScrollY int64
Type Scroll
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionType struct{…}

An action to type in text.

Text string
Type Type
type OpenAIResponseComputerToolCallActionActionWait struct{…}

A wait action.

Type Wait
CallID string
PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck
ID string
Code stringOptional
Message stringOptional
Status OpenAIResponseComputerToolCallStatus
One of the following:
const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"
const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"
const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"
Type ComputerCall
type OpenAITypesResponsesResponseInputItemComputerCallOutput struct{…}

The output of a computer tool call.

CallID string

A computer screenshot image used with the computer use tool.

Type ComputerScreenshot
FileID stringOptional
ImageURL stringOptional
Type ComputerCallOutput
ID stringOptional
AcknowledgedSafetyChecks []OpenAITypesResponsesResponseInputItemComputerCallOutputAcknowledgedSafetyCheckOptional
ID string
Code stringOptional
Message stringOptional
Status OpenAITypesResponsesResponseInputItemComputerCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "incomplete"
One of the following:
One of the following:
type OpenAIResponseFunctionToolCall struct{…}

A tool call to run a function.

See the function calling guide for more information.

Arguments string
CallID string
Name string
Type FunctionCall
ID stringOptional
Status OpenAIResponseFunctionToolCallStatusOptional
One of the following:
const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"
const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"
const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"
type OpenAITypesResponsesResponseInputItemFunctionCallOutput struct{…}

The output of a function tool call.

CallID string
Output OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputUnion
One of the following:
string
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentList []OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemUnion
One of the following:
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputTextContent struct{…}

A text input to the model.

Text string
Type InputText
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContent struct{…}

An image input to the model.

Learn about image inputs

Type InputImage
Detail stringOptional
One of the following:
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailLow OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "low"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailHigh OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "high"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailAuto OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "auto"
FileID stringOptional
ImageURL stringOptional
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputFileContent struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Type FunctionCallOutput
ID stringOptional
Status OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "incomplete"
type OpenAIResponseReasoningItem struct{…}

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.

ID string
Summary []OpenAIResponseReasoningItemSummary
Text string
Type SummaryText
Type Reasoning
Content []OpenAIResponseReasoningItemContentOptional
Text string
Type ReasoningText
EncryptedContent stringOptional
Status OpenAIResponseReasoningItemStatusOptional
One of the following:
const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"
const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"
const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"
type ResponseCompactionItemParamResp struct{…}

A compaction item generated by the v1/responses/compact API.

EncryptedContent string
Type Compaction
ID stringOptional
type OpenAITypesResponsesResponseInputItemImageGenerationCall struct{…}

An image generation request made by the model.

ID string
Status OpenAITypesResponsesResponseInputItemImageGenerationCallStatus
One of the following:
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "generating"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "failed"
Type ImageGenerationCall
Result stringOptional
type OpenAIResponseCodeInterpreterToolCall struct{…}

A tool call to run code.

ID string
ContainerID string
Status OpenAIResponseCodeInterpreterToolCallStatus
One of the following:
const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"
const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"
const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"
const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"
const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"
Type CodeInterpreterCall
Code stringOptional
Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnionOptional
One of the following:
type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}

The logs output from the code interpreter.

Logs string
Type Logs
type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}

The image output from the code interpreter.

Type Image
URL string
type OpenAITypesResponsesResponseInputItemLocalShellCall struct{…}

A tool call to run a command on the local shell.

ID string
Action OpenAITypesResponsesResponseInputItemLocalShellCallAction

Execute a shell command on the server.

Command []string
Env map[string, string]
Type Exec
TimeoutMs int64Optional
User stringOptional
WorkingDirectory stringOptional
CallID string
Status OpenAITypesResponsesResponseInputItemLocalShellCallStatus
One of the following:
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "incomplete"
Type LocalShellCall
type OpenAITypesResponsesResponseInputItemLocalShellCallOutput struct{…}

The output of a local shell tool call.

ID string
Output string
Type LocalShellCallOutput
Status OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "incomplete"
type ShellCall struct{…}

A tool representing a request to execute one or more shell commands.

Action ShellCallAction

The shell commands and limits that describe how to run the tool call.

Commands []string
MaxOutputLength int64Optional
TimeoutMs int64Optional
CallID string
Type ShellCall
ID stringOptional
Environment ShellCallEnvironmentUnionOptional
One of the following:
type LocalEnvironment struct{…}
Type Local
Skills []LocalEnvironmentSkillOptional
Description string
Name string
Path string
type ContainerReference struct{…}
ContainerID string
Type ContainerReference
Status ShellCallStatusOptional
One of the following:
const ShellCallStatusInProgress ShellCallStatus = "in_progress"
const ShellCallStatusCompleted ShellCallStatus = "completed"
const ShellCallStatusIncomplete ShellCallStatus = "incomplete"
type ShellCallOutput struct{…}

The streamed output items emitted by a shell tool call.

CallID string
Output []ShellCallOutputOutput
Outcome ShellCallOutputOutputOutcomeUnion

Indicates that the shell call exceeded its configured time limit.

One of the following:
type ShellCallOutputOutputOutcomeOutcomeTimeout struct{…}

Indicates that the shell call exceeded its configured time limit.

Type Timeout
type ShellCallOutputOutputOutcomeOutcomeExit struct{…}

Indicates that the shell commands finished and returned an exit code.

ExitCode int64
Type Exit
Stderr string
Stdout string
Type ShellCallOutput
ID stringOptional
MaxOutputLength int64Optional
Status ShellCallOutputStatusOptional
One of the following:
const ShellCallOutputStatusInProgress ShellCallOutputStatus = "in_progress"
const ShellCallOutputStatusCompleted ShellCallOutputStatus = "completed"
const ShellCallOutputStatusIncomplete ShellCallOutputStatus = "incomplete"
type ApplyPatchCall struct{…}

A tool call representing a request to create, delete, or update files using diff patches.

CallID string
Operation ApplyPatchCallOperationUnion

Instruction for creating a new file via the apply_patch tool.

One of the following:
type ApplyPatchCallOperationApplyPatchCallOperationCreateFile struct{…}

Instruction for creating a new file via the apply_patch tool.

Diff string
Path string
Type CreateFile
type ApplyPatchCallOperationApplyPatchCallOperationDeleteFile struct{…}

Instruction for deleting an existing file via the apply_patch tool.

Path string
Type DeleteFile
type ApplyPatchCallOperationApplyPatchCallOperationUpdateFile struct{…}

Instruction for updating an existing file via the apply_patch tool.

Diff string
Path string
Type UpdateFile
Status ApplyPatchCallStatus
One of the following:
const ApplyPatchCallStatusInProgress ApplyPatchCallStatus = "in_progress"
const ApplyPatchCallStatusCompleted ApplyPatchCallStatus = "completed"
Type ApplyPatchCall
ID stringOptional
type ApplyPatchCallOutput struct{…}

The streamed output emitted by an apply patch tool call.

CallID string
Status ApplyPatchCallOutputStatus
One of the following:
const ApplyPatchCallOutputStatusCompleted ApplyPatchCallOutputStatus = "completed"
const ApplyPatchCallOutputStatusFailed ApplyPatchCallOutputStatus = "failed"
Type ApplyPatchCallOutput
ID stringOptional
Output stringOptional
type OpenAITypesResponsesResponseInputItemMcpListTools struct{…}

A list of tools available on an MCP server.

ID string
ServerLabel string
Tools []OpenAITypesResponsesResponseInputItemMcpListToolsTool
InputSchema any
Name string
Annotations anyOptional
Description stringOptional
Type McpListTools
Error stringOptional
type McpApprovalRequest struct{…}

A request for human approval of a tool invocation.

ID string
Arguments string
Name string
ServerLabel string
Type McpApprovalRequest
type OpenAITypesResponsesResponseInputItemMcpApprovalResponse struct{…}

A response to an MCP approval request.

ApprovalRequestID string
Approve bool
Type McpApprovalResponse
ID stringOptional
Reason stringOptional
type OpenAITypesResponsesResponseInputItemMcpCall struct{…}

An invocation of a tool on an MCP server.

ID string
Arguments string
Name string
ServerLabel string
Type McpCall
ApprovalRequestID stringOptional
Error stringOptional
Output stringOptional
Status OpenAITypesResponsesResponseInputItemMcpCallStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemMcpCallStatusInProgress OpenAITypesResponsesResponseInputItemMcpCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemMcpCallStatusCompleted OpenAITypesResponsesResponseInputItemMcpCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseInputItemMcpCallStatus = "incomplete"
const OpenAITypesResponsesResponseInputItemMcpCallStatusCalling OpenAITypesResponsesResponseInputItemMcpCallStatus = "calling"
const OpenAITypesResponsesResponseInputItemMcpCallStatusFailed OpenAITypesResponsesResponseInputItemMcpCallStatus = "failed"
type OpenAIResponseCustomToolCallOutput struct{…}

The output of a custom tool call from your code, being sent back to the model.

CallID string
Output OpenAIResponseCustomToolCallOutputOutputUnion
One of the following:
string
type OpenAIResponseCustomToolCallOutputOutputOutputContentList []OpenAIResponseCustomToolCallOutputOutputOutputContentListItemUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Type CustomToolCallOutput
ID stringOptional
type OpenAIResponseCustomToolCall struct{…}

A call to a custom tool created by the model.

CallID string
Input string
Name string
Type CustomToolCall
ID stringOptional
type OpenAITypesResponsesResponseInputItemItemReference struct{…}

An internal identifier for an item to reference.

ID string
Type OpenAITypesResponsesResponseInputItemItemReferenceTypeOptional
MaxOutputTokens int64Optional
MaxToolCalls int64Optional
Metadata map[string, string]Optional
PreviousResponseID stringOptional
Prompt OpenAIResponsePromptOptional

Reference to a prompt template and its variables. Learn more.

ID string
Variables map[string, OpenAIResponsePromptVariableUnion]Optional
One of the following:
string
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Version stringOptional
PromptCacheKey stringOptional
PromptCacheRetention OpenAIResponsePromptCacheRetentionOptional
One of the following:
const OpenAIResponsePromptCacheRetentionInMemory OpenAIResponsePromptCacheRetention = "in-memory"
const OpenAIResponsePromptCacheRetention24h OpenAIResponsePromptCacheRetention = "24h"
Reasoning ReasoningOptional

gpt-5 and o-series models only

Configuration options for reasoning models.

Effort ReasoningEffortOptional
One of the following:
const ReasoningEffortNone ReasoningEffort = "none"
const ReasoningEffortMinimal ReasoningEffort = "minimal"
const ReasoningEffortLow ReasoningEffort = "low"
const ReasoningEffortMedium ReasoningEffort = "medium"
const ReasoningEffortHigh ReasoningEffort = "high"
const ReasoningEffortXhigh ReasoningEffort = "xhigh"
GenerateSummary ReasoningGenerateSummaryOptional
One of the following:
const ReasoningGenerateSummaryAuto ReasoningGenerateSummary = "auto"
const ReasoningGenerateSummaryConcise ReasoningGenerateSummary = "concise"
const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"
Summary ReasoningSummaryOptional
One of the following:
const ReasoningSummaryAuto ReasoningSummary = "auto"
const ReasoningSummaryConcise ReasoningSummary = "concise"
const ReasoningSummaryDetailed ReasoningSummary = "detailed"
SafetyIdentifier stringOptional
ServiceTier OpenAIResponseServiceTierOptional
One of the following:
const OpenAIResponseServiceTierAuto OpenAIResponseServiceTier = "auto"
const OpenAIResponseServiceTierDefault OpenAIResponseServiceTier = "default"
const OpenAIResponseServiceTierFlex OpenAIResponseServiceTier = "flex"
const OpenAIResponseServiceTierScale OpenAIResponseServiceTier = "scale"
const OpenAIResponseServiceTierPriority OpenAIResponseServiceTier = "priority"
Status OpenAIResponseStatusOptional
One of the following:
const OpenAIResponseStatusCompleted OpenAIResponseStatus = "completed"
const OpenAIResponseStatusFailed OpenAIResponseStatus = "failed"
const OpenAIResponseStatusInProgress OpenAIResponseStatus = "in_progress"
const OpenAIResponseStatusCancelled OpenAIResponseStatus = "cancelled"
const OpenAIResponseStatusQueued OpenAIResponseStatus = "queued"
const OpenAIResponseStatusIncomplete OpenAIResponseStatus = "incomplete"
Temperature float64Optional

Configuration options for a text response from the model.

Can be plain text or structured JSON data. Learn more:

Format OpenAIResponseTextConfigFormatUnionOptional

Default response format. Used to generate text responses.

One of the following:
type OpenAIResponseTextConfigFormatResponseFormatText struct{…}

Default response format. Used to generate text responses.

Type Text
type OpenAIResponseTextConfigFormatResponseFormatTextJsonSchemaConfig struct{…}

JSON Schema response format.

Used to generate structured JSON responses. Learn more about Structured Outputs.

Name string
Schema map[string, any]
Type JsonSchema
Description stringOptional
Strict boolOptional
type OpenAIResponseTextConfigFormatResponseFormatJsonObject struct{…}

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.

Type JsonObject
Verbosity OpenAIResponseTextConfigVerbosityOptional
One of the following:
const OpenAIResponseTextConfigVerbosityLow OpenAIResponseTextConfigVerbosity = "low"
const OpenAIResponseTextConfigVerbosityMedium OpenAIResponseTextConfigVerbosity = "medium"
const OpenAIResponseTextConfigVerbosityHigh OpenAIResponseTextConfigVerbosity = "high"
TopLogprobs int64Optional
TopP float64Optional
Truncation OpenAIResponseTruncationOptional
One of the following:
const OpenAIResponseTruncationAuto OpenAIResponseTruncation = "auto"
const OpenAIResponseTruncationDisabled OpenAIResponseTruncation = "disabled"
Usage OpenAIResponseUsageOptional

Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.

InputTokens int64
InputTokensDetails OpenAIResponseUsageInputTokensDetails

A detailed breakdown of the input tokens.

CachedTokens int64
OutputTokens int64
OutputTokensDetails OpenAIResponseUsageOutputTokensDetails

A detailed breakdown of the output tokens.

ReasoningTokens int64
TotalTokens int64
User stringOptional
SequenceNumber int64
Type ResponseFailed
type ResponseNewResponseResponseIncompleteEvent struct{…}

An event that is emitted when a response finishes as incomplete.

ID string
CreatedAt float64
Model OpenAIResponseModel
One of the following:
type OpenAIResponseModel string
One of the following:
const OpenAIResponseModelGpt5_2 OpenAIResponseModel = "gpt-5.2"
const OpenAIResponseModelGpt5_2_2025_12_11 OpenAIResponseModel = "gpt-5.2-2025-12-11"
const OpenAIResponseModelGpt5_2ChatLatest OpenAIResponseModel = "gpt-5.2-chat-latest"
const OpenAIResponseModelGpt5_2Pro OpenAIResponseModel = "gpt-5.2-pro"
const OpenAIResponseModelGpt5_2Pro2025_12_11 OpenAIResponseModel = "gpt-5.2-pro-2025-12-11"
const OpenAIResponseModelGpt5_1 OpenAIResponseModel = "gpt-5.1"
const OpenAIResponseModelGpt5_1_2025_11_13 OpenAIResponseModel = "gpt-5.1-2025-11-13"
const OpenAIResponseModelGpt5_1Codex OpenAIResponseModel = "gpt-5.1-codex"
const OpenAIResponseModelGpt5_1Mini OpenAIResponseModel = "gpt-5.1-mini"
const OpenAIResponseModelGpt5_1ChatLatest OpenAIResponseModel = "gpt-5.1-chat-latest"
const OpenAIResponseModelGpt5 OpenAIResponseModel = "gpt-5"
const OpenAIResponseModelGpt5Mini OpenAIResponseModel = "gpt-5-mini"
const OpenAIResponseModelGpt5Nano OpenAIResponseModel = "gpt-5-nano"
const OpenAIResponseModelGpt5_2025_08_07 OpenAIResponseModel = "gpt-5-2025-08-07"
const OpenAIResponseModelGpt5Mini2025_08_07 OpenAIResponseModel = "gpt-5-mini-2025-08-07"
const OpenAIResponseModelGpt5Nano2025_08_07 OpenAIResponseModel = "gpt-5-nano-2025-08-07"
const OpenAIResponseModelGpt5ChatLatest OpenAIResponseModel = "gpt-5-chat-latest"
const OpenAIResponseModelGpt4_1 OpenAIResponseModel = "gpt-4.1"
const OpenAIResponseModelGpt4_1Mini OpenAIResponseModel = "gpt-4.1-mini"
const OpenAIResponseModelGpt4_1Nano OpenAIResponseModel = "gpt-4.1-nano"
const OpenAIResponseModelGpt4_1_2025_04_14 OpenAIResponseModel = "gpt-4.1-2025-04-14"
const OpenAIResponseModelGpt4_1Mini2025_04_14 OpenAIResponseModel = "gpt-4.1-mini-2025-04-14"
const OpenAIResponseModelGpt4_1Nano2025_04_14 OpenAIResponseModel = "gpt-4.1-nano-2025-04-14"
const OpenAIResponseModelO4Mini OpenAIResponseModel = "o4-mini"
const OpenAIResponseModelO4Mini2025_04_16 OpenAIResponseModel = "o4-mini-2025-04-16"
const OpenAIResponseModelO3 OpenAIResponseModel = "o3"
const OpenAIResponseModelO3_2025_04_16 OpenAIResponseModel = "o3-2025-04-16"
const OpenAIResponseModelO3Mini OpenAIResponseModel = "o3-mini"
const OpenAIResponseModelO3Mini2025_01_31 OpenAIResponseModel = "o3-mini-2025-01-31"
const OpenAIResponseModelO1 OpenAIResponseModel = "o1"
const OpenAIResponseModelO1_2024_12_17 OpenAIResponseModel = "o1-2024-12-17"
const OpenAIResponseModelO1Preview OpenAIResponseModel = "o1-preview"
const OpenAIResponseModelO1Preview2024_09_12 OpenAIResponseModel = "o1-preview-2024-09-12"
const OpenAIResponseModelO1Mini OpenAIResponseModel = "o1-mini"
const OpenAIResponseModelO1Mini2024_09_12 OpenAIResponseModel = "o1-mini-2024-09-12"
const OpenAIResponseModelGpt4o OpenAIResponseModel = "gpt-4o"
const OpenAIResponseModelGpt4o2024_11_20 OpenAIResponseModel = "gpt-4o-2024-11-20"
const OpenAIResponseModelGpt4o2024_08_06 OpenAIResponseModel = "gpt-4o-2024-08-06"
const OpenAIResponseModelGpt4o2024_05_13 OpenAIResponseModel = "gpt-4o-2024-05-13"
const OpenAIResponseModelGpt4oAudioPreview OpenAIResponseModel = "gpt-4o-audio-preview"
const OpenAIResponseModelGpt4oAudioPreview2024_10_01 OpenAIResponseModel = "gpt-4o-audio-preview-2024-10-01"
const OpenAIResponseModelGpt4oAudioPreview2024_12_17 OpenAIResponseModel = "gpt-4o-audio-preview-2024-12-17"
const OpenAIResponseModelGpt4oAudioPreview2025_06_03 OpenAIResponseModel = "gpt-4o-audio-preview-2025-06-03"
const OpenAIResponseModelGpt4oMiniAudioPreview OpenAIResponseModel = "gpt-4o-mini-audio-preview"
const OpenAIResponseModelGpt4oMiniAudioPreview2024_12_17 OpenAIResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"
const OpenAIResponseModelGpt4oSearchPreview OpenAIResponseModel = "gpt-4o-search-preview"
const OpenAIResponseModelGpt4oMiniSearchPreview OpenAIResponseModel = "gpt-4o-mini-search-preview"
const OpenAIResponseModelGpt4oSearchPreview2025_03_11 OpenAIResponseModel = "gpt-4o-search-preview-2025-03-11"
const OpenAIResponseModelGpt4oMiniSearchPreview2025_03_11 OpenAIResponseModel = "gpt-4o-mini-search-preview-2025-03-11"
const OpenAIResponseModelChatgpt4oLatest OpenAIResponseModel = "chatgpt-4o-latest"
const OpenAIResponseModelCodexMiniLatest OpenAIResponseModel = "codex-mini-latest"
const OpenAIResponseModelGpt4oMini OpenAIResponseModel = "gpt-4o-mini"
const OpenAIResponseModelGpt4oMini2024_07_18 OpenAIResponseModel = "gpt-4o-mini-2024-07-18"
const OpenAIResponseModelGpt4Turbo OpenAIResponseModel = "gpt-4-turbo"
const OpenAIResponseModelGpt4Turbo2024_04_09 OpenAIResponseModel = "gpt-4-turbo-2024-04-09"
const OpenAIResponseModelGpt4_0125Preview OpenAIResponseModel = "gpt-4-0125-preview"
const OpenAIResponseModelGpt4TurboPreview OpenAIResponseModel = "gpt-4-turbo-preview"
const OpenAIResponseModelGpt4_1106Preview OpenAIResponseModel = "gpt-4-1106-preview"
const OpenAIResponseModelGpt4VisionPreview OpenAIResponseModel = "gpt-4-vision-preview"
const OpenAIResponseModelGpt4 OpenAIResponseModel = "gpt-4"
const OpenAIResponseModelGpt4_0314 OpenAIResponseModel = "gpt-4-0314"
const OpenAIResponseModelGpt4_0613 OpenAIResponseModel = "gpt-4-0613"
const OpenAIResponseModelGpt4_32k OpenAIResponseModel = "gpt-4-32k"
const OpenAIResponseModelGpt4_32k0314 OpenAIResponseModel = "gpt-4-32k-0314"
const OpenAIResponseModelGpt4_32k0613 OpenAIResponseModel = "gpt-4-32k-0613"
const OpenAIResponseModelGpt3_5Turbo OpenAIResponseModel = "gpt-3.5-turbo"
const OpenAIResponseModelGpt3_5Turbo16k OpenAIResponseModel = "gpt-3.5-turbo-16k"
const OpenAIResponseModelGpt3_5Turbo0301 OpenAIResponseModel = "gpt-3.5-turbo-0301"
const OpenAIResponseModelGpt3_5Turbo0613 OpenAIResponseModel = "gpt-3.5-turbo-0613"
const OpenAIResponseModelGpt3_5Turbo1106 OpenAIResponseModel = "gpt-3.5-turbo-1106"
const OpenAIResponseModelGpt3_5Turbo0125 OpenAIResponseModel = "gpt-3.5-turbo-0125"
const OpenAIResponseModelGpt3_5Turbo16k0613 OpenAIResponseModel = "gpt-3.5-turbo-16k-0613"
const OpenAIResponseModelO1Pro OpenAIResponseModel = "o1-pro"
const OpenAIResponseModelO1Pro2025_03_19 OpenAIResponseModel = "o1-pro-2025-03-19"
const OpenAIResponseModelO3Pro OpenAIResponseModel = "o3-pro"
const OpenAIResponseModelO3Pro2025_06_10 OpenAIResponseModel = "o3-pro-2025-06-10"
const OpenAIResponseModelO3DeepResearch OpenAIResponseModel = "o3-deep-research"
const OpenAIResponseModelO3DeepResearch2025_06_26 OpenAIResponseModel = "o3-deep-research-2025-06-26"
const OpenAIResponseModelO4MiniDeepResearch OpenAIResponseModel = "o4-mini-deep-research"
const OpenAIResponseModelO4MiniDeepResearch2025_06_26 OpenAIResponseModel = "o4-mini-deep-research-2025-06-26"
const OpenAIResponseModelComputerUsePreview OpenAIResponseModel = "computer-use-preview"
const OpenAIResponseModelComputerUsePreview2025_03_11 OpenAIResponseModel = "computer-use-preview-2025-03-11"
const OpenAIResponseModelGpt5Codex OpenAIResponseModel = "gpt-5-codex"
const OpenAIResponseModelGpt5Pro OpenAIResponseModel = "gpt-5-pro"
const OpenAIResponseModelGpt5Pro2025_10_06 OpenAIResponseModel = "gpt-5-pro-2025-10-06"
const OpenAIResponseModelGpt5_1CodexMax OpenAIResponseModel = "gpt-5.1-codex-max"
string
Object Response
Output []OpenAIResponseOutputUnion
One of the following:
type OpenAIResponseOutputMessage struct{…}

An output message from the model.

ID string
Content []OpenAIResponseOutputMessageContentUnion
One of the following:
type OpenAIResponseOutputText struct{…}

A text output from the model.

Annotations []OpenAIResponseOutputTextAnnotationUnion
One of the following:
type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []OpenAIResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type OpenAIResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string
Type Refusal
Role Assistant
Status OpenAIResponseOutputMessageStatus
One of the following:
const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"
const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"
const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"
Type Message
Phase OpenAIResponseOutputMessagePhaseOptional
One of the following:
const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"
const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"
type OpenAIResponseFileSearchToolCall struct{…}

The results of a file search tool call.

See the file search guide for more information.

ID string
Queries []string
Status OpenAIResponseFileSearchToolCallStatus
One of the following:
const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"
const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"
const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"
const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"
const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"
Type FileSearchCall
Results []OpenAIResponseFileSearchToolCallResultOptional
Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]Optional
One of the following:
string
float64
bool
FileID stringOptional
Filename stringOptional
Score float64Optional
Text stringOptional
type OpenAIResponseFunctionToolCall struct{…}

A tool call to run a function.

See the function calling guide for more information.

Arguments string
CallID string
Name string
Type FunctionCall
ID stringOptional
Status OpenAIResponseFunctionToolCallStatusOptional
One of the following:
const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"
const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"
const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"
One of the following:
One of the following:
type OpenAIResponseComputerToolCall struct{…}

A tool call to a computer use tool.

See the computer use guide for more information.

ID string
Action OpenAIResponseComputerToolCallActionUnion

A click action.

One of the following:
type OpenAIResponseComputerToolCallActionActionClick struct{…}

A click action.

Button string
One of the following:
const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"
const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"
const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"
const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"
const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"
Type Click
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}

A double click action.

Type DoubleClick
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDrag struct{…}

A drag action.

Path []OpenAIResponseComputerToolCallActionActionDragPath
X int64
Y int64
Type Drag
type OpenAIResponseComputerToolCallActionActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string
Type Keypress
type OpenAIResponseComputerToolCallActionActionMove struct{…}

A mouse move action.

Type Move
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}

A screenshot action.

Type Screenshot
type OpenAIResponseComputerToolCallActionActionScroll struct{…}

A scroll action.

ScrollX int64
ScrollY int64
Type Scroll
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionType struct{…}

An action to type in text.

Text string
Type Type
type OpenAIResponseComputerToolCallActionActionWait struct{…}

A wait action.

Type Wait
CallID string
PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck
ID string
Code stringOptional
Message stringOptional
Status OpenAIResponseComputerToolCallStatus
One of the following:
const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"
const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"
const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"
Type ComputerCall
type OpenAIResponseReasoningItem struct{…}

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.

ID string
Summary []OpenAIResponseReasoningItemSummary
Text string
Type SummaryText
Type Reasoning
Content []OpenAIResponseReasoningItemContentOptional
Text string
Type ReasoningText
EncryptedContent stringOptional
Status OpenAIResponseReasoningItemStatusOptional
One of the following:
const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"
const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"
const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"
type ResponseCompactionItem struct{…}

A compaction item generated by the v1/responses/compact API.

ID string
EncryptedContent string
Type Compaction
CreatedBy stringOptional
type OpenAITypesResponsesResponseOutputItemImageGenerationCall struct{…}

An image generation request made by the model.

ID string
Status OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus
One of the following:
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "generating"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "failed"
Type ImageGenerationCall
Result stringOptional
type OpenAIResponseCodeInterpreterToolCall struct{…}

A tool call to run code.

ID string
ContainerID string
Status OpenAIResponseCodeInterpreterToolCallStatus
One of the following:
const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"
const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"
const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"
const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"
const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"
Type CodeInterpreterCall
Code stringOptional
Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnionOptional
One of the following:
type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}

The logs output from the code interpreter.

Logs string
Type Logs
type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}

The image output from the code interpreter.

Type Image
URL string
type OpenAITypesResponsesResponseOutputItemLocalShellCall struct{…}

A tool call to run a command on the local shell.

ID string
Action OpenAITypesResponsesResponseOutputItemLocalShellCallAction

Execute a shell command on the server.

Command []string
Env map[string, string]
Type Exec
TimeoutMs int64Optional
User stringOptional
WorkingDirectory stringOptional
CallID string
Status OpenAITypesResponsesResponseOutputItemLocalShellCallStatus
One of the following:
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "incomplete"
Type LocalShellCall
type ResponseFunctionShellToolCall struct{…}

A tool call that executes one or more shell commands in a managed environment.

ID string
Action ResponseFunctionShellToolCallAction

The shell commands and limits that describe how to run the tool call.

Commands []string
MaxOutputLength int64Optional
TimeoutMs int64Optional
CallID string
Status ResponseFunctionShellToolCallStatus
One of the following:
const ResponseFunctionShellToolCallStatusInProgress ResponseFunctionShellToolCallStatus = "in_progress"
const ResponseFunctionShellToolCallStatusCompleted ResponseFunctionShellToolCallStatus = "completed"
const ResponseFunctionShellToolCallStatusIncomplete ResponseFunctionShellToolCallStatus = "incomplete"
Type ShellCall
CreatedBy stringOptional
Environment ResponseFunctionShellToolCallEnvironmentUnionOptional

Represents the use of a local environment to perform shell actions.

One of the following:
type ResponseFunctionShellToolCallEnvironmentResponseLocalEnvironment struct{…}

Represents the use of a local environment to perform shell actions.

Type Local
type ResponseFunctionShellToolCallEnvironmentResponseContainerReference struct{…}

Represents a container created with /v1/containers.

ContainerID string
Type ContainerReference
type ResponseFunctionShellToolCallOutput struct{…}

The output of a shell tool call that was emitted.

ID string
CallID string
Output []ResponseFunctionShellToolCallOutputOutput
Outcome ResponseFunctionShellToolCallOutputOutputOutcomeUnion

Indicates that the shell call exceeded its configured time limit.

One of the following:
type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeTimeout struct{…}

Indicates that the shell call exceeded its configured time limit.

Type Timeout
type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeExit struct{…}

Indicates that the shell commands finished and returned an exit code.

ExitCode int64
Type Exit
Stderr string
Stdout string
CreatedBy stringOptional
Status ResponseFunctionShellToolCallOutputStatus
One of the following:
const ResponseFunctionShellToolCallOutputStatusInProgress ResponseFunctionShellToolCallOutputStatus = "in_progress"
const ResponseFunctionShellToolCallOutputStatusCompleted ResponseFunctionShellToolCallOutputStatus = "completed"
const ResponseFunctionShellToolCallOutputStatusIncomplete ResponseFunctionShellToolCallOutputStatus = "incomplete"
Type ShellCallOutput
CreatedBy stringOptional
MaxOutputLength int64Optional
type ResponseApplyPatchToolCall struct{…}

A tool call that applies file diffs by creating, deleting, or updating files.

ID string
CallID string
Operation ResponseApplyPatchToolCallOperationUnion

Instruction describing how to create a file via the apply_patch tool.

One of the following:
type ResponseApplyPatchToolCallOperationOperationCreateFile struct{…}

Instruction describing how to create a file via the apply_patch tool.

Diff string
Path string
Type CreateFile
type ResponseApplyPatchToolCallOperationOperationDeleteFile struct{…}

Instruction describing how to delete a file via the apply_patch tool.

Path string
Type DeleteFile
type ResponseApplyPatchToolCallOperationOperationUpdateFile struct{…}

Instruction describing how to update a file via the apply_patch tool.

Diff string
Path string
Type UpdateFile
Status ResponseApplyPatchToolCallStatus
One of the following:
const ResponseApplyPatchToolCallStatusInProgress ResponseApplyPatchToolCallStatus = "in_progress"
const ResponseApplyPatchToolCallStatusCompleted ResponseApplyPatchToolCallStatus = "completed"
Type ApplyPatchCall
CreatedBy stringOptional
type ResponseApplyPatchToolCallOutput struct{…}

The output emitted by an apply patch tool call.

ID string
CallID string
Status ResponseApplyPatchToolCallOutputStatus
One of the following:
const ResponseApplyPatchToolCallOutputStatusCompleted ResponseApplyPatchToolCallOutputStatus = "completed"
const ResponseApplyPatchToolCallOutputStatusFailed ResponseApplyPatchToolCallOutputStatus = "failed"
Type ApplyPatchCallOutput
CreatedBy stringOptional
Output stringOptional
type OpenAITypesResponsesResponseOutputItemMcpCall struct{…}

An invocation of a tool on an MCP server.

ID string
Arguments string
Name string
ServerLabel string
Type McpCall
ApprovalRequestID stringOptional
Error stringOptional
Output stringOptional
Status OpenAITypesResponsesResponseOutputItemMcpCallStatusOptional
One of the following:
const OpenAITypesResponsesResponseOutputItemMcpCallStatusInProgress OpenAITypesResponsesResponseOutputItemMcpCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusCompleted OpenAITypesResponsesResponseOutputItemMcpCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseOutputItemMcpCallStatus = "incomplete"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusCalling OpenAITypesResponsesResponseOutputItemMcpCallStatus = "calling"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusFailed OpenAITypesResponsesResponseOutputItemMcpCallStatus = "failed"
type OpenAITypesResponsesResponseOutputItemMcpListTools struct{…}

A list of tools available on an MCP server.

ID string
ServerLabel string
Tools []OpenAITypesResponsesResponseOutputItemMcpListToolsTool
InputSchema any
Name string
Annotations anyOptional
Description stringOptional
Type McpListTools
Error stringOptional
type McpApprovalRequest struct{…}

A request for human approval of a tool invocation.

ID string
Arguments string
Name string
ServerLabel string
Type McpApprovalRequest
type OpenAIResponseCustomToolCall struct{…}

A call to a custom tool created by the model.

CallID string
Input string
Name string
Type CustomToolCall
ID stringOptional
ParallelToolCalls bool
ToolChoice OpenAIResponseToolChoiceUnion

Constrains the tools available to the model to a pre-defined set.

One of the following:
type OpenAIResponseToolChoiceString string
One of the following:
const OpenAIResponseToolChoiceStringNone OpenAIResponseToolChoiceString = "none"
const OpenAIResponseToolChoiceStringAuto OpenAIResponseToolChoiceString = "auto"
const OpenAIResponseToolChoiceStringRequired OpenAIResponseToolChoiceString = "required"
type ToolChoiceAllowed struct{…}

Constrains the tools available to the model to a pre-defined set.

Mode ToolChoiceAllowedMode
One of the following:
const ToolChoiceAllowedModeAuto ToolChoiceAllowedMode = "auto"
const ToolChoiceAllowedModeRequired ToolChoiceAllowedMode = "required"
Tools []map[string, any]
Type AllowedTools
type ToolChoiceTypes struct{…}

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

Type ToolChoiceTypesType
One of the following:
const ToolChoiceTypesTypeFileSearch ToolChoiceTypesType = "file_search"
const ToolChoiceTypesTypeWebSearchPreview ToolChoiceTypesType = "web_search_preview"
const ToolChoiceTypesTypeComputerUsePreview ToolChoiceTypesType = "computer_use_preview"
const ToolChoiceTypesTypeWebSearchPreview2025_03_11 ToolChoiceTypesType = "web_search_preview_2025_03_11"
const ToolChoiceTypesTypeImageGeneration ToolChoiceTypesType = "image_generation"
const ToolChoiceTypesTypeCodeInterpreter ToolChoiceTypesType = "code_interpreter"
type ToolChoiceFunction struct{…}

Use this option to force the model to call a specific function.

Name string
Type Function
type ToolChoiceMcp struct{…}

Use this option to force the model to call a specific tool on a remote MCP server.

ServerLabel string
Type Mcp
Name stringOptional
type ToolChoiceCustom struct{…}

Use this option to force the model to call a specific custom tool.

Name string
Type Custom
type ToolChoiceApplyPatch struct{…}

Forces the model to call the apply_patch tool when executing a tool call.

Type ApplyPatch
type ToolChoiceShell struct{…}

Forces the model to call the shell tool when a tool call is required.

Type Shell
Tools []OpenAIResponseToolUnion
One of the following:
type FunctionTool struct{…}

Defines a function in your own code the model can choose to call.

Learn more about function calling.

Name string
Type Function
Description stringOptional
Parameters map[string, any]Optional
Strict boolOptional
type FileSearchTool struct{…}

A tool that searches for relevant content from uploaded files.

Learn more about the file search tool.

Type FileSearch
VectorStoreIDs []string
Filters FileSearchToolFiltersUnionOptional

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

One of the following:
type FileSearchToolFiltersComparisonFilter struct{…}

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

Key string
Type string
One of the following:
const FileSearchToolFiltersComparisonFilterTypeEq FileSearchToolFiltersComparisonFilterType = "eq"
const FileSearchToolFiltersComparisonFilterTypeNe FileSearchToolFiltersComparisonFilterType = "ne"
const FileSearchToolFiltersComparisonFilterTypeGt FileSearchToolFiltersComparisonFilterType = "gt"
const FileSearchToolFiltersComparisonFilterTypeGte FileSearchToolFiltersComparisonFilterType = "gte"
const FileSearchToolFiltersComparisonFilterTypeLt FileSearchToolFiltersComparisonFilterType = "lt"
const FileSearchToolFiltersComparisonFilterTypeLte FileSearchToolFiltersComparisonFilterType = "lte"
Value FileSearchToolFiltersComparisonFilterValueUnion
One of the following:
string
float64
bool
type FileSearchToolFiltersComparisonFilterValueArray []FileSearchToolFiltersComparisonFilterValueArrayItemUnion
One of the following:
string
float64
type FileSearchToolFiltersCompoundFilter struct{…}

Combine multiple filters using and or or.

Filters []FileSearchToolFiltersCompoundFilterFilter
One of the following:
type FileSearchToolFiltersCompoundFilterFilter struct{…}

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

Key string
Type string
One of the following:
const FileSearchToolFiltersCompoundFilterFilterTypeEq FileSearchToolFiltersCompoundFilterFilterType = "eq"
const FileSearchToolFiltersCompoundFilterFilterTypeNe FileSearchToolFiltersCompoundFilterFilterType = "ne"
const FileSearchToolFiltersCompoundFilterFilterTypeGt FileSearchToolFiltersCompoundFilterFilterType = "gt"
const FileSearchToolFiltersCompoundFilterFilterTypeGte FileSearchToolFiltersCompoundFilterFilterType = "gte"
const FileSearchToolFiltersCompoundFilterFilterTypeLt FileSearchToolFiltersCompoundFilterFilterType = "lt"
const FileSearchToolFiltersCompoundFilterFilterTypeLte FileSearchToolFiltersCompoundFilterFilterType = "lte"
Value FileSearchToolFiltersCompoundFilterFilterValueUnion
One of the following:
string
float64
bool
type FileSearchToolFiltersCompoundFilterFilterValueArray []FileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion
One of the following:
string
float64
Type string
One of the following:
const FileSearchToolFiltersCompoundFilterTypeAnd FileSearchToolFiltersCompoundFilterType = "and"
const FileSearchToolFiltersCompoundFilterTypeOr FileSearchToolFiltersCompoundFilterType = "or"
MaxNumResults int64Optional
RankingOptions FileSearchToolRankingOptionsOptional

Ranking options for search.

Ranker stringOptional
One of the following:
const FileSearchToolRankingOptionsRankerAuto FileSearchToolRankingOptionsRanker = "auto"
const FileSearchToolRankingOptionsRankerDefault2024_11_15 FileSearchToolRankingOptionsRanker = "default-2024-11-15"
ScoreThreshold float64Optional
type ComputerTool struct{…}

A tool that controls a virtual computer.

Learn more about the computer tool.

DisplayHeight int64
DisplayWidth int64
Environment ComputerToolEnvironment
One of the following:
const ComputerToolEnvironmentWindows ComputerToolEnvironment = "windows"
const ComputerToolEnvironmentMac ComputerToolEnvironment = "mac"
const ComputerToolEnvironmentLinux ComputerToolEnvironment = "linux"
const ComputerToolEnvironmentUbuntu ComputerToolEnvironment = "ubuntu"
const ComputerToolEnvironmentBrowser ComputerToolEnvironment = "browser"
Type ComputerUsePreview
type WebSearchTool struct{…}

Search the Internet for sources related to the prompt.

Learn more about the web search tool.

Type WebSearchToolType
One of the following:
const WebSearchToolTypeWebSearch WebSearchToolType = "web_search"
const WebSearchToolTypeWebSearch2025_08_26 WebSearchToolType = "web_search_2025_08_26"
Filters WebSearchToolFiltersOptional

Filters for the search.

AllowedDomains []stringOptional
SearchContextSize WebSearchToolSearchContextSizeOptional
One of the following:
const WebSearchToolSearchContextSizeLow WebSearchToolSearchContextSize = "low"
const WebSearchToolSearchContextSizeMedium WebSearchToolSearchContextSize = "medium"
const WebSearchToolSearchContextSizeHigh WebSearchToolSearchContextSize = "high"
UserLocation WebSearchToolUserLocationOptional

The approximate location of the user.

City stringOptional
Country stringOptional
Region stringOptional
Timezone stringOptional
Type stringOptional
type OpenAIResponseToolMcp struct{…}

Give the model access to additional tools via remote Model Context Protocol (MCP) servers. Learn more about MCP.

ServerLabel string
Type Mcp
AllowedTools OpenAIResponseToolMcpAllowedToolsUnionOptional

A filter object to specify which tools are allowed.

One of the following:
type OpenAIResponseToolMcpAllowedToolsArray []string
type OpenAIResponseToolMcpAllowedToolsMcpAllowedToolsMcpToolFilter struct{…}

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
Authorization stringOptional
ConnectorID stringOptional
One of the following:
const OpenAIResponseToolMcpConnectorIDConnectorDropbox OpenAIResponseToolMcpConnectorID = "connector_dropbox"
const OpenAIResponseToolMcpConnectorIDConnectorGmail OpenAIResponseToolMcpConnectorID = "connector_gmail"
const OpenAIResponseToolMcpConnectorIDConnectorGooglecalendar OpenAIResponseToolMcpConnectorID = "connector_googlecalendar"
const OpenAIResponseToolMcpConnectorIDConnectorGoogledrive OpenAIResponseToolMcpConnectorID = "connector_googledrive"
const OpenAIResponseToolMcpConnectorIDConnectorMicrosoftteams OpenAIResponseToolMcpConnectorID = "connector_microsoftteams"
const OpenAIResponseToolMcpConnectorIDConnectorOutlookcalendar OpenAIResponseToolMcpConnectorID = "connector_outlookcalendar"
const OpenAIResponseToolMcpConnectorIDConnectorOutlookemail OpenAIResponseToolMcpConnectorID = "connector_outlookemail"
const OpenAIResponseToolMcpConnectorIDConnectorSharepoint OpenAIResponseToolMcpConnectorID = "connector_sharepoint"
Headers map[string, string]Optional
RequireApproval OpenAIResponseToolMcpRequireApprovalUnionOptional

Specify which of the MCP server’s tools require approval.

Can be always, never, or a filter object associated with tools that require approval.

One of the following:
type OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilter struct{…}

Specify which of the MCP server’s tools require approval.

Can be always, never, or a filter object associated with tools that require approval.

Always OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilterAlwaysOptional

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
Never OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilterNeverOptional

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
type OpenAIResponseToolMcpRequireApprovalString string
One of the following:
const OpenAIResponseToolMcpRequireApprovalStringAlways OpenAIResponseToolMcpRequireApprovalString = "always"
const OpenAIResponseToolMcpRequireApprovalStringNever OpenAIResponseToolMcpRequireApprovalString = "never"
ServerDescription stringOptional
ServerURL stringOptional
type OpenAIResponseToolCodeInterpreter struct{…}

A tool that runs Python code to help generate a response to a prompt.

Container OpenAIResponseToolCodeInterpreterContainerUnion

Configuration for a code interpreter container.

Optionally specify the IDs of the files to run the code on.

One of the following:
string
type OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAuto struct{…}

Configuration for a code interpreter container.

Optionally specify the IDs of the files to run the code on.

Type Auto
FileIDs []stringOptional
MemoryLimit stringOptional
One of the following:
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"
NetworkPolicy OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnionOptional
One of the following:
type ContainerNetworkPolicyDisabled struct{…}
Type Disabled
type ContainerNetworkPolicyAllowlist struct{…}
AllowedDomains []string
Type Allowlist
DomainSecrets []ContainerNetworkPolicyAllowlistDomainSecretOptional
Domain string
Name string
Value string
Type CodeInterpreter
type OpenAIResponseToolImageGeneration struct{…}

A tool that generates images using the GPT image models.

Type ImageGeneration
Action stringOptional
One of the following:
const OpenAIResponseToolImageGenerationActionGenerate OpenAIResponseToolImageGenerationAction = "generate"
const OpenAIResponseToolImageGenerationActionEdit OpenAIResponseToolImageGenerationAction = "edit"
const OpenAIResponseToolImageGenerationActionAuto OpenAIResponseToolImageGenerationAction = "auto"
Background stringOptional
One of the following:
const OpenAIResponseToolImageGenerationBackgroundTransparent OpenAIResponseToolImageGenerationBackground = "transparent"
const OpenAIResponseToolImageGenerationBackgroundOpaque OpenAIResponseToolImageGenerationBackground = "opaque"
const OpenAIResponseToolImageGenerationBackgroundAuto OpenAIResponseToolImageGenerationBackground = "auto"
InputFidelity stringOptional
One of the following:
const OpenAIResponseToolImageGenerationInputFidelityHigh OpenAIResponseToolImageGenerationInputFidelity = "high"
const OpenAIResponseToolImageGenerationInputFidelityLow OpenAIResponseToolImageGenerationInputFidelity = "low"
InputImageMask OpenAIResponseToolImageGenerationInputImageMaskOptional

Optional mask for inpainting.

Contains image_url (string, optional) and file_id (string, optional).

FileID stringOptional
ImageURL stringOptional
Model stringOptional
One of the following:
string
string
One of the following:
const OpenAIResponseToolImageGenerationModelGptImage1 OpenAIResponseToolImageGenerationModel = "gpt-image-1"
const OpenAIResponseToolImageGenerationModelGptImage1Mini OpenAIResponseToolImageGenerationModel = "gpt-image-1-mini"
const OpenAIResponseToolImageGenerationModelGptImage1_5 OpenAIResponseToolImageGenerationModel = "gpt-image-1.5"
Moderation stringOptional
One of the following:
const OpenAIResponseToolImageGenerationModerationAuto OpenAIResponseToolImageGenerationModeration = "auto"
const OpenAIResponseToolImageGenerationModerationLow OpenAIResponseToolImageGenerationModeration = "low"
OutputCompression int64Optional
OutputFormat stringOptional
One of the following:
const OpenAIResponseToolImageGenerationOutputFormatPng OpenAIResponseToolImageGenerationOutputFormat = "png"
const OpenAIResponseToolImageGenerationOutputFormatWebp OpenAIResponseToolImageGenerationOutputFormat = "webp"
const OpenAIResponseToolImageGenerationOutputFormatJpeg OpenAIResponseToolImageGenerationOutputFormat = "jpeg"
PartialImages int64Optional
Quality stringOptional
One of the following:
const OpenAIResponseToolImageGenerationQualityLow OpenAIResponseToolImageGenerationQuality = "low"
const OpenAIResponseToolImageGenerationQualityMedium OpenAIResponseToolImageGenerationQuality = "medium"
const OpenAIResponseToolImageGenerationQualityHigh OpenAIResponseToolImageGenerationQuality = "high"
const OpenAIResponseToolImageGenerationQualityAuto OpenAIResponseToolImageGenerationQuality = "auto"
Size stringOptional
One of the following:
const OpenAIResponseToolImageGenerationSize1024x1024 OpenAIResponseToolImageGenerationSize = "1024x1024"
const OpenAIResponseToolImageGenerationSize1024x1536 OpenAIResponseToolImageGenerationSize = "1024x1536"
const OpenAIResponseToolImageGenerationSize1536x1024 OpenAIResponseToolImageGenerationSize = "1536x1024"
const OpenAIResponseToolImageGenerationSizeAuto OpenAIResponseToolImageGenerationSize = "auto"
type OpenAIResponseToolLocalShell struct{…}

A tool that allows the model to execute shell commands in a local environment.

Type LocalShell
type FunctionShellTool struct{…}

A tool that allows the model to execute shell commands.

Type Shell
Environment FunctionShellToolEnvironmentUnionOptional
One of the following:
type FunctionShellToolEnvironmentContainerAuto struct{…}
Type ContainerAuto
FileIDs []stringOptional
MemoryLimit stringOptional
One of the following:
const FunctionShellToolEnvironmentContainerAutoMemoryLimit1g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "1g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit4g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "4g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit16g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "16g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit64g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "64g"
NetworkPolicy FunctionShellToolEnvironmentContainerAutoNetworkPolicyUnionOptional
One of the following:
type ContainerNetworkPolicyDisabled struct{…}
Type Disabled
type ContainerNetworkPolicyAllowlist struct{…}
AllowedDomains []string
Type Allowlist
DomainSecrets []ContainerNetworkPolicyAllowlistDomainSecretOptional
Domain string
Name string
Value string
Skills []FunctionShellToolEnvironmentContainerAutoSkillUnionOptional
One of the following:
type FunctionShellToolEnvironmentContainerAutoSkillSkillReference struct{…}
SkillID string
Type SkillReference
Version stringOptional
type FunctionShellToolEnvironmentContainerAutoSkillInlineSkill struct{…}
Description string
Name string
Source FunctionShellToolEnvironmentContainerAutoSkillInlineSkillSource

Inline skill payload

Data string
MediaType ApplicationZip
Type Base64
Type Inline
type LocalEnvironment struct{…}
Type Local
Skills []LocalEnvironmentSkillOptional
Description string
Name string
Path string
type ContainerReference struct{…}
ContainerID string
Type ContainerReference
type CustomTool struct{…}

A custom tool that processes input using a specified format.

Learn more about custom tools

Name string
Type Custom
Description stringOptional
Format CustomToolFormatUnionOptional

Unconstrained free-form text.

One of the following:
type CustomToolFormatText struct{…}

Unconstrained free-form text.

Type Text
type CustomToolFormatGrammar struct{…}

A grammar defined by the user.

Definition string
Syntax string
One of the following:
const CustomToolFormatGrammarSyntaxLark CustomToolFormatGrammarSyntax = "lark"
const CustomToolFormatGrammarSyntaxRegex CustomToolFormatGrammarSyntax = "regex"
Type Grammar
type WebSearchPreviewTool struct{…}

This tool searches the web for relevant results to use in a response.

Learn more about the web search tool.

Type WebSearchPreviewToolType
One of the following:
const WebSearchPreviewToolTypeWebSearchPreview WebSearchPreviewToolType = "web_search_preview"
const WebSearchPreviewToolTypeWebSearchPreview2025_03_11 WebSearchPreviewToolType = "web_search_preview_2025_03_11"
SearchContextSize WebSearchPreviewToolSearchContextSizeOptional
One of the following:
const WebSearchPreviewToolSearchContextSizeLow WebSearchPreviewToolSearchContextSize = "low"
const WebSearchPreviewToolSearchContextSizeMedium WebSearchPreviewToolSearchContextSize = "medium"
const WebSearchPreviewToolSearchContextSizeHigh WebSearchPreviewToolSearchContextSize = "high"
UserLocation WebSearchPreviewToolUserLocationOptional

The user’s location.

Type Approximate
City stringOptional
Country stringOptional
Region stringOptional
Timezone stringOptional
type ApplyPatchTool struct{…}

Allows the assistant to create, delete, or update files using unified diffs.

Type ApplyPatch
Background boolOptional
CompletedAt float64Optional
Conversation ConversationOptional

The conversation that this response belonged to.

Input items and output items from this response were automatically added to this conversation.

ID string
Error OpenAIResponseErrorOptional

An error object returned when the model fails to generate a Response.

Code OpenAIResponseErrorCode
One of the following:
const OpenAIResponseErrorCodeServerError OpenAIResponseErrorCode = "server_error"
const OpenAIResponseErrorCodeRateLimitExceeded OpenAIResponseErrorCode = "rate_limit_exceeded"
const OpenAIResponseErrorCodeInvalidPrompt OpenAIResponseErrorCode = "invalid_prompt"
const OpenAIResponseErrorCodeVectorStoreTimeout OpenAIResponseErrorCode = "vector_store_timeout"
const OpenAIResponseErrorCodeInvalidImage OpenAIResponseErrorCode = "invalid_image"
const OpenAIResponseErrorCodeInvalidImageFormat OpenAIResponseErrorCode = "invalid_image_format"
const OpenAIResponseErrorCodeInvalidBase64Image OpenAIResponseErrorCode = "invalid_base64_image"
const OpenAIResponseErrorCodeInvalidImageURL OpenAIResponseErrorCode = "invalid_image_url"
const OpenAIResponseErrorCodeImageTooLarge OpenAIResponseErrorCode = "image_too_large"
const OpenAIResponseErrorCodeImageTooSmall OpenAIResponseErrorCode = "image_too_small"
const OpenAIResponseErrorCodeImageParseError OpenAIResponseErrorCode = "image_parse_error"
const OpenAIResponseErrorCodeImageContentPolicyViolation OpenAIResponseErrorCode = "image_content_policy_violation"
const OpenAIResponseErrorCodeInvalidImageMode OpenAIResponseErrorCode = "invalid_image_mode"
const OpenAIResponseErrorCodeImageFileTooLarge OpenAIResponseErrorCode = "image_file_too_large"
const OpenAIResponseErrorCodeUnsupportedImageMediaType OpenAIResponseErrorCode = "unsupported_image_media_type"
const OpenAIResponseErrorCodeEmptyImageFile OpenAIResponseErrorCode = "empty_image_file"
const OpenAIResponseErrorCodeFailedToDownloadImage OpenAIResponseErrorCode = "failed_to_download_image"
const OpenAIResponseErrorCodeImageFileNotFound OpenAIResponseErrorCode = "image_file_not_found"
Message string
IncompleteDetails IncompleteDetailsOptional

Details about why the response is incomplete.

Reason IncompleteDetailsReasonOptional
One of the following:
const IncompleteDetailsReasonMaxOutputTokens IncompleteDetailsReason = "max_output_tokens"
const IncompleteDetailsReasonContentFilter IncompleteDetailsReason = "content_filter"
Instructions OpenAIResponseInstructionsUnionOptional
One of the following:
string
type OpenAIResponseInstructionsInputItems []OpenAIResponseInstructionsInputItemUnion
One of the following:
type EasyInputMessage struct{…}

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 EasyInputMessageContentUnion
One of the following:
string
type EasyInputMessageContentInputItems []EasyInputMessageContentInputItemUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Role EasyInputMessageRole
One of the following:
const EasyInputMessageRoleUser EasyInputMessageRole = "user"
const EasyInputMessageRoleAssistant EasyInputMessageRole = "assistant"
const EasyInputMessageRoleSystem EasyInputMessageRole = "system"
const EasyInputMessageRoleDeveloper EasyInputMessageRole = "developer"
Phase EasyInputMessagePhaseOptional
One of the following:
const EasyInputMessagePhaseCommentary EasyInputMessagePhase = "commentary"
const EasyInputMessagePhaseFinalAnswer EasyInputMessagePhase = "final_answer"
Type EasyInputMessageTypeOptional
type OpenAITypesResponsesResponseInputItemMessage struct{…}

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 []OpenAITypesResponsesResponseInputItemMessageContentUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Role OpenAITypesResponsesResponseInputItemMessageRole
One of the following:
const OpenAITypesResponsesResponseInputItemMessageRoleUser OpenAITypesResponsesResponseInputItemMessageRole = "user"
const OpenAITypesResponsesResponseInputItemMessageRoleSystem OpenAITypesResponsesResponseInputItemMessageRole = "system"
const OpenAITypesResponsesResponseInputItemMessageRoleDeveloper OpenAITypesResponsesResponseInputItemMessageRole = "developer"
Status OpenAITypesResponsesResponseInputItemMessageStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemMessageStatusInProgress OpenAITypesResponsesResponseInputItemMessageStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemMessageStatusCompleted OpenAITypesResponsesResponseInputItemMessageStatus = "completed"
const OpenAITypesResponsesResponseInputItemMessageStatusIncomplete OpenAITypesResponsesResponseInputItemMessageStatus = "incomplete"
Type OpenAITypesResponsesResponseInputItemMessageTypeOptional
type OpenAIResponseOutputMessage struct{…}

An output message from the model.

ID string
Content []OpenAIResponseOutputMessageContentUnion
One of the following:
type OpenAIResponseOutputText struct{…}

A text output from the model.

Annotations []OpenAIResponseOutputTextAnnotationUnion
One of the following:
type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []OpenAIResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type OpenAIResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string
Type Refusal
Role Assistant
Status OpenAIResponseOutputMessageStatus
One of the following:
const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"
const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"
const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"
Type Message
Phase OpenAIResponseOutputMessagePhaseOptional
One of the following:
const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"
const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"
type OpenAIResponseFileSearchToolCall struct{…}

The results of a file search tool call.

See the file search guide for more information.

ID string
Queries []string
Status OpenAIResponseFileSearchToolCallStatus
One of the following:
const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"
const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"
const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"
const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"
const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"
Type FileSearchCall
Results []OpenAIResponseFileSearchToolCallResultOptional
Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]Optional
One of the following:
string
float64
bool
FileID stringOptional
Filename stringOptional
Score float64Optional
Text stringOptional
type OpenAIResponseComputerToolCall struct{…}

A tool call to a computer use tool.

See the computer use guide for more information.

ID string
Action OpenAIResponseComputerToolCallActionUnion

A click action.

One of the following:
type OpenAIResponseComputerToolCallActionActionClick struct{…}

A click action.

Button string
One of the following:
const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"
const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"
const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"
const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"
const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"
Type Click
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}

A double click action.

Type DoubleClick
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDrag struct{…}

A drag action.

Path []OpenAIResponseComputerToolCallActionActionDragPath
X int64
Y int64
Type Drag
type OpenAIResponseComputerToolCallActionActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string
Type Keypress
type OpenAIResponseComputerToolCallActionActionMove struct{…}

A mouse move action.

Type Move
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}

A screenshot action.

Type Screenshot
type OpenAIResponseComputerToolCallActionActionScroll struct{…}

A scroll action.

ScrollX int64
ScrollY int64
Type Scroll
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionType struct{…}

An action to type in text.

Text string
Type Type
type OpenAIResponseComputerToolCallActionActionWait struct{…}

A wait action.

Type Wait
CallID string
PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck
ID string
Code stringOptional
Message stringOptional
Status OpenAIResponseComputerToolCallStatus
One of the following:
const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"
const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"
const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"
Type ComputerCall
type OpenAITypesResponsesResponseInputItemComputerCallOutput struct{…}

The output of a computer tool call.

CallID string

A computer screenshot image used with the computer use tool.

Type ComputerScreenshot
FileID stringOptional
ImageURL stringOptional
Type ComputerCallOutput
ID stringOptional
AcknowledgedSafetyChecks []OpenAITypesResponsesResponseInputItemComputerCallOutputAcknowledgedSafetyCheckOptional
ID string
Code stringOptional
Message stringOptional
Status OpenAITypesResponsesResponseInputItemComputerCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "incomplete"
One of the following:
One of the following:
type OpenAIResponseFunctionToolCall struct{…}

A tool call to run a function.

See the function calling guide for more information.

Arguments string
CallID string
Name string
Type FunctionCall
ID stringOptional
Status OpenAIResponseFunctionToolCallStatusOptional
One of the following:
const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"
const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"
const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"
type OpenAITypesResponsesResponseInputItemFunctionCallOutput struct{…}

The output of a function tool call.

CallID string
Output OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputUnion
One of the following:
string
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentList []OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemUnion
One of the following:
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputTextContent struct{…}

A text input to the model.

Text string
Type InputText
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContent struct{…}

An image input to the model.

Learn about image inputs

Type InputImage
Detail stringOptional
One of the following:
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailLow OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "low"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailHigh OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "high"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailAuto OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "auto"
FileID stringOptional
ImageURL stringOptional
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputFileContent struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Type FunctionCallOutput
ID stringOptional
Status OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "incomplete"
type OpenAIResponseReasoningItem struct{…}

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.

ID string
Summary []OpenAIResponseReasoningItemSummary
Text string
Type SummaryText
Type Reasoning
Content []OpenAIResponseReasoningItemContentOptional
Text string
Type ReasoningText
EncryptedContent stringOptional
Status OpenAIResponseReasoningItemStatusOptional
One of the following:
const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"
const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"
const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"
type ResponseCompactionItemParamResp struct{…}

A compaction item generated by the v1/responses/compact API.

EncryptedContent string
Type Compaction
ID stringOptional
type OpenAITypesResponsesResponseInputItemImageGenerationCall struct{…}

An image generation request made by the model.

ID string
Status OpenAITypesResponsesResponseInputItemImageGenerationCallStatus
One of the following:
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "generating"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "failed"
Type ImageGenerationCall
Result stringOptional
type OpenAIResponseCodeInterpreterToolCall struct{…}

A tool call to run code.

ID string
ContainerID string
Status OpenAIResponseCodeInterpreterToolCallStatus
One of the following:
const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"
const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"
const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"
const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"
const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"
Type CodeInterpreterCall
Code stringOptional
Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnionOptional
One of the following:
type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}

The logs output from the code interpreter.

Logs string
Type Logs
type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}

The image output from the code interpreter.

Type Image
URL string
type OpenAITypesResponsesResponseInputItemLocalShellCall struct{…}

A tool call to run a command on the local shell.

ID string
Action OpenAITypesResponsesResponseInputItemLocalShellCallAction

Execute a shell command on the server.

Command []string
Env map[string, string]
Type Exec
TimeoutMs int64Optional
User stringOptional
WorkingDirectory stringOptional
CallID string
Status OpenAITypesResponsesResponseInputItemLocalShellCallStatus
One of the following:
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "incomplete"
Type LocalShellCall
type OpenAITypesResponsesResponseInputItemLocalShellCallOutput struct{…}

The output of a local shell tool call.

ID string
Output string
Type LocalShellCallOutput
Status OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "incomplete"
type ShellCall struct{…}

A tool representing a request to execute one or more shell commands.

Action ShellCallAction

The shell commands and limits that describe how to run the tool call.

Commands []string
MaxOutputLength int64Optional
TimeoutMs int64Optional
CallID string
Type ShellCall
ID stringOptional
Environment ShellCallEnvironmentUnionOptional
One of the following:
type LocalEnvironment struct{…}
Type Local
Skills []LocalEnvironmentSkillOptional
Description string
Name string
Path string
type ContainerReference struct{…}
ContainerID string
Type ContainerReference
Status ShellCallStatusOptional
One of the following:
const ShellCallStatusInProgress ShellCallStatus = "in_progress"
const ShellCallStatusCompleted ShellCallStatus = "completed"
const ShellCallStatusIncomplete ShellCallStatus = "incomplete"
type ShellCallOutput struct{…}

The streamed output items emitted by a shell tool call.

CallID string
Output []ShellCallOutputOutput
Outcome ShellCallOutputOutputOutcomeUnion

Indicates that the shell call exceeded its configured time limit.

One of the following:
type ShellCallOutputOutputOutcomeOutcomeTimeout struct{…}

Indicates that the shell call exceeded its configured time limit.

Type Timeout
type ShellCallOutputOutputOutcomeOutcomeExit struct{…}

Indicates that the shell commands finished and returned an exit code.

ExitCode int64
Type Exit
Stderr string
Stdout string
Type ShellCallOutput
ID stringOptional
MaxOutputLength int64Optional
Status ShellCallOutputStatusOptional
One of the following:
const ShellCallOutputStatusInProgress ShellCallOutputStatus = "in_progress"
const ShellCallOutputStatusCompleted ShellCallOutputStatus = "completed"
const ShellCallOutputStatusIncomplete ShellCallOutputStatus = "incomplete"
type ApplyPatchCall struct{…}

A tool call representing a request to create, delete, or update files using diff patches.

CallID string
Operation ApplyPatchCallOperationUnion

Instruction for creating a new file via the apply_patch tool.

One of the following:
type ApplyPatchCallOperationApplyPatchCallOperationCreateFile struct{…}

Instruction for creating a new file via the apply_patch tool.

Diff string
Path string
Type CreateFile
type ApplyPatchCallOperationApplyPatchCallOperationDeleteFile struct{…}

Instruction for deleting an existing file via the apply_patch tool.

Path string
Type DeleteFile
type ApplyPatchCallOperationApplyPatchCallOperationUpdateFile struct{…}

Instruction for updating an existing file via the apply_patch tool.

Diff string
Path string
Type UpdateFile
Status ApplyPatchCallStatus
One of the following:
const ApplyPatchCallStatusInProgress ApplyPatchCallStatus = "in_progress"
const ApplyPatchCallStatusCompleted ApplyPatchCallStatus = "completed"
Type ApplyPatchCall
ID stringOptional
type ApplyPatchCallOutput struct{…}

The streamed output emitted by an apply patch tool call.

CallID string
Status ApplyPatchCallOutputStatus
One of the following:
const ApplyPatchCallOutputStatusCompleted ApplyPatchCallOutputStatus = "completed"
const ApplyPatchCallOutputStatusFailed ApplyPatchCallOutputStatus = "failed"
Type ApplyPatchCallOutput
ID stringOptional
Output stringOptional
type OpenAITypesResponsesResponseInputItemMcpListTools struct{…}

A list of tools available on an MCP server.

ID string
ServerLabel string
Tools []OpenAITypesResponsesResponseInputItemMcpListToolsTool
InputSchema any
Name string
Annotations anyOptional
Description stringOptional
Type McpListTools
Error stringOptional
type McpApprovalRequest struct{…}

A request for human approval of a tool invocation.

ID string
Arguments string
Name string
ServerLabel string
Type McpApprovalRequest
type OpenAITypesResponsesResponseInputItemMcpApprovalResponse struct{…}

A response to an MCP approval request.

ApprovalRequestID string
Approve bool
Type McpApprovalResponse
ID stringOptional
Reason stringOptional
type OpenAITypesResponsesResponseInputItemMcpCall struct{…}

An invocation of a tool on an MCP server.

ID string
Arguments string
Name string
ServerLabel string
Type McpCall
ApprovalRequestID stringOptional
Error stringOptional
Output stringOptional
Status OpenAITypesResponsesResponseInputItemMcpCallStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemMcpCallStatusInProgress OpenAITypesResponsesResponseInputItemMcpCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemMcpCallStatusCompleted OpenAITypesResponsesResponseInputItemMcpCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseInputItemMcpCallStatus = "incomplete"
const OpenAITypesResponsesResponseInputItemMcpCallStatusCalling OpenAITypesResponsesResponseInputItemMcpCallStatus = "calling"
const OpenAITypesResponsesResponseInputItemMcpCallStatusFailed OpenAITypesResponsesResponseInputItemMcpCallStatus = "failed"
type OpenAIResponseCustomToolCallOutput struct{…}

The output of a custom tool call from your code, being sent back to the model.

CallID string
Output OpenAIResponseCustomToolCallOutputOutputUnion
One of the following:
string
type OpenAIResponseCustomToolCallOutputOutputOutputContentList []OpenAIResponseCustomToolCallOutputOutputOutputContentListItemUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Type CustomToolCallOutput
ID stringOptional
type OpenAIResponseCustomToolCall struct{…}

A call to a custom tool created by the model.

CallID string
Input string
Name string
Type CustomToolCall
ID stringOptional
type OpenAITypesResponsesResponseInputItemItemReference struct{…}

An internal identifier for an item to reference.

ID string
Type OpenAITypesResponsesResponseInputItemItemReferenceTypeOptional
MaxOutputTokens int64Optional
MaxToolCalls int64Optional
Metadata map[string, string]Optional
PreviousResponseID stringOptional
Prompt OpenAIResponsePromptOptional

Reference to a prompt template and its variables. Learn more.

ID string
Variables map[string, OpenAIResponsePromptVariableUnion]Optional
One of the following:
string
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Version stringOptional
PromptCacheKey stringOptional
PromptCacheRetention OpenAIResponsePromptCacheRetentionOptional
One of the following:
const OpenAIResponsePromptCacheRetentionInMemory OpenAIResponsePromptCacheRetention = "in-memory"
const OpenAIResponsePromptCacheRetention24h OpenAIResponsePromptCacheRetention = "24h"
Reasoning ReasoningOptional

gpt-5 and o-series models only

Configuration options for reasoning models.

Effort ReasoningEffortOptional
One of the following:
const ReasoningEffortNone ReasoningEffort = "none"
const ReasoningEffortMinimal ReasoningEffort = "minimal"
const ReasoningEffortLow ReasoningEffort = "low"
const ReasoningEffortMedium ReasoningEffort = "medium"
const ReasoningEffortHigh ReasoningEffort = "high"
const ReasoningEffortXhigh ReasoningEffort = "xhigh"
GenerateSummary ReasoningGenerateSummaryOptional
One of the following:
const ReasoningGenerateSummaryAuto ReasoningGenerateSummary = "auto"
const ReasoningGenerateSummaryConcise ReasoningGenerateSummary = "concise"
const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"
Summary ReasoningSummaryOptional
One of the following:
const ReasoningSummaryAuto ReasoningSummary = "auto"
const ReasoningSummaryConcise ReasoningSummary = "concise"
const ReasoningSummaryDetailed ReasoningSummary = "detailed"
SafetyIdentifier stringOptional
ServiceTier OpenAIResponseServiceTierOptional
One of the following:
const OpenAIResponseServiceTierAuto OpenAIResponseServiceTier = "auto"
const OpenAIResponseServiceTierDefault OpenAIResponseServiceTier = "default"
const OpenAIResponseServiceTierFlex OpenAIResponseServiceTier = "flex"
const OpenAIResponseServiceTierScale OpenAIResponseServiceTier = "scale"
const OpenAIResponseServiceTierPriority OpenAIResponseServiceTier = "priority"
Status OpenAIResponseStatusOptional
One of the following:
const OpenAIResponseStatusCompleted OpenAIResponseStatus = "completed"
const OpenAIResponseStatusFailed OpenAIResponseStatus = "failed"
const OpenAIResponseStatusInProgress OpenAIResponseStatus = "in_progress"
const OpenAIResponseStatusCancelled OpenAIResponseStatus = "cancelled"
const OpenAIResponseStatusQueued OpenAIResponseStatus = "queued"
const OpenAIResponseStatusIncomplete OpenAIResponseStatus = "incomplete"
Temperature float64Optional

Configuration options for a text response from the model.

Can be plain text or structured JSON data. Learn more:

Format OpenAIResponseTextConfigFormatUnionOptional

Default response format. Used to generate text responses.

One of the following:
type OpenAIResponseTextConfigFormatResponseFormatText struct{…}

Default response format. Used to generate text responses.

Type Text
type OpenAIResponseTextConfigFormatResponseFormatTextJsonSchemaConfig struct{…}

JSON Schema response format.

Used to generate structured JSON responses. Learn more about Structured Outputs.

Name string
Schema map[string, any]
Type JsonSchema
Description stringOptional
Strict boolOptional
type OpenAIResponseTextConfigFormatResponseFormatJsonObject struct{…}

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.

Type JsonObject
Verbosity OpenAIResponseTextConfigVerbosityOptional
One of the following:
const OpenAIResponseTextConfigVerbosityLow OpenAIResponseTextConfigVerbosity = "low"
const OpenAIResponseTextConfigVerbosityMedium OpenAIResponseTextConfigVerbosity = "medium"
const OpenAIResponseTextConfigVerbosityHigh OpenAIResponseTextConfigVerbosity = "high"
TopLogprobs int64Optional
TopP float64Optional
Truncation OpenAIResponseTruncationOptional
One of the following:
const OpenAIResponseTruncationAuto OpenAIResponseTruncation = "auto"
const OpenAIResponseTruncationDisabled OpenAIResponseTruncation = "disabled"
Usage OpenAIResponseUsageOptional

Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.

InputTokens int64
InputTokensDetails OpenAIResponseUsageInputTokensDetails

A detailed breakdown of the input tokens.

CachedTokens int64
OutputTokens int64
OutputTokensDetails OpenAIResponseUsageOutputTokensDetails

A detailed breakdown of the output tokens.

ReasoningTokens int64
TotalTokens int64
User stringOptional
SequenceNumber int64
Type ResponseIncomplete
type ResponseNewResponseResponseOutputItemAddedEvent struct{…}

Emitted when a new output item is added.

Item ResponseNewResponseResponseOutputItemAddedEventItemUnion

An output message from the model.

One of the following:
type OpenAIResponseOutputMessage struct{…}

An output message from the model.

ID string
Content []OpenAIResponseOutputMessageContentUnion
One of the following:
type OpenAIResponseOutputText struct{…}

A text output from the model.

Annotations []OpenAIResponseOutputTextAnnotationUnion
One of the following:
type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []OpenAIResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type OpenAIResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string
Type Refusal
Role Assistant
Status OpenAIResponseOutputMessageStatus
One of the following:
const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"
const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"
const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"
Type Message
Phase OpenAIResponseOutputMessagePhaseOptional
One of the following:
const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"
const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"
type OpenAIResponseFileSearchToolCall struct{…}

The results of a file search tool call.

See the file search guide for more information.

ID string
Queries []string
Status OpenAIResponseFileSearchToolCallStatus
One of the following:
const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"
const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"
const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"
const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"
const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"
Type FileSearchCall
Results []OpenAIResponseFileSearchToolCallResultOptional
Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]Optional
One of the following:
string
float64
bool
FileID stringOptional
Filename stringOptional
Score float64Optional
Text stringOptional
type OpenAIResponseFunctionToolCall struct{…}

A tool call to run a function.

See the function calling guide for more information.

Arguments string
CallID string
Name string
Type FunctionCall
ID stringOptional
Status OpenAIResponseFunctionToolCallStatusOptional
One of the following:
const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"
const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"
const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"
One of the following:
One of the following:
type OpenAIResponseComputerToolCall struct{…}

A tool call to a computer use tool.

See the computer use guide for more information.

ID string
Action OpenAIResponseComputerToolCallActionUnion

A click action.

One of the following:
type OpenAIResponseComputerToolCallActionActionClick struct{…}

A click action.

Button string
One of the following:
const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"
const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"
const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"
const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"
const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"
Type Click
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}

A double click action.

Type DoubleClick
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDrag struct{…}

A drag action.

Path []OpenAIResponseComputerToolCallActionActionDragPath
X int64
Y int64
Type Drag
type OpenAIResponseComputerToolCallActionActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string
Type Keypress
type OpenAIResponseComputerToolCallActionActionMove struct{…}

A mouse move action.

Type Move
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}

A screenshot action.

Type Screenshot
type OpenAIResponseComputerToolCallActionActionScroll struct{…}

A scroll action.

ScrollX int64
ScrollY int64
Type Scroll
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionType struct{…}

An action to type in text.

Text string
Type Type
type OpenAIResponseComputerToolCallActionActionWait struct{…}

A wait action.

Type Wait
CallID string
PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck
ID string
Code stringOptional
Message stringOptional
Status OpenAIResponseComputerToolCallStatus
One of the following:
const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"
const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"
const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"
Type ComputerCall
type OpenAIResponseReasoningItem struct{…}

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.

ID string
Summary []OpenAIResponseReasoningItemSummary
Text string
Type SummaryText
Type Reasoning
Content []OpenAIResponseReasoningItemContentOptional
Text string
Type ReasoningText
EncryptedContent stringOptional
Status OpenAIResponseReasoningItemStatusOptional
One of the following:
const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"
const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"
const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"
type ResponseCompactionItem struct{…}

A compaction item generated by the v1/responses/compact API.

ID string
EncryptedContent string
Type Compaction
CreatedBy stringOptional
type OpenAITypesResponsesResponseOutputItemImageGenerationCall struct{…}

An image generation request made by the model.

ID string
Status OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus
One of the following:
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "generating"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "failed"
Type ImageGenerationCall
Result stringOptional
type OpenAIResponseCodeInterpreterToolCall struct{…}

A tool call to run code.

ID string
ContainerID string
Status OpenAIResponseCodeInterpreterToolCallStatus
One of the following:
const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"
const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"
const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"
const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"
const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"
Type CodeInterpreterCall
Code stringOptional
Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnionOptional
One of the following:
type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}

The logs output from the code interpreter.

Logs string
Type Logs
type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}

The image output from the code interpreter.

Type Image
URL string
type OpenAITypesResponsesResponseOutputItemLocalShellCall struct{…}

A tool call to run a command on the local shell.

ID string
Action OpenAITypesResponsesResponseOutputItemLocalShellCallAction

Execute a shell command on the server.

Command []string
Env map[string, string]
Type Exec
TimeoutMs int64Optional
User stringOptional
WorkingDirectory stringOptional
CallID string
Status OpenAITypesResponsesResponseOutputItemLocalShellCallStatus
One of the following:
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "incomplete"
Type LocalShellCall
type ResponseFunctionShellToolCall struct{…}

A tool call that executes one or more shell commands in a managed environment.

ID string
Action ResponseFunctionShellToolCallAction

The shell commands and limits that describe how to run the tool call.

Commands []string
MaxOutputLength int64Optional
TimeoutMs int64Optional
CallID string
Status ResponseFunctionShellToolCallStatus
One of the following:
const ResponseFunctionShellToolCallStatusInProgress ResponseFunctionShellToolCallStatus = "in_progress"
const ResponseFunctionShellToolCallStatusCompleted ResponseFunctionShellToolCallStatus = "completed"
const ResponseFunctionShellToolCallStatusIncomplete ResponseFunctionShellToolCallStatus = "incomplete"
Type ShellCall
CreatedBy stringOptional
Environment ResponseFunctionShellToolCallEnvironmentUnionOptional

Represents the use of a local environment to perform shell actions.

One of the following:
type ResponseFunctionShellToolCallEnvironmentResponseLocalEnvironment struct{…}

Represents the use of a local environment to perform shell actions.

Type Local
type ResponseFunctionShellToolCallEnvironmentResponseContainerReference struct{…}

Represents a container created with /v1/containers.

ContainerID string
Type ContainerReference
type ResponseFunctionShellToolCallOutput struct{…}

The output of a shell tool call that was emitted.

ID string
CallID string
Output []ResponseFunctionShellToolCallOutputOutput
Outcome ResponseFunctionShellToolCallOutputOutputOutcomeUnion

Indicates that the shell call exceeded its configured time limit.

One of the following:
type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeTimeout struct{…}

Indicates that the shell call exceeded its configured time limit.

Type Timeout
type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeExit struct{…}

Indicates that the shell commands finished and returned an exit code.

ExitCode int64
Type Exit
Stderr string
Stdout string
CreatedBy stringOptional
Status ResponseFunctionShellToolCallOutputStatus
One of the following:
const ResponseFunctionShellToolCallOutputStatusInProgress ResponseFunctionShellToolCallOutputStatus = "in_progress"
const ResponseFunctionShellToolCallOutputStatusCompleted ResponseFunctionShellToolCallOutputStatus = "completed"
const ResponseFunctionShellToolCallOutputStatusIncomplete ResponseFunctionShellToolCallOutputStatus = "incomplete"
Type ShellCallOutput
CreatedBy stringOptional
MaxOutputLength int64Optional
type ResponseApplyPatchToolCall struct{…}

A tool call that applies file diffs by creating, deleting, or updating files.

ID string
CallID string
Operation ResponseApplyPatchToolCallOperationUnion

Instruction describing how to create a file via the apply_patch tool.

One of the following:
type ResponseApplyPatchToolCallOperationOperationCreateFile struct{…}

Instruction describing how to create a file via the apply_patch tool.

Diff string
Path string
Type CreateFile
type ResponseApplyPatchToolCallOperationOperationDeleteFile struct{…}

Instruction describing how to delete a file via the apply_patch tool.

Path string
Type DeleteFile
type ResponseApplyPatchToolCallOperationOperationUpdateFile struct{…}

Instruction describing how to update a file via the apply_patch tool.

Diff string
Path string
Type UpdateFile
Status ResponseApplyPatchToolCallStatus
One of the following:
const ResponseApplyPatchToolCallStatusInProgress ResponseApplyPatchToolCallStatus = "in_progress"
const ResponseApplyPatchToolCallStatusCompleted ResponseApplyPatchToolCallStatus = "completed"
Type ApplyPatchCall
CreatedBy stringOptional
type ResponseApplyPatchToolCallOutput struct{…}

The output emitted by an apply patch tool call.

ID string
CallID string
Status ResponseApplyPatchToolCallOutputStatus
One of the following:
const ResponseApplyPatchToolCallOutputStatusCompleted ResponseApplyPatchToolCallOutputStatus = "completed"
const ResponseApplyPatchToolCallOutputStatusFailed ResponseApplyPatchToolCallOutputStatus = "failed"
Type ApplyPatchCallOutput
CreatedBy stringOptional
Output stringOptional
type OpenAITypesResponsesResponseOutputItemMcpCall struct{…}

An invocation of a tool on an MCP server.

ID string
Arguments string
Name string
ServerLabel string
Type McpCall
ApprovalRequestID stringOptional
Error stringOptional
Output stringOptional
Status OpenAITypesResponsesResponseOutputItemMcpCallStatusOptional
One of the following:
const OpenAITypesResponsesResponseOutputItemMcpCallStatusInProgress OpenAITypesResponsesResponseOutputItemMcpCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusCompleted OpenAITypesResponsesResponseOutputItemMcpCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseOutputItemMcpCallStatus = "incomplete"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusCalling OpenAITypesResponsesResponseOutputItemMcpCallStatus = "calling"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusFailed OpenAITypesResponsesResponseOutputItemMcpCallStatus = "failed"
type OpenAITypesResponsesResponseOutputItemMcpListTools struct{…}

A list of tools available on an MCP server.

ID string
ServerLabel string
Tools []OpenAITypesResponsesResponseOutputItemMcpListToolsTool
InputSchema any
Name string
Annotations anyOptional
Description stringOptional
Type McpListTools
Error stringOptional
type McpApprovalRequest struct{…}

A request for human approval of a tool invocation.

ID string
Arguments string
Name string
ServerLabel string
Type McpApprovalRequest
type OpenAIResponseCustomToolCall struct{…}

A call to a custom tool created by the model.

CallID string
Input string
Name string
Type CustomToolCall
ID stringOptional
OutputIndex int64
SequenceNumber int64
Type ResponseOutputItemAdded
type ResponseNewResponseResponseOutputItemDoneEvent struct{…}

Emitted when an output item is marked done.

Item ResponseNewResponseResponseOutputItemDoneEventItemUnion

An output message from the model.

One of the following:
type OpenAIResponseOutputMessage struct{…}

An output message from the model.

ID string
Content []OpenAIResponseOutputMessageContentUnion
One of the following:
type OpenAIResponseOutputText struct{…}

A text output from the model.

Annotations []OpenAIResponseOutputTextAnnotationUnion
One of the following:
type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []OpenAIResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type OpenAIResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string
Type Refusal
Role Assistant
Status OpenAIResponseOutputMessageStatus
One of the following:
const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"
const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"
const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"
Type Message
Phase OpenAIResponseOutputMessagePhaseOptional
One of the following:
const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"
const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"
type OpenAIResponseFileSearchToolCall struct{…}

The results of a file search tool call.

See the file search guide for more information.

ID string
Queries []string
Status OpenAIResponseFileSearchToolCallStatus
One of the following:
const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"
const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"
const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"
const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"
const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"
Type FileSearchCall
Results []OpenAIResponseFileSearchToolCallResultOptional
Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]Optional
One of the following:
string
float64
bool
FileID stringOptional
Filename stringOptional
Score float64Optional
Text stringOptional
type OpenAIResponseFunctionToolCall struct{…}

A tool call to run a function.

See the function calling guide for more information.

Arguments string
CallID string
Name string
Type FunctionCall
ID stringOptional
Status OpenAIResponseFunctionToolCallStatusOptional
One of the following:
const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"
const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"
const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"
One of the following:
One of the following:
type OpenAIResponseComputerToolCall struct{…}

A tool call to a computer use tool.

See the computer use guide for more information.

ID string
Action OpenAIResponseComputerToolCallActionUnion

A click action.

One of the following:
type OpenAIResponseComputerToolCallActionActionClick struct{…}

A click action.

Button string
One of the following:
const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"
const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"
const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"
const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"
const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"
Type Click
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}

A double click action.

Type DoubleClick
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDrag struct{…}

A drag action.

Path []OpenAIResponseComputerToolCallActionActionDragPath
X int64
Y int64
Type Drag
type OpenAIResponseComputerToolCallActionActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string
Type Keypress
type OpenAIResponseComputerToolCallActionActionMove struct{…}

A mouse move action.

Type Move
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}

A screenshot action.

Type Screenshot
type OpenAIResponseComputerToolCallActionActionScroll struct{…}

A scroll action.

ScrollX int64
ScrollY int64
Type Scroll
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionType struct{…}

An action to type in text.

Text string
Type Type
type OpenAIResponseComputerToolCallActionActionWait struct{…}

A wait action.

Type Wait
CallID string
PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck
ID string
Code stringOptional
Message stringOptional
Status OpenAIResponseComputerToolCallStatus
One of the following:
const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"
const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"
const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"
Type ComputerCall
type OpenAIResponseReasoningItem struct{…}

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.

ID string
Summary []OpenAIResponseReasoningItemSummary
Text string
Type SummaryText
Type Reasoning
Content []OpenAIResponseReasoningItemContentOptional
Text string
Type ReasoningText
EncryptedContent stringOptional
Status OpenAIResponseReasoningItemStatusOptional
One of the following:
const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"
const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"
const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"
type ResponseCompactionItem struct{…}

A compaction item generated by the v1/responses/compact API.

ID string
EncryptedContent string
Type Compaction
CreatedBy stringOptional
type OpenAITypesResponsesResponseOutputItemImageGenerationCall struct{…}

An image generation request made by the model.

ID string
Status OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus
One of the following:
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "generating"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "failed"
Type ImageGenerationCall
Result stringOptional
type OpenAIResponseCodeInterpreterToolCall struct{…}

A tool call to run code.

ID string
ContainerID string
Status OpenAIResponseCodeInterpreterToolCallStatus
One of the following:
const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"
const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"
const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"
const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"
const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"
Type CodeInterpreterCall
Code stringOptional
Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnionOptional
One of the following:
type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}

The logs output from the code interpreter.

Logs string
Type Logs
type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}

The image output from the code interpreter.

Type Image
URL string
type OpenAITypesResponsesResponseOutputItemLocalShellCall struct{…}

A tool call to run a command on the local shell.

ID string
Action OpenAITypesResponsesResponseOutputItemLocalShellCallAction

Execute a shell command on the server.

Command []string
Env map[string, string]
Type Exec
TimeoutMs int64Optional
User stringOptional
WorkingDirectory stringOptional
CallID string
Status OpenAITypesResponsesResponseOutputItemLocalShellCallStatus
One of the following:
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "incomplete"
Type LocalShellCall
type ResponseFunctionShellToolCall struct{…}

A tool call that executes one or more shell commands in a managed environment.

ID string
Action ResponseFunctionShellToolCallAction

The shell commands and limits that describe how to run the tool call.

Commands []string
MaxOutputLength int64Optional
TimeoutMs int64Optional
CallID string
Status ResponseFunctionShellToolCallStatus
One of the following:
const ResponseFunctionShellToolCallStatusInProgress ResponseFunctionShellToolCallStatus = "in_progress"
const ResponseFunctionShellToolCallStatusCompleted ResponseFunctionShellToolCallStatus = "completed"
const ResponseFunctionShellToolCallStatusIncomplete ResponseFunctionShellToolCallStatus = "incomplete"
Type ShellCall
CreatedBy stringOptional
Environment ResponseFunctionShellToolCallEnvironmentUnionOptional

Represents the use of a local environment to perform shell actions.

One of the following:
type ResponseFunctionShellToolCallEnvironmentResponseLocalEnvironment struct{…}

Represents the use of a local environment to perform shell actions.

Type Local
type ResponseFunctionShellToolCallEnvironmentResponseContainerReference struct{…}

Represents a container created with /v1/containers.

ContainerID string
Type ContainerReference
type ResponseFunctionShellToolCallOutput struct{…}

The output of a shell tool call that was emitted.

ID string
CallID string
Output []ResponseFunctionShellToolCallOutputOutput
Outcome ResponseFunctionShellToolCallOutputOutputOutcomeUnion

Indicates that the shell call exceeded its configured time limit.

One of the following:
type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeTimeout struct{…}

Indicates that the shell call exceeded its configured time limit.

Type Timeout
type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeExit struct{…}

Indicates that the shell commands finished and returned an exit code.

ExitCode int64
Type Exit
Stderr string
Stdout string
CreatedBy stringOptional
Status ResponseFunctionShellToolCallOutputStatus
One of the following:
const ResponseFunctionShellToolCallOutputStatusInProgress ResponseFunctionShellToolCallOutputStatus = "in_progress"
const ResponseFunctionShellToolCallOutputStatusCompleted ResponseFunctionShellToolCallOutputStatus = "completed"
const ResponseFunctionShellToolCallOutputStatusIncomplete ResponseFunctionShellToolCallOutputStatus = "incomplete"
Type ShellCallOutput
CreatedBy stringOptional
MaxOutputLength int64Optional
type ResponseApplyPatchToolCall struct{…}

A tool call that applies file diffs by creating, deleting, or updating files.

ID string
CallID string
Operation ResponseApplyPatchToolCallOperationUnion

Instruction describing how to create a file via the apply_patch tool.

One of the following:
type ResponseApplyPatchToolCallOperationOperationCreateFile struct{…}

Instruction describing how to create a file via the apply_patch tool.

Diff string
Path string
Type CreateFile
type ResponseApplyPatchToolCallOperationOperationDeleteFile struct{…}

Instruction describing how to delete a file via the apply_patch tool.

Path string
Type DeleteFile
type ResponseApplyPatchToolCallOperationOperationUpdateFile struct{…}

Instruction describing how to update a file via the apply_patch tool.

Diff string
Path string
Type UpdateFile
Status ResponseApplyPatchToolCallStatus
One of the following:
const ResponseApplyPatchToolCallStatusInProgress ResponseApplyPatchToolCallStatus = "in_progress"
const ResponseApplyPatchToolCallStatusCompleted ResponseApplyPatchToolCallStatus = "completed"
Type ApplyPatchCall
CreatedBy stringOptional
type ResponseApplyPatchToolCallOutput struct{…}

The output emitted by an apply patch tool call.

ID string
CallID string
Status ResponseApplyPatchToolCallOutputStatus
One of the following:
const ResponseApplyPatchToolCallOutputStatusCompleted ResponseApplyPatchToolCallOutputStatus = "completed"
const ResponseApplyPatchToolCallOutputStatusFailed ResponseApplyPatchToolCallOutputStatus = "failed"
Type ApplyPatchCallOutput
CreatedBy stringOptional
Output stringOptional
type OpenAITypesResponsesResponseOutputItemMcpCall struct{…}

An invocation of a tool on an MCP server.

ID string
Arguments string
Name string
ServerLabel string
Type McpCall
ApprovalRequestID stringOptional
Error stringOptional
Output stringOptional
Status OpenAITypesResponsesResponseOutputItemMcpCallStatusOptional
One of the following:
const OpenAITypesResponsesResponseOutputItemMcpCallStatusInProgress OpenAITypesResponsesResponseOutputItemMcpCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusCompleted OpenAITypesResponsesResponseOutputItemMcpCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseOutputItemMcpCallStatus = "incomplete"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusCalling OpenAITypesResponsesResponseOutputItemMcpCallStatus = "calling"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusFailed OpenAITypesResponsesResponseOutputItemMcpCallStatus = "failed"
type OpenAITypesResponsesResponseOutputItemMcpListTools struct{…}

A list of tools available on an MCP server.

ID string
ServerLabel string
Tools []OpenAITypesResponsesResponseOutputItemMcpListToolsTool
InputSchema any
Name string
Annotations anyOptional
Description stringOptional
Type McpListTools
Error stringOptional
type McpApprovalRequest struct{…}

A request for human approval of a tool invocation.

ID string
Arguments string
Name string
ServerLabel string
Type McpApprovalRequest
type OpenAIResponseCustomToolCall struct{…}

A call to a custom tool created by the model.

CallID string
Input string
Name string
Type CustomToolCall
ID stringOptional
OutputIndex int64
SequenceNumber int64
Type ResponseOutputItemDone
type ResponseNewResponseResponseReasoningSummaryPartAddedEvent struct{…}

Emitted when a new reasoning summary part is added.

ItemID string
OutputIndex int64
Part ResponseNewResponseResponseReasoningSummaryPartAddedEventPart

The summary part that was added.

Text string
Type SummaryText
SequenceNumber int64
SummaryIndex int64
Type ResponseReasoningSummaryPartAdded
type ResponseNewResponseResponseReasoningSummaryPartDoneEvent struct{…}

Emitted when a reasoning summary part is completed.

ItemID string
OutputIndex int64
Part ResponseNewResponseResponseReasoningSummaryPartDoneEventPart

The completed summary part.

Text string
Type SummaryText
SequenceNumber int64
SummaryIndex int64
Type ResponseReasoningSummaryPartDone
type ResponseNewResponseResponseReasoningSummaryTextDeltaEvent struct{…}

Emitted when a delta is added to a reasoning summary text.

Delta string
ItemID string
OutputIndex int64
SequenceNumber int64
SummaryIndex int64
Type ResponseReasoningSummaryTextDelta
type ResponseNewResponseResponseReasoningSummaryTextDoneEvent struct{…}

Emitted when a reasoning summary text is completed.

ItemID string
OutputIndex int64
SequenceNumber int64
SummaryIndex int64
Text string
Type ResponseReasoningSummaryTextDone
type ResponseNewResponseResponseReasoningTextDeltaEvent struct{…}

Emitted when a delta is added to a reasoning text.

ContentIndex int64
Delta string
ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseReasoningTextDelta
type ResponseNewResponseResponseReasoningTextDoneEvent struct{…}

Emitted when a reasoning text is completed.

ContentIndex int64
ItemID string
OutputIndex int64
SequenceNumber int64
Text string
Type ResponseReasoningTextDone
type ResponseNewResponseResponseRefusalDeltaEvent struct{…}

Emitted when there is a partial refusal text.

ContentIndex int64
Delta string
ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseRefusalDelta
type ResponseNewResponseResponseRefusalDoneEvent struct{…}

Emitted when refusal text is finalized.

ContentIndex int64
ItemID string
OutputIndex int64
Refusal string
SequenceNumber int64
Type ResponseRefusalDone
type ResponseNewResponseResponseTextDeltaEvent struct{…}

Emitted when there is an additional text delta.

ContentIndex int64
Delta string
ItemID string
Logprobs []ResponseNewResponseResponseTextDeltaEventLogprob
Token string
Logprob float64
TopLogprobs []ResponseNewResponseResponseTextDeltaEventLogprobTopLogprobOptional
Token stringOptional
Logprob float64Optional
OutputIndex int64
SequenceNumber int64
Type ResponseOutputTextDelta
type ResponseNewResponseResponseTextDoneEvent struct{…}

Emitted when text content is finalized.

ContentIndex int64
ItemID string
Logprobs []ResponseNewResponseResponseTextDoneEventLogprob
Token string
Logprob float64
TopLogprobs []ResponseNewResponseResponseTextDoneEventLogprobTopLogprobOptional
Token stringOptional
Logprob float64Optional
OutputIndex int64
SequenceNumber int64
Text string
Type ResponseOutputTextDone
type ResponseNewResponseResponseWebSearchCallCompletedEvent struct{…}

Emitted when a web search call is completed.

ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseWebSearchCallCompleted
type ResponseNewResponseResponseWebSearchCallInProgressEvent struct{…}

Emitted when a web search call is initiated.

ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseWebSearchCallInProgress
type ResponseNewResponseResponseWebSearchCallSearchingEvent struct{…}

Emitted when a web search call is executing.

ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseWebSearchCallSearching
type ResponseNewResponseResponseImageGenCallCompletedEvent struct{…}

Emitted when an image generation tool call has completed and the final image is available.

ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseImageGenerationCallCompleted
type ResponseNewResponseResponseImageGenCallGeneratingEvent struct{…}

Emitted when an image generation tool call is actively generating an image (intermediate state).

ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseImageGenerationCallGenerating
type ResponseNewResponseResponseImageGenCallInProgressEvent struct{…}

Emitted when an image generation tool call is in progress.

ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseImageGenerationCallInProgress
type ResponseNewResponseResponseImageGenCallPartialImageEvent struct{…}

Emitted when a partial image is available during image generation streaming.

ItemID string
OutputIndex int64
PartialImageB64 string
PartialImageIndex int64
SequenceNumber int64
Type ResponseImageGenerationCallPartialImage
type ResponseNewResponseResponseMcpCallArgumentsDeltaEvent struct{…}

Emitted when there is a delta (partial update) to the arguments of an MCP tool call.

Delta string
ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseMcpCallArgumentsDelta
type ResponseNewResponseResponseMcpCallArgumentsDoneEvent struct{…}

Emitted when the arguments for an MCP tool call are finalized.

Arguments string
ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseMcpCallArgumentsDone
type ResponseNewResponseResponseMcpCallCompletedEvent struct{…}

Emitted when an MCP tool call has completed successfully.

ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseMcpCallCompleted
type ResponseNewResponseResponseMcpCallFailedEvent struct{…}

Emitted when an MCP tool call has failed.

ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseMcpCallFailed
type ResponseNewResponseResponseMcpCallInProgressEvent struct{…}

Emitted when an MCP tool call is in progress.

ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseMcpCallInProgress
type ResponseNewResponseResponseMcpListToolsCompletedEvent struct{…}

Emitted when the list of available MCP tools has been successfully retrieved.

ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseMcpListToolsCompleted
type ResponseNewResponseResponseMcpListToolsFailedEvent struct{…}

Emitted when the attempt to list available MCP tools has failed.

ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseMcpListToolsFailed
type ResponseNewResponseResponseMcpListToolsInProgressEvent struct{…}

Emitted when the system is in the process of retrieving the list of available MCP tools.

ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseMcpListToolsInProgress
type ResponseNewResponseResponseOutputTextAnnotationAddedEvent struct{…}

Emitted when an annotation is added to output text content.

Annotation any
AnnotationIndex int64
ContentIndex int64
ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseOutputTextAnnotationAdded
type ResponseNewResponseResponseQueuedEvent struct{…}

Emitted when a response is queued and waiting to be processed.

ID string
CreatedAt float64
Model OpenAIResponseModel
One of the following:
type OpenAIResponseModel string
One of the following:
const OpenAIResponseModelGpt5_2 OpenAIResponseModel = "gpt-5.2"
const OpenAIResponseModelGpt5_2_2025_12_11 OpenAIResponseModel = "gpt-5.2-2025-12-11"
const OpenAIResponseModelGpt5_2ChatLatest OpenAIResponseModel = "gpt-5.2-chat-latest"
const OpenAIResponseModelGpt5_2Pro OpenAIResponseModel = "gpt-5.2-pro"
const OpenAIResponseModelGpt5_2Pro2025_12_11 OpenAIResponseModel = "gpt-5.2-pro-2025-12-11"
const OpenAIResponseModelGpt5_1 OpenAIResponseModel = "gpt-5.1"
const OpenAIResponseModelGpt5_1_2025_11_13 OpenAIResponseModel = "gpt-5.1-2025-11-13"
const OpenAIResponseModelGpt5_1Codex OpenAIResponseModel = "gpt-5.1-codex"
const OpenAIResponseModelGpt5_1Mini OpenAIResponseModel = "gpt-5.1-mini"
const OpenAIResponseModelGpt5_1ChatLatest OpenAIResponseModel = "gpt-5.1-chat-latest"
const OpenAIResponseModelGpt5 OpenAIResponseModel = "gpt-5"
const OpenAIResponseModelGpt5Mini OpenAIResponseModel = "gpt-5-mini"
const OpenAIResponseModelGpt5Nano OpenAIResponseModel = "gpt-5-nano"
const OpenAIResponseModelGpt5_2025_08_07 OpenAIResponseModel = "gpt-5-2025-08-07"
const OpenAIResponseModelGpt5Mini2025_08_07 OpenAIResponseModel = "gpt-5-mini-2025-08-07"
const OpenAIResponseModelGpt5Nano2025_08_07 OpenAIResponseModel = "gpt-5-nano-2025-08-07"
const OpenAIResponseModelGpt5ChatLatest OpenAIResponseModel = "gpt-5-chat-latest"
const OpenAIResponseModelGpt4_1 OpenAIResponseModel = "gpt-4.1"
const OpenAIResponseModelGpt4_1Mini OpenAIResponseModel = "gpt-4.1-mini"
const OpenAIResponseModelGpt4_1Nano OpenAIResponseModel = "gpt-4.1-nano"
const OpenAIResponseModelGpt4_1_2025_04_14 OpenAIResponseModel = "gpt-4.1-2025-04-14"
const OpenAIResponseModelGpt4_1Mini2025_04_14 OpenAIResponseModel = "gpt-4.1-mini-2025-04-14"
const OpenAIResponseModelGpt4_1Nano2025_04_14 OpenAIResponseModel = "gpt-4.1-nano-2025-04-14"
const OpenAIResponseModelO4Mini OpenAIResponseModel = "o4-mini"
const OpenAIResponseModelO4Mini2025_04_16 OpenAIResponseModel = "o4-mini-2025-04-16"
const OpenAIResponseModelO3 OpenAIResponseModel = "o3"
const OpenAIResponseModelO3_2025_04_16 OpenAIResponseModel = "o3-2025-04-16"
const OpenAIResponseModelO3Mini OpenAIResponseModel = "o3-mini"
const OpenAIResponseModelO3Mini2025_01_31 OpenAIResponseModel = "o3-mini-2025-01-31"
const OpenAIResponseModelO1 OpenAIResponseModel = "o1"
const OpenAIResponseModelO1_2024_12_17 OpenAIResponseModel = "o1-2024-12-17"
const OpenAIResponseModelO1Preview OpenAIResponseModel = "o1-preview"
const OpenAIResponseModelO1Preview2024_09_12 OpenAIResponseModel = "o1-preview-2024-09-12"
const OpenAIResponseModelO1Mini OpenAIResponseModel = "o1-mini"
const OpenAIResponseModelO1Mini2024_09_12 OpenAIResponseModel = "o1-mini-2024-09-12"
const OpenAIResponseModelGpt4o OpenAIResponseModel = "gpt-4o"
const OpenAIResponseModelGpt4o2024_11_20 OpenAIResponseModel = "gpt-4o-2024-11-20"
const OpenAIResponseModelGpt4o2024_08_06 OpenAIResponseModel = "gpt-4o-2024-08-06"
const OpenAIResponseModelGpt4o2024_05_13 OpenAIResponseModel = "gpt-4o-2024-05-13"
const OpenAIResponseModelGpt4oAudioPreview OpenAIResponseModel = "gpt-4o-audio-preview"
const OpenAIResponseModelGpt4oAudioPreview2024_10_01 OpenAIResponseModel = "gpt-4o-audio-preview-2024-10-01"
const OpenAIResponseModelGpt4oAudioPreview2024_12_17 OpenAIResponseModel = "gpt-4o-audio-preview-2024-12-17"
const OpenAIResponseModelGpt4oAudioPreview2025_06_03 OpenAIResponseModel = "gpt-4o-audio-preview-2025-06-03"
const OpenAIResponseModelGpt4oMiniAudioPreview OpenAIResponseModel = "gpt-4o-mini-audio-preview"
const OpenAIResponseModelGpt4oMiniAudioPreview2024_12_17 OpenAIResponseModel = "gpt-4o-mini-audio-preview-2024-12-17"
const OpenAIResponseModelGpt4oSearchPreview OpenAIResponseModel = "gpt-4o-search-preview"
const OpenAIResponseModelGpt4oMiniSearchPreview OpenAIResponseModel = "gpt-4o-mini-search-preview"
const OpenAIResponseModelGpt4oSearchPreview2025_03_11 OpenAIResponseModel = "gpt-4o-search-preview-2025-03-11"
const OpenAIResponseModelGpt4oMiniSearchPreview2025_03_11 OpenAIResponseModel = "gpt-4o-mini-search-preview-2025-03-11"
const OpenAIResponseModelChatgpt4oLatest OpenAIResponseModel = "chatgpt-4o-latest"
const OpenAIResponseModelCodexMiniLatest OpenAIResponseModel = "codex-mini-latest"
const OpenAIResponseModelGpt4oMini OpenAIResponseModel = "gpt-4o-mini"
const OpenAIResponseModelGpt4oMini2024_07_18 OpenAIResponseModel = "gpt-4o-mini-2024-07-18"
const OpenAIResponseModelGpt4Turbo OpenAIResponseModel = "gpt-4-turbo"
const OpenAIResponseModelGpt4Turbo2024_04_09 OpenAIResponseModel = "gpt-4-turbo-2024-04-09"
const OpenAIResponseModelGpt4_0125Preview OpenAIResponseModel = "gpt-4-0125-preview"
const OpenAIResponseModelGpt4TurboPreview OpenAIResponseModel = "gpt-4-turbo-preview"
const OpenAIResponseModelGpt4_1106Preview OpenAIResponseModel = "gpt-4-1106-preview"
const OpenAIResponseModelGpt4VisionPreview OpenAIResponseModel = "gpt-4-vision-preview"
const OpenAIResponseModelGpt4 OpenAIResponseModel = "gpt-4"
const OpenAIResponseModelGpt4_0314 OpenAIResponseModel = "gpt-4-0314"
const OpenAIResponseModelGpt4_0613 OpenAIResponseModel = "gpt-4-0613"
const OpenAIResponseModelGpt4_32k OpenAIResponseModel = "gpt-4-32k"
const OpenAIResponseModelGpt4_32k0314 OpenAIResponseModel = "gpt-4-32k-0314"
const OpenAIResponseModelGpt4_32k0613 OpenAIResponseModel = "gpt-4-32k-0613"
const OpenAIResponseModelGpt3_5Turbo OpenAIResponseModel = "gpt-3.5-turbo"
const OpenAIResponseModelGpt3_5Turbo16k OpenAIResponseModel = "gpt-3.5-turbo-16k"
const OpenAIResponseModelGpt3_5Turbo0301 OpenAIResponseModel = "gpt-3.5-turbo-0301"
const OpenAIResponseModelGpt3_5Turbo0613 OpenAIResponseModel = "gpt-3.5-turbo-0613"
const OpenAIResponseModelGpt3_5Turbo1106 OpenAIResponseModel = "gpt-3.5-turbo-1106"
const OpenAIResponseModelGpt3_5Turbo0125 OpenAIResponseModel = "gpt-3.5-turbo-0125"
const OpenAIResponseModelGpt3_5Turbo16k0613 OpenAIResponseModel = "gpt-3.5-turbo-16k-0613"
const OpenAIResponseModelO1Pro OpenAIResponseModel = "o1-pro"
const OpenAIResponseModelO1Pro2025_03_19 OpenAIResponseModel = "o1-pro-2025-03-19"
const OpenAIResponseModelO3Pro OpenAIResponseModel = "o3-pro"
const OpenAIResponseModelO3Pro2025_06_10 OpenAIResponseModel = "o3-pro-2025-06-10"
const OpenAIResponseModelO3DeepResearch OpenAIResponseModel = "o3-deep-research"
const OpenAIResponseModelO3DeepResearch2025_06_26 OpenAIResponseModel = "o3-deep-research-2025-06-26"
const OpenAIResponseModelO4MiniDeepResearch OpenAIResponseModel = "o4-mini-deep-research"
const OpenAIResponseModelO4MiniDeepResearch2025_06_26 OpenAIResponseModel = "o4-mini-deep-research-2025-06-26"
const OpenAIResponseModelComputerUsePreview OpenAIResponseModel = "computer-use-preview"
const OpenAIResponseModelComputerUsePreview2025_03_11 OpenAIResponseModel = "computer-use-preview-2025-03-11"
const OpenAIResponseModelGpt5Codex OpenAIResponseModel = "gpt-5-codex"
const OpenAIResponseModelGpt5Pro OpenAIResponseModel = "gpt-5-pro"
const OpenAIResponseModelGpt5Pro2025_10_06 OpenAIResponseModel = "gpt-5-pro-2025-10-06"
const OpenAIResponseModelGpt5_1CodexMax OpenAIResponseModel = "gpt-5.1-codex-max"
string
Object Response
Output []OpenAIResponseOutputUnion
One of the following:
type OpenAIResponseOutputMessage struct{…}

An output message from the model.

ID string
Content []OpenAIResponseOutputMessageContentUnion
One of the following:
type OpenAIResponseOutputText struct{…}

A text output from the model.

Annotations []OpenAIResponseOutputTextAnnotationUnion
One of the following:
type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []OpenAIResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type OpenAIResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string
Type Refusal
Role Assistant
Status OpenAIResponseOutputMessageStatus
One of the following:
const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"
const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"
const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"
Type Message
Phase OpenAIResponseOutputMessagePhaseOptional
One of the following:
const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"
const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"
type OpenAIResponseFileSearchToolCall struct{…}

The results of a file search tool call.

See the file search guide for more information.

ID string
Queries []string
Status OpenAIResponseFileSearchToolCallStatus
One of the following:
const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"
const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"
const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"
const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"
const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"
Type FileSearchCall
Results []OpenAIResponseFileSearchToolCallResultOptional
Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]Optional
One of the following:
string
float64
bool
FileID stringOptional
Filename stringOptional
Score float64Optional
Text stringOptional
type OpenAIResponseFunctionToolCall struct{…}

A tool call to run a function.

See the function calling guide for more information.

Arguments string
CallID string
Name string
Type FunctionCall
ID stringOptional
Status OpenAIResponseFunctionToolCallStatusOptional
One of the following:
const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"
const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"
const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"
One of the following:
One of the following:
type OpenAIResponseComputerToolCall struct{…}

A tool call to a computer use tool.

See the computer use guide for more information.

ID string
Action OpenAIResponseComputerToolCallActionUnion

A click action.

One of the following:
type OpenAIResponseComputerToolCallActionActionClick struct{…}

A click action.

Button string
One of the following:
const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"
const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"
const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"
const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"
const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"
Type Click
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}

A double click action.

Type DoubleClick
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDrag struct{…}

A drag action.

Path []OpenAIResponseComputerToolCallActionActionDragPath
X int64
Y int64
Type Drag
type OpenAIResponseComputerToolCallActionActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string
Type Keypress
type OpenAIResponseComputerToolCallActionActionMove struct{…}

A mouse move action.

Type Move
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}

A screenshot action.

Type Screenshot
type OpenAIResponseComputerToolCallActionActionScroll struct{…}

A scroll action.

ScrollX int64
ScrollY int64
Type Scroll
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionType struct{…}

An action to type in text.

Text string
Type Type
type OpenAIResponseComputerToolCallActionActionWait struct{…}

A wait action.

Type Wait
CallID string
PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck
ID string
Code stringOptional
Message stringOptional
Status OpenAIResponseComputerToolCallStatus
One of the following:
const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"
const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"
const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"
Type ComputerCall
type OpenAIResponseReasoningItem struct{…}

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.

ID string
Summary []OpenAIResponseReasoningItemSummary
Text string
Type SummaryText
Type Reasoning
Content []OpenAIResponseReasoningItemContentOptional
Text string
Type ReasoningText
EncryptedContent stringOptional
Status OpenAIResponseReasoningItemStatusOptional
One of the following:
const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"
const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"
const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"
type ResponseCompactionItem struct{…}

A compaction item generated by the v1/responses/compact API.

ID string
EncryptedContent string
Type Compaction
CreatedBy stringOptional
type OpenAITypesResponsesResponseOutputItemImageGenerationCall struct{…}

An image generation request made by the model.

ID string
Status OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus
One of the following:
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "generating"
const OpenAITypesResponsesResponseOutputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseOutputItemImageGenerationCallStatus = "failed"
Type ImageGenerationCall
Result stringOptional
type OpenAIResponseCodeInterpreterToolCall struct{…}

A tool call to run code.

ID string
ContainerID string
Status OpenAIResponseCodeInterpreterToolCallStatus
One of the following:
const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"
const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"
const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"
const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"
const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"
Type CodeInterpreterCall
Code stringOptional
Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnionOptional
One of the following:
type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}

The logs output from the code interpreter.

Logs string
Type Logs
type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}

The image output from the code interpreter.

Type Image
URL string
type OpenAITypesResponsesResponseOutputItemLocalShellCall struct{…}

A tool call to run a command on the local shell.

ID string
Action OpenAITypesResponsesResponseOutputItemLocalShellCallAction

Execute a shell command on the server.

Command []string
Env map[string, string]
Type Exec
TimeoutMs int64Optional
User stringOptional
WorkingDirectory stringOptional
CallID string
Status OpenAITypesResponsesResponseOutputItemLocalShellCallStatus
One of the following:
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseOutputItemLocalShellCallStatus = "incomplete"
Type LocalShellCall
type ResponseFunctionShellToolCall struct{…}

A tool call that executes one or more shell commands in a managed environment.

ID string
Action ResponseFunctionShellToolCallAction

The shell commands and limits that describe how to run the tool call.

Commands []string
MaxOutputLength int64Optional
TimeoutMs int64Optional
CallID string
Status ResponseFunctionShellToolCallStatus
One of the following:
const ResponseFunctionShellToolCallStatusInProgress ResponseFunctionShellToolCallStatus = "in_progress"
const ResponseFunctionShellToolCallStatusCompleted ResponseFunctionShellToolCallStatus = "completed"
const ResponseFunctionShellToolCallStatusIncomplete ResponseFunctionShellToolCallStatus = "incomplete"
Type ShellCall
CreatedBy stringOptional
Environment ResponseFunctionShellToolCallEnvironmentUnionOptional

Represents the use of a local environment to perform shell actions.

One of the following:
type ResponseFunctionShellToolCallEnvironmentResponseLocalEnvironment struct{…}

Represents the use of a local environment to perform shell actions.

Type Local
type ResponseFunctionShellToolCallEnvironmentResponseContainerReference struct{…}

Represents a container created with /v1/containers.

ContainerID string
Type ContainerReference
type ResponseFunctionShellToolCallOutput struct{…}

The output of a shell tool call that was emitted.

ID string
CallID string
Output []ResponseFunctionShellToolCallOutputOutput
Outcome ResponseFunctionShellToolCallOutputOutputOutcomeUnion

Indicates that the shell call exceeded its configured time limit.

One of the following:
type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeTimeout struct{…}

Indicates that the shell call exceeded its configured time limit.

Type Timeout
type ResponseFunctionShellToolCallOutputOutputOutcomeOutputOutcomeExit struct{…}

Indicates that the shell commands finished and returned an exit code.

ExitCode int64
Type Exit
Stderr string
Stdout string
CreatedBy stringOptional
Status ResponseFunctionShellToolCallOutputStatus
One of the following:
const ResponseFunctionShellToolCallOutputStatusInProgress ResponseFunctionShellToolCallOutputStatus = "in_progress"
const ResponseFunctionShellToolCallOutputStatusCompleted ResponseFunctionShellToolCallOutputStatus = "completed"
const ResponseFunctionShellToolCallOutputStatusIncomplete ResponseFunctionShellToolCallOutputStatus = "incomplete"
Type ShellCallOutput
CreatedBy stringOptional
MaxOutputLength int64Optional
type ResponseApplyPatchToolCall struct{…}

A tool call that applies file diffs by creating, deleting, or updating files.

ID string
CallID string
Operation ResponseApplyPatchToolCallOperationUnion

Instruction describing how to create a file via the apply_patch tool.

One of the following:
type ResponseApplyPatchToolCallOperationOperationCreateFile struct{…}

Instruction describing how to create a file via the apply_patch tool.

Diff string
Path string
Type CreateFile
type ResponseApplyPatchToolCallOperationOperationDeleteFile struct{…}

Instruction describing how to delete a file via the apply_patch tool.

Path string
Type DeleteFile
type ResponseApplyPatchToolCallOperationOperationUpdateFile struct{…}

Instruction describing how to update a file via the apply_patch tool.

Diff string
Path string
Type UpdateFile
Status ResponseApplyPatchToolCallStatus
One of the following:
const ResponseApplyPatchToolCallStatusInProgress ResponseApplyPatchToolCallStatus = "in_progress"
const ResponseApplyPatchToolCallStatusCompleted ResponseApplyPatchToolCallStatus = "completed"
Type ApplyPatchCall
CreatedBy stringOptional
type ResponseApplyPatchToolCallOutput struct{…}

The output emitted by an apply patch tool call.

ID string
CallID string
Status ResponseApplyPatchToolCallOutputStatus
One of the following:
const ResponseApplyPatchToolCallOutputStatusCompleted ResponseApplyPatchToolCallOutputStatus = "completed"
const ResponseApplyPatchToolCallOutputStatusFailed ResponseApplyPatchToolCallOutputStatus = "failed"
Type ApplyPatchCallOutput
CreatedBy stringOptional
Output stringOptional
type OpenAITypesResponsesResponseOutputItemMcpCall struct{…}

An invocation of a tool on an MCP server.

ID string
Arguments string
Name string
ServerLabel string
Type McpCall
ApprovalRequestID stringOptional
Error stringOptional
Output stringOptional
Status OpenAITypesResponsesResponseOutputItemMcpCallStatusOptional
One of the following:
const OpenAITypesResponsesResponseOutputItemMcpCallStatusInProgress OpenAITypesResponsesResponseOutputItemMcpCallStatus = "in_progress"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusCompleted OpenAITypesResponsesResponseOutputItemMcpCallStatus = "completed"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseOutputItemMcpCallStatus = "incomplete"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusCalling OpenAITypesResponsesResponseOutputItemMcpCallStatus = "calling"
const OpenAITypesResponsesResponseOutputItemMcpCallStatusFailed OpenAITypesResponsesResponseOutputItemMcpCallStatus = "failed"
type OpenAITypesResponsesResponseOutputItemMcpListTools struct{…}

A list of tools available on an MCP server.

ID string
ServerLabel string
Tools []OpenAITypesResponsesResponseOutputItemMcpListToolsTool
InputSchema any
Name string
Annotations anyOptional
Description stringOptional
Type McpListTools
Error stringOptional
type McpApprovalRequest struct{…}

A request for human approval of a tool invocation.

ID string
Arguments string
Name string
ServerLabel string
Type McpApprovalRequest
type OpenAIResponseCustomToolCall struct{…}

A call to a custom tool created by the model.

CallID string
Input string
Name string
Type CustomToolCall
ID stringOptional
ParallelToolCalls bool
ToolChoice OpenAIResponseToolChoiceUnion

Constrains the tools available to the model to a pre-defined set.

One of the following:
type OpenAIResponseToolChoiceString string
One of the following:
const OpenAIResponseToolChoiceStringNone OpenAIResponseToolChoiceString = "none"
const OpenAIResponseToolChoiceStringAuto OpenAIResponseToolChoiceString = "auto"
const OpenAIResponseToolChoiceStringRequired OpenAIResponseToolChoiceString = "required"
type ToolChoiceAllowed struct{…}

Constrains the tools available to the model to a pre-defined set.

Mode ToolChoiceAllowedMode
One of the following:
const ToolChoiceAllowedModeAuto ToolChoiceAllowedMode = "auto"
const ToolChoiceAllowedModeRequired ToolChoiceAllowedMode = "required"
Tools []map[string, any]
Type AllowedTools
type ToolChoiceTypes struct{…}

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

Type ToolChoiceTypesType
One of the following:
const ToolChoiceTypesTypeFileSearch ToolChoiceTypesType = "file_search"
const ToolChoiceTypesTypeWebSearchPreview ToolChoiceTypesType = "web_search_preview"
const ToolChoiceTypesTypeComputerUsePreview ToolChoiceTypesType = "computer_use_preview"
const ToolChoiceTypesTypeWebSearchPreview2025_03_11 ToolChoiceTypesType = "web_search_preview_2025_03_11"
const ToolChoiceTypesTypeImageGeneration ToolChoiceTypesType = "image_generation"
const ToolChoiceTypesTypeCodeInterpreter ToolChoiceTypesType = "code_interpreter"
type ToolChoiceFunction struct{…}

Use this option to force the model to call a specific function.

Name string
Type Function
type ToolChoiceMcp struct{…}

Use this option to force the model to call a specific tool on a remote MCP server.

ServerLabel string
Type Mcp
Name stringOptional
type ToolChoiceCustom struct{…}

Use this option to force the model to call a specific custom tool.

Name string
Type Custom
type ToolChoiceApplyPatch struct{…}

Forces the model to call the apply_patch tool when executing a tool call.

Type ApplyPatch
type ToolChoiceShell struct{…}

Forces the model to call the shell tool when a tool call is required.

Type Shell
Tools []OpenAIResponseToolUnion
One of the following:
type FunctionTool struct{…}

Defines a function in your own code the model can choose to call.

Learn more about function calling.

Name string
Type Function
Description stringOptional
Parameters map[string, any]Optional
Strict boolOptional
type FileSearchTool struct{…}

A tool that searches for relevant content from uploaded files.

Learn more about the file search tool.

Type FileSearch
VectorStoreIDs []string
Filters FileSearchToolFiltersUnionOptional

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

One of the following:
type FileSearchToolFiltersComparisonFilter struct{…}

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

Key string
Type string
One of the following:
const FileSearchToolFiltersComparisonFilterTypeEq FileSearchToolFiltersComparisonFilterType = "eq"
const FileSearchToolFiltersComparisonFilterTypeNe FileSearchToolFiltersComparisonFilterType = "ne"
const FileSearchToolFiltersComparisonFilterTypeGt FileSearchToolFiltersComparisonFilterType = "gt"
const FileSearchToolFiltersComparisonFilterTypeGte FileSearchToolFiltersComparisonFilterType = "gte"
const FileSearchToolFiltersComparisonFilterTypeLt FileSearchToolFiltersComparisonFilterType = "lt"
const FileSearchToolFiltersComparisonFilterTypeLte FileSearchToolFiltersComparisonFilterType = "lte"
Value FileSearchToolFiltersComparisonFilterValueUnion
One of the following:
string
float64
bool
type FileSearchToolFiltersComparisonFilterValueArray []FileSearchToolFiltersComparisonFilterValueArrayItemUnion
One of the following:
string
float64
type FileSearchToolFiltersCompoundFilter struct{…}

Combine multiple filters using and or or.

Filters []FileSearchToolFiltersCompoundFilterFilter
One of the following:
type FileSearchToolFiltersCompoundFilterFilter struct{…}

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

Key string
Type string
One of the following:
const FileSearchToolFiltersCompoundFilterFilterTypeEq FileSearchToolFiltersCompoundFilterFilterType = "eq"
const FileSearchToolFiltersCompoundFilterFilterTypeNe FileSearchToolFiltersCompoundFilterFilterType = "ne"
const FileSearchToolFiltersCompoundFilterFilterTypeGt FileSearchToolFiltersCompoundFilterFilterType = "gt"
const FileSearchToolFiltersCompoundFilterFilterTypeGte FileSearchToolFiltersCompoundFilterFilterType = "gte"
const FileSearchToolFiltersCompoundFilterFilterTypeLt FileSearchToolFiltersCompoundFilterFilterType = "lt"
const FileSearchToolFiltersCompoundFilterFilterTypeLte FileSearchToolFiltersCompoundFilterFilterType = "lte"
Value FileSearchToolFiltersCompoundFilterFilterValueUnion
One of the following:
string
float64
bool
type FileSearchToolFiltersCompoundFilterFilterValueArray []FileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion
One of the following:
string
float64
Type string
One of the following:
const FileSearchToolFiltersCompoundFilterTypeAnd FileSearchToolFiltersCompoundFilterType = "and"
const FileSearchToolFiltersCompoundFilterTypeOr FileSearchToolFiltersCompoundFilterType = "or"
MaxNumResults int64Optional
RankingOptions FileSearchToolRankingOptionsOptional

Ranking options for search.

Ranker stringOptional
One of the following:
const FileSearchToolRankingOptionsRankerAuto FileSearchToolRankingOptionsRanker = "auto"
const FileSearchToolRankingOptionsRankerDefault2024_11_15 FileSearchToolRankingOptionsRanker = "default-2024-11-15"
ScoreThreshold float64Optional
type ComputerTool struct{…}

A tool that controls a virtual computer.

Learn more about the computer tool.

DisplayHeight int64
DisplayWidth int64
Environment ComputerToolEnvironment
One of the following:
const ComputerToolEnvironmentWindows ComputerToolEnvironment = "windows"
const ComputerToolEnvironmentMac ComputerToolEnvironment = "mac"
const ComputerToolEnvironmentLinux ComputerToolEnvironment = "linux"
const ComputerToolEnvironmentUbuntu ComputerToolEnvironment = "ubuntu"
const ComputerToolEnvironmentBrowser ComputerToolEnvironment = "browser"
Type ComputerUsePreview
type WebSearchTool struct{…}

Search the Internet for sources related to the prompt.

Learn more about the web search tool.

Type WebSearchToolType
One of the following:
const WebSearchToolTypeWebSearch WebSearchToolType = "web_search"
const WebSearchToolTypeWebSearch2025_08_26 WebSearchToolType = "web_search_2025_08_26"
Filters WebSearchToolFiltersOptional

Filters for the search.

AllowedDomains []stringOptional
SearchContextSize WebSearchToolSearchContextSizeOptional
One of the following:
const WebSearchToolSearchContextSizeLow WebSearchToolSearchContextSize = "low"
const WebSearchToolSearchContextSizeMedium WebSearchToolSearchContextSize = "medium"
const WebSearchToolSearchContextSizeHigh WebSearchToolSearchContextSize = "high"
UserLocation WebSearchToolUserLocationOptional

The approximate location of the user.

City stringOptional
Country stringOptional
Region stringOptional
Timezone stringOptional
Type stringOptional
type OpenAIResponseToolMcp struct{…}

Give the model access to additional tools via remote Model Context Protocol (MCP) servers. Learn more about MCP.

ServerLabel string
Type Mcp
AllowedTools OpenAIResponseToolMcpAllowedToolsUnionOptional

A filter object to specify which tools are allowed.

One of the following:
type OpenAIResponseToolMcpAllowedToolsArray []string
type OpenAIResponseToolMcpAllowedToolsMcpAllowedToolsMcpToolFilter struct{…}

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
Authorization stringOptional
ConnectorID stringOptional
One of the following:
const OpenAIResponseToolMcpConnectorIDConnectorDropbox OpenAIResponseToolMcpConnectorID = "connector_dropbox"
const OpenAIResponseToolMcpConnectorIDConnectorGmail OpenAIResponseToolMcpConnectorID = "connector_gmail"
const OpenAIResponseToolMcpConnectorIDConnectorGooglecalendar OpenAIResponseToolMcpConnectorID = "connector_googlecalendar"
const OpenAIResponseToolMcpConnectorIDConnectorGoogledrive OpenAIResponseToolMcpConnectorID = "connector_googledrive"
const OpenAIResponseToolMcpConnectorIDConnectorMicrosoftteams OpenAIResponseToolMcpConnectorID = "connector_microsoftteams"
const OpenAIResponseToolMcpConnectorIDConnectorOutlookcalendar OpenAIResponseToolMcpConnectorID = "connector_outlookcalendar"
const OpenAIResponseToolMcpConnectorIDConnectorOutlookemail OpenAIResponseToolMcpConnectorID = "connector_outlookemail"
const OpenAIResponseToolMcpConnectorIDConnectorSharepoint OpenAIResponseToolMcpConnectorID = "connector_sharepoint"
Headers map[string, string]Optional
RequireApproval OpenAIResponseToolMcpRequireApprovalUnionOptional

Specify which of the MCP server’s tools require approval.

Can be always, never, or a filter object associated with tools that require approval.

One of the following:
type OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilter struct{…}

Specify which of the MCP server’s tools require approval.

Can be always, never, or a filter object associated with tools that require approval.

Always OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilterAlwaysOptional

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
Never OpenAIResponseToolMcpRequireApprovalMcpRequireApprovalMcpToolApprovalFilterNeverOptional

A filter object to specify which tools are allowed.

ReadOnly boolOptional
ToolNames []stringOptional
type OpenAIResponseToolMcpRequireApprovalString string
One of the following:
const OpenAIResponseToolMcpRequireApprovalStringAlways OpenAIResponseToolMcpRequireApprovalString = "always"
const OpenAIResponseToolMcpRequireApprovalStringNever OpenAIResponseToolMcpRequireApprovalString = "never"
ServerDescription stringOptional
ServerURL stringOptional
type OpenAIResponseToolCodeInterpreter struct{…}

A tool that runs Python code to help generate a response to a prompt.

Container OpenAIResponseToolCodeInterpreterContainerUnion

Configuration for a code interpreter container.

Optionally specify the IDs of the files to run the code on.

One of the following:
string
type OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAuto struct{…}

Configuration for a code interpreter container.

Optionally specify the IDs of the files to run the code on.

Type Auto
FileIDs []stringOptional
MemoryLimit stringOptional
One of the following:
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"
const OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"
NetworkPolicy OpenAIResponseToolCodeInterpreterContainerCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnionOptional
One of the following:
type ContainerNetworkPolicyDisabled struct{…}
Type Disabled
type ContainerNetworkPolicyAllowlist struct{…}
AllowedDomains []string
Type Allowlist
DomainSecrets []ContainerNetworkPolicyAllowlistDomainSecretOptional
Domain string
Name string
Value string
Type CodeInterpreter
type OpenAIResponseToolImageGeneration struct{…}

A tool that generates images using the GPT image models.

Type ImageGeneration
Action stringOptional
One of the following:
const OpenAIResponseToolImageGenerationActionGenerate OpenAIResponseToolImageGenerationAction = "generate"
const OpenAIResponseToolImageGenerationActionEdit OpenAIResponseToolImageGenerationAction = "edit"
const OpenAIResponseToolImageGenerationActionAuto OpenAIResponseToolImageGenerationAction = "auto"
Background stringOptional
One of the following:
const OpenAIResponseToolImageGenerationBackgroundTransparent OpenAIResponseToolImageGenerationBackground = "transparent"
const OpenAIResponseToolImageGenerationBackgroundOpaque OpenAIResponseToolImageGenerationBackground = "opaque"
const OpenAIResponseToolImageGenerationBackgroundAuto OpenAIResponseToolImageGenerationBackground = "auto"
InputFidelity stringOptional
One of the following:
const OpenAIResponseToolImageGenerationInputFidelityHigh OpenAIResponseToolImageGenerationInputFidelity = "high"
const OpenAIResponseToolImageGenerationInputFidelityLow OpenAIResponseToolImageGenerationInputFidelity = "low"
InputImageMask OpenAIResponseToolImageGenerationInputImageMaskOptional

Optional mask for inpainting.

Contains image_url (string, optional) and file_id (string, optional).

FileID stringOptional
ImageURL stringOptional
Model stringOptional
One of the following:
string
string
One of the following:
const OpenAIResponseToolImageGenerationModelGptImage1 OpenAIResponseToolImageGenerationModel = "gpt-image-1"
const OpenAIResponseToolImageGenerationModelGptImage1Mini OpenAIResponseToolImageGenerationModel = "gpt-image-1-mini"
const OpenAIResponseToolImageGenerationModelGptImage1_5 OpenAIResponseToolImageGenerationModel = "gpt-image-1.5"
Moderation stringOptional
One of the following:
const OpenAIResponseToolImageGenerationModerationAuto OpenAIResponseToolImageGenerationModeration = "auto"
const OpenAIResponseToolImageGenerationModerationLow OpenAIResponseToolImageGenerationModeration = "low"
OutputCompression int64Optional
OutputFormat stringOptional
One of the following:
const OpenAIResponseToolImageGenerationOutputFormatPng OpenAIResponseToolImageGenerationOutputFormat = "png"
const OpenAIResponseToolImageGenerationOutputFormatWebp OpenAIResponseToolImageGenerationOutputFormat = "webp"
const OpenAIResponseToolImageGenerationOutputFormatJpeg OpenAIResponseToolImageGenerationOutputFormat = "jpeg"
PartialImages int64Optional
Quality stringOptional
One of the following:
const OpenAIResponseToolImageGenerationQualityLow OpenAIResponseToolImageGenerationQuality = "low"
const OpenAIResponseToolImageGenerationQualityMedium OpenAIResponseToolImageGenerationQuality = "medium"
const OpenAIResponseToolImageGenerationQualityHigh OpenAIResponseToolImageGenerationQuality = "high"
const OpenAIResponseToolImageGenerationQualityAuto OpenAIResponseToolImageGenerationQuality = "auto"
Size stringOptional
One of the following:
const OpenAIResponseToolImageGenerationSize1024x1024 OpenAIResponseToolImageGenerationSize = "1024x1024"
const OpenAIResponseToolImageGenerationSize1024x1536 OpenAIResponseToolImageGenerationSize = "1024x1536"
const OpenAIResponseToolImageGenerationSize1536x1024 OpenAIResponseToolImageGenerationSize = "1536x1024"
const OpenAIResponseToolImageGenerationSizeAuto OpenAIResponseToolImageGenerationSize = "auto"
type OpenAIResponseToolLocalShell struct{…}

A tool that allows the model to execute shell commands in a local environment.

Type LocalShell
type FunctionShellTool struct{…}

A tool that allows the model to execute shell commands.

Type Shell
Environment FunctionShellToolEnvironmentUnionOptional
One of the following:
type FunctionShellToolEnvironmentContainerAuto struct{…}
Type ContainerAuto
FileIDs []stringOptional
MemoryLimit stringOptional
One of the following:
const FunctionShellToolEnvironmentContainerAutoMemoryLimit1g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "1g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit4g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "4g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit16g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "16g"
const FunctionShellToolEnvironmentContainerAutoMemoryLimit64g FunctionShellToolEnvironmentContainerAutoMemoryLimit = "64g"
NetworkPolicy FunctionShellToolEnvironmentContainerAutoNetworkPolicyUnionOptional
One of the following:
type ContainerNetworkPolicyDisabled struct{…}
Type Disabled
type ContainerNetworkPolicyAllowlist struct{…}
AllowedDomains []string
Type Allowlist
DomainSecrets []ContainerNetworkPolicyAllowlistDomainSecretOptional
Domain string
Name string
Value string
Skills []FunctionShellToolEnvironmentContainerAutoSkillUnionOptional
One of the following:
type FunctionShellToolEnvironmentContainerAutoSkillSkillReference struct{…}
SkillID string
Type SkillReference
Version stringOptional
type FunctionShellToolEnvironmentContainerAutoSkillInlineSkill struct{…}
Description string
Name string
Source FunctionShellToolEnvironmentContainerAutoSkillInlineSkillSource

Inline skill payload

Data string
MediaType ApplicationZip
Type Base64
Type Inline
type LocalEnvironment struct{…}
Type Local
Skills []LocalEnvironmentSkillOptional
Description string
Name string
Path string
type ContainerReference struct{…}
ContainerID string
Type ContainerReference
type CustomTool struct{…}

A custom tool that processes input using a specified format.

Learn more about custom tools

Name string
Type Custom
Description stringOptional
Format CustomToolFormatUnionOptional

Unconstrained free-form text.

One of the following:
type CustomToolFormatText struct{…}

Unconstrained free-form text.

Type Text
type CustomToolFormatGrammar struct{…}

A grammar defined by the user.

Definition string
Syntax string
One of the following:
const CustomToolFormatGrammarSyntaxLark CustomToolFormatGrammarSyntax = "lark"
const CustomToolFormatGrammarSyntaxRegex CustomToolFormatGrammarSyntax = "regex"
Type Grammar
type WebSearchPreviewTool struct{…}

This tool searches the web for relevant results to use in a response.

Learn more about the web search tool.

Type WebSearchPreviewToolType
One of the following:
const WebSearchPreviewToolTypeWebSearchPreview WebSearchPreviewToolType = "web_search_preview"
const WebSearchPreviewToolTypeWebSearchPreview2025_03_11 WebSearchPreviewToolType = "web_search_preview_2025_03_11"
SearchContextSize WebSearchPreviewToolSearchContextSizeOptional
One of the following:
const WebSearchPreviewToolSearchContextSizeLow WebSearchPreviewToolSearchContextSize = "low"
const WebSearchPreviewToolSearchContextSizeMedium WebSearchPreviewToolSearchContextSize = "medium"
const WebSearchPreviewToolSearchContextSizeHigh WebSearchPreviewToolSearchContextSize = "high"
UserLocation WebSearchPreviewToolUserLocationOptional

The user’s location.

Type Approximate
City stringOptional
Country stringOptional
Region stringOptional
Timezone stringOptional
type ApplyPatchTool struct{…}

Allows the assistant to create, delete, or update files using unified diffs.

Type ApplyPatch
Background boolOptional
CompletedAt float64Optional
Conversation ConversationOptional

The conversation that this response belonged to.

Input items and output items from this response were automatically added to this conversation.

ID string
Error OpenAIResponseErrorOptional

An error object returned when the model fails to generate a Response.

Code OpenAIResponseErrorCode
One of the following:
const OpenAIResponseErrorCodeServerError OpenAIResponseErrorCode = "server_error"
const OpenAIResponseErrorCodeRateLimitExceeded OpenAIResponseErrorCode = "rate_limit_exceeded"
const OpenAIResponseErrorCodeInvalidPrompt OpenAIResponseErrorCode = "invalid_prompt"
const OpenAIResponseErrorCodeVectorStoreTimeout OpenAIResponseErrorCode = "vector_store_timeout"
const OpenAIResponseErrorCodeInvalidImage OpenAIResponseErrorCode = "invalid_image"
const OpenAIResponseErrorCodeInvalidImageFormat OpenAIResponseErrorCode = "invalid_image_format"
const OpenAIResponseErrorCodeInvalidBase64Image OpenAIResponseErrorCode = "invalid_base64_image"
const OpenAIResponseErrorCodeInvalidImageURL OpenAIResponseErrorCode = "invalid_image_url"
const OpenAIResponseErrorCodeImageTooLarge OpenAIResponseErrorCode = "image_too_large"
const OpenAIResponseErrorCodeImageTooSmall OpenAIResponseErrorCode = "image_too_small"
const OpenAIResponseErrorCodeImageParseError OpenAIResponseErrorCode = "image_parse_error"
const OpenAIResponseErrorCodeImageContentPolicyViolation OpenAIResponseErrorCode = "image_content_policy_violation"
const OpenAIResponseErrorCodeInvalidImageMode OpenAIResponseErrorCode = "invalid_image_mode"
const OpenAIResponseErrorCodeImageFileTooLarge OpenAIResponseErrorCode = "image_file_too_large"
const OpenAIResponseErrorCodeUnsupportedImageMediaType OpenAIResponseErrorCode = "unsupported_image_media_type"
const OpenAIResponseErrorCodeEmptyImageFile OpenAIResponseErrorCode = "empty_image_file"
const OpenAIResponseErrorCodeFailedToDownloadImage OpenAIResponseErrorCode = "failed_to_download_image"
const OpenAIResponseErrorCodeImageFileNotFound OpenAIResponseErrorCode = "image_file_not_found"
Message string
IncompleteDetails IncompleteDetailsOptional

Details about why the response is incomplete.

Reason IncompleteDetailsReasonOptional
One of the following:
const IncompleteDetailsReasonMaxOutputTokens IncompleteDetailsReason = "max_output_tokens"
const IncompleteDetailsReasonContentFilter IncompleteDetailsReason = "content_filter"
Instructions OpenAIResponseInstructionsUnionOptional
One of the following:
string
type OpenAIResponseInstructionsInputItems []OpenAIResponseInstructionsInputItemUnion
One of the following:
type EasyInputMessage struct{…}

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 EasyInputMessageContentUnion
One of the following:
string
type EasyInputMessageContentInputItems []EasyInputMessageContentInputItemUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Role EasyInputMessageRole
One of the following:
const EasyInputMessageRoleUser EasyInputMessageRole = "user"
const EasyInputMessageRoleAssistant EasyInputMessageRole = "assistant"
const EasyInputMessageRoleSystem EasyInputMessageRole = "system"
const EasyInputMessageRoleDeveloper EasyInputMessageRole = "developer"
Phase EasyInputMessagePhaseOptional
One of the following:
const EasyInputMessagePhaseCommentary EasyInputMessagePhase = "commentary"
const EasyInputMessagePhaseFinalAnswer EasyInputMessagePhase = "final_answer"
Type EasyInputMessageTypeOptional
type OpenAITypesResponsesResponseInputItemMessage struct{…}

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 []OpenAITypesResponsesResponseInputItemMessageContentUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Role OpenAITypesResponsesResponseInputItemMessageRole
One of the following:
const OpenAITypesResponsesResponseInputItemMessageRoleUser OpenAITypesResponsesResponseInputItemMessageRole = "user"
const OpenAITypesResponsesResponseInputItemMessageRoleSystem OpenAITypesResponsesResponseInputItemMessageRole = "system"
const OpenAITypesResponsesResponseInputItemMessageRoleDeveloper OpenAITypesResponsesResponseInputItemMessageRole = "developer"
Status OpenAITypesResponsesResponseInputItemMessageStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemMessageStatusInProgress OpenAITypesResponsesResponseInputItemMessageStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemMessageStatusCompleted OpenAITypesResponsesResponseInputItemMessageStatus = "completed"
const OpenAITypesResponsesResponseInputItemMessageStatusIncomplete OpenAITypesResponsesResponseInputItemMessageStatus = "incomplete"
Type OpenAITypesResponsesResponseInputItemMessageTypeOptional
type OpenAIResponseOutputMessage struct{…}

An output message from the model.

ID string
Content []OpenAIResponseOutputMessageContentUnion
One of the following:
type OpenAIResponseOutputText struct{…}

A text output from the model.

Annotations []OpenAIResponseOutputTextAnnotationUnion
One of the following:
type OpenAIResponseOutputTextAnnotationAnnotationFileCitation struct{…}

A citation to a file.

FileID string
Filename string
Index int64
Type FileCitation
type OpenAIResponseOutputTextAnnotationAnnotationURLCitation struct{…}

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

EndIndex int64
StartIndex int64
Title string
Type URLCitation
URL string
type OpenAIResponseOutputTextAnnotationAnnotationContainerFileCitation struct{…}

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

ContainerID string
EndIndex int64
FileID string
Filename string
StartIndex int64
Type ContainerFileCitation
type OpenAIResponseOutputTextAnnotationAnnotationFilePath struct{…}

A path to a file.

FileID string
Index int64
Type FilePath
Text string
Type OutputText
Logprobs []OpenAIResponseOutputTextLogprobOptional
Token string
Bytes []int64
Logprob float64
TopLogprobs []OpenAIResponseOutputTextLogprobTopLogprob
Token string
Bytes []int64
Logprob float64
type OpenAIResponseOutputRefusal struct{…}

A refusal from the model.

Refusal string
Type Refusal
Role Assistant
Status OpenAIResponseOutputMessageStatus
One of the following:
const OpenAIResponseOutputMessageStatusInProgress OpenAIResponseOutputMessageStatus = "in_progress"
const OpenAIResponseOutputMessageStatusCompleted OpenAIResponseOutputMessageStatus = "completed"
const OpenAIResponseOutputMessageStatusIncomplete OpenAIResponseOutputMessageStatus = "incomplete"
Type Message
Phase OpenAIResponseOutputMessagePhaseOptional
One of the following:
const OpenAIResponseOutputMessagePhaseCommentary OpenAIResponseOutputMessagePhase = "commentary"
const OpenAIResponseOutputMessagePhaseFinalAnswer OpenAIResponseOutputMessagePhase = "final_answer"
type OpenAIResponseFileSearchToolCall struct{…}

The results of a file search tool call.

See the file search guide for more information.

ID string
Queries []string
Status OpenAIResponseFileSearchToolCallStatus
One of the following:
const OpenAIResponseFileSearchToolCallStatusInProgress OpenAIResponseFileSearchToolCallStatus = "in_progress"
const OpenAIResponseFileSearchToolCallStatusSearching OpenAIResponseFileSearchToolCallStatus = "searching"
const OpenAIResponseFileSearchToolCallStatusCompleted OpenAIResponseFileSearchToolCallStatus = "completed"
const OpenAIResponseFileSearchToolCallStatusIncomplete OpenAIResponseFileSearchToolCallStatus = "incomplete"
const OpenAIResponseFileSearchToolCallStatusFailed OpenAIResponseFileSearchToolCallStatus = "failed"
Type FileSearchCall
Results []OpenAIResponseFileSearchToolCallResultOptional
Attributes map[string, OpenAIResponseFileSearchToolCallResultAttributeUnion]Optional
One of the following:
string
float64
bool
FileID stringOptional
Filename stringOptional
Score float64Optional
Text stringOptional
type OpenAIResponseComputerToolCall struct{…}

A tool call to a computer use tool.

See the computer use guide for more information.

ID string
Action OpenAIResponseComputerToolCallActionUnion

A click action.

One of the following:
type OpenAIResponseComputerToolCallActionActionClick struct{…}

A click action.

Button string
One of the following:
const OpenAIResponseComputerToolCallActionActionClickButtonLeft OpenAIResponseComputerToolCallActionActionClickButton = "left"
const OpenAIResponseComputerToolCallActionActionClickButtonRight OpenAIResponseComputerToolCallActionActionClickButton = "right"
const OpenAIResponseComputerToolCallActionActionClickButtonWheel OpenAIResponseComputerToolCallActionActionClickButton = "wheel"
const OpenAIResponseComputerToolCallActionActionClickButtonBack OpenAIResponseComputerToolCallActionActionClickButton = "back"
const OpenAIResponseComputerToolCallActionActionClickButtonForward OpenAIResponseComputerToolCallActionActionClickButton = "forward"
Type Click
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDoubleClick struct{…}

A double click action.

Type DoubleClick
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionDrag struct{…}

A drag action.

Path []OpenAIResponseComputerToolCallActionActionDragPath
X int64
Y int64
Type Drag
type OpenAIResponseComputerToolCallActionActionKeypress struct{…}

A collection of keypresses the model would like to perform.

Keys []string
Type Keypress
type OpenAIResponseComputerToolCallActionActionMove struct{…}

A mouse move action.

Type Move
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionScreenshot struct{…}

A screenshot action.

Type Screenshot
type OpenAIResponseComputerToolCallActionActionScroll struct{…}

A scroll action.

ScrollX int64
ScrollY int64
Type Scroll
X int64
Y int64
type OpenAIResponseComputerToolCallActionActionType struct{…}

An action to type in text.

Text string
Type Type
type OpenAIResponseComputerToolCallActionActionWait struct{…}

A wait action.

Type Wait
CallID string
PendingSafetyChecks []OpenAIResponseComputerToolCallPendingSafetyCheck
ID string
Code stringOptional
Message stringOptional
Status OpenAIResponseComputerToolCallStatus
One of the following:
const OpenAIResponseComputerToolCallStatusInProgress OpenAIResponseComputerToolCallStatus = "in_progress"
const OpenAIResponseComputerToolCallStatusCompleted OpenAIResponseComputerToolCallStatus = "completed"
const OpenAIResponseComputerToolCallStatusIncomplete OpenAIResponseComputerToolCallStatus = "incomplete"
Type ComputerCall
type OpenAITypesResponsesResponseInputItemComputerCallOutput struct{…}

The output of a computer tool call.

CallID string

A computer screenshot image used with the computer use tool.

Type ComputerScreenshot
FileID stringOptional
ImageURL stringOptional
Type ComputerCallOutput
ID stringOptional
AcknowledgedSafetyChecks []OpenAITypesResponsesResponseInputItemComputerCallOutputAcknowledgedSafetyCheckOptional
ID string
Code stringOptional
Message stringOptional
Status OpenAITypesResponsesResponseInputItemComputerCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemComputerCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemComputerCallOutputStatus = "incomplete"
One of the following:
One of the following:
type OpenAIResponseFunctionToolCall struct{…}

A tool call to run a function.

See the function calling guide for more information.

Arguments string
CallID string
Name string
Type FunctionCall
ID stringOptional
Status OpenAIResponseFunctionToolCallStatusOptional
One of the following:
const OpenAIResponseFunctionToolCallStatusInProgress OpenAIResponseFunctionToolCallStatus = "in_progress"
const OpenAIResponseFunctionToolCallStatusCompleted OpenAIResponseFunctionToolCallStatus = "completed"
const OpenAIResponseFunctionToolCallStatusIncomplete OpenAIResponseFunctionToolCallStatus = "incomplete"
type OpenAITypesResponsesResponseInputItemFunctionCallOutput struct{…}

The output of a function tool call.

CallID string
Output OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputUnion
One of the following:
string
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentList []OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemUnion
One of the following:
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputTextContent struct{…}

A text input to the model.

Text string
Type InputText
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContent struct{…}

An image input to the model.

Learn about image inputs

Type InputImage
Detail stringOptional
One of the following:
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailLow OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "low"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailHigh OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "high"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetailAuto OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputImageContentDetail = "auto"
FileID stringOptional
ImageURL stringOptional
type OpenAITypesResponsesResponseInputItemFunctionCallOutputOutputOutputContentListItemResponseInputFileContent struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Type FunctionCallOutput
ID stringOptional
Status OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemFunctionCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemFunctionCallOutputStatus = "incomplete"
type OpenAIResponseReasoningItem struct{…}

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.

ID string
Summary []OpenAIResponseReasoningItemSummary
Text string
Type SummaryText
Type Reasoning
Content []OpenAIResponseReasoningItemContentOptional
Text string
Type ReasoningText
EncryptedContent stringOptional
Status OpenAIResponseReasoningItemStatusOptional
One of the following:
const OpenAIResponseReasoningItemStatusInProgress OpenAIResponseReasoningItemStatus = "in_progress"
const OpenAIResponseReasoningItemStatusCompleted OpenAIResponseReasoningItemStatus = "completed"
const OpenAIResponseReasoningItemStatusIncomplete OpenAIResponseReasoningItemStatus = "incomplete"
type ResponseCompactionItemParamResp struct{…}

A compaction item generated by the v1/responses/compact API.

EncryptedContent string
Type Compaction
ID stringOptional
type OpenAITypesResponsesResponseInputItemImageGenerationCall struct{…}

An image generation request made by the model.

ID string
Status OpenAITypesResponsesResponseInputItemImageGenerationCallStatus
One of the following:
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusInProgress OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusCompleted OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusGenerating OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "generating"
const OpenAITypesResponsesResponseInputItemImageGenerationCallStatusFailed OpenAITypesResponsesResponseInputItemImageGenerationCallStatus = "failed"
Type ImageGenerationCall
Result stringOptional
type OpenAIResponseCodeInterpreterToolCall struct{…}

A tool call to run code.

ID string
ContainerID string
Status OpenAIResponseCodeInterpreterToolCallStatus
One of the following:
const OpenAIResponseCodeInterpreterToolCallStatusInProgress OpenAIResponseCodeInterpreterToolCallStatus = "in_progress"
const OpenAIResponseCodeInterpreterToolCallStatusCompleted OpenAIResponseCodeInterpreterToolCallStatus = "completed"
const OpenAIResponseCodeInterpreterToolCallStatusIncomplete OpenAIResponseCodeInterpreterToolCallStatus = "incomplete"
const OpenAIResponseCodeInterpreterToolCallStatusInterpreting OpenAIResponseCodeInterpreterToolCallStatus = "interpreting"
const OpenAIResponseCodeInterpreterToolCallStatusFailed OpenAIResponseCodeInterpreterToolCallStatus = "failed"
Type CodeInterpreterCall
Code stringOptional
Outputs []OpenAIResponseCodeInterpreterToolCallOutputUnionOptional
One of the following:
type OpenAIResponseCodeInterpreterToolCallOutputOutputLogs struct{…}

The logs output from the code interpreter.

Logs string
Type Logs
type OpenAIResponseCodeInterpreterToolCallOutputOutputImage struct{…}

The image output from the code interpreter.

Type Image
URL string
type OpenAITypesResponsesResponseInputItemLocalShellCall struct{…}

A tool call to run a command on the local shell.

ID string
Action OpenAITypesResponsesResponseInputItemLocalShellCallAction

Execute a shell command on the server.

Command []string
Env map[string, string]
Type Exec
TimeoutMs int64Optional
User stringOptional
WorkingDirectory stringOptional
CallID string
Status OpenAITypesResponsesResponseInputItemLocalShellCallStatus
One of the following:
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemLocalShellCallStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallStatus = "incomplete"
Type LocalShellCall
type OpenAITypesResponsesResponseInputItemLocalShellCallOutput struct{…}

The output of a local shell tool call.

ID string
Output string
Type LocalShellCallOutput
Status OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusInProgress OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusCompleted OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "completed"
const OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatusIncomplete OpenAITypesResponsesResponseInputItemLocalShellCallOutputStatus = "incomplete"
type ShellCall struct{…}

A tool representing a request to execute one or more shell commands.

Action ShellCallAction

The shell commands and limits that describe how to run the tool call.

Commands []string
MaxOutputLength int64Optional
TimeoutMs int64Optional
CallID string
Type ShellCall
ID stringOptional
Environment ShellCallEnvironmentUnionOptional
One of the following:
type LocalEnvironment struct{…}
Type Local
Skills []LocalEnvironmentSkillOptional
Description string
Name string
Path string
type ContainerReference struct{…}
ContainerID string
Type ContainerReference
Status ShellCallStatusOptional
One of the following:
const ShellCallStatusInProgress ShellCallStatus = "in_progress"
const ShellCallStatusCompleted ShellCallStatus = "completed"
const ShellCallStatusIncomplete ShellCallStatus = "incomplete"
type ShellCallOutput struct{…}

The streamed output items emitted by a shell tool call.

CallID string
Output []ShellCallOutputOutput
Outcome ShellCallOutputOutputOutcomeUnion

Indicates that the shell call exceeded its configured time limit.

One of the following:
type ShellCallOutputOutputOutcomeOutcomeTimeout struct{…}

Indicates that the shell call exceeded its configured time limit.

Type Timeout
type ShellCallOutputOutputOutcomeOutcomeExit struct{…}

Indicates that the shell commands finished and returned an exit code.

ExitCode int64
Type Exit
Stderr string
Stdout string
Type ShellCallOutput
ID stringOptional
MaxOutputLength int64Optional
Status ShellCallOutputStatusOptional
One of the following:
const ShellCallOutputStatusInProgress ShellCallOutputStatus = "in_progress"
const ShellCallOutputStatusCompleted ShellCallOutputStatus = "completed"
const ShellCallOutputStatusIncomplete ShellCallOutputStatus = "incomplete"
type ApplyPatchCall struct{…}

A tool call representing a request to create, delete, or update files using diff patches.

CallID string
Operation ApplyPatchCallOperationUnion

Instruction for creating a new file via the apply_patch tool.

One of the following:
type ApplyPatchCallOperationApplyPatchCallOperationCreateFile struct{…}

Instruction for creating a new file via the apply_patch tool.

Diff string
Path string
Type CreateFile
type ApplyPatchCallOperationApplyPatchCallOperationDeleteFile struct{…}

Instruction for deleting an existing file via the apply_patch tool.

Path string
Type DeleteFile
type ApplyPatchCallOperationApplyPatchCallOperationUpdateFile struct{…}

Instruction for updating an existing file via the apply_patch tool.

Diff string
Path string
Type UpdateFile
Status ApplyPatchCallStatus
One of the following:
const ApplyPatchCallStatusInProgress ApplyPatchCallStatus = "in_progress"
const ApplyPatchCallStatusCompleted ApplyPatchCallStatus = "completed"
Type ApplyPatchCall
ID stringOptional
type ApplyPatchCallOutput struct{…}

The streamed output emitted by an apply patch tool call.

CallID string
Status ApplyPatchCallOutputStatus
One of the following:
const ApplyPatchCallOutputStatusCompleted ApplyPatchCallOutputStatus = "completed"
const ApplyPatchCallOutputStatusFailed ApplyPatchCallOutputStatus = "failed"
Type ApplyPatchCallOutput
ID stringOptional
Output stringOptional
type OpenAITypesResponsesResponseInputItemMcpListTools struct{…}

A list of tools available on an MCP server.

ID string
ServerLabel string
Tools []OpenAITypesResponsesResponseInputItemMcpListToolsTool
InputSchema any
Name string
Annotations anyOptional
Description stringOptional
Type McpListTools
Error stringOptional
type McpApprovalRequest struct{…}

A request for human approval of a tool invocation.

ID string
Arguments string
Name string
ServerLabel string
Type McpApprovalRequest
type OpenAITypesResponsesResponseInputItemMcpApprovalResponse struct{…}

A response to an MCP approval request.

ApprovalRequestID string
Approve bool
Type McpApprovalResponse
ID stringOptional
Reason stringOptional
type OpenAITypesResponsesResponseInputItemMcpCall struct{…}

An invocation of a tool on an MCP server.

ID string
Arguments string
Name string
ServerLabel string
Type McpCall
ApprovalRequestID stringOptional
Error stringOptional
Output stringOptional
Status OpenAITypesResponsesResponseInputItemMcpCallStatusOptional
One of the following:
const OpenAITypesResponsesResponseInputItemMcpCallStatusInProgress OpenAITypesResponsesResponseInputItemMcpCallStatus = "in_progress"
const OpenAITypesResponsesResponseInputItemMcpCallStatusCompleted OpenAITypesResponsesResponseInputItemMcpCallStatus = "completed"
const OpenAITypesResponsesResponseInputItemMcpCallStatusIncomplete OpenAITypesResponsesResponseInputItemMcpCallStatus = "incomplete"
const OpenAITypesResponsesResponseInputItemMcpCallStatusCalling OpenAITypesResponsesResponseInputItemMcpCallStatus = "calling"
const OpenAITypesResponsesResponseInputItemMcpCallStatusFailed OpenAITypesResponsesResponseInputItemMcpCallStatus = "failed"
type OpenAIResponseCustomToolCallOutput struct{…}

The output of a custom tool call from your code, being sent back to the model.

CallID string
Output OpenAIResponseCustomToolCallOutputOutputUnion
One of the following:
string
type OpenAIResponseCustomToolCallOutputOutputOutputContentList []OpenAIResponseCustomToolCallOutputOutputOutputContentListItemUnion
One of the following:
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Type CustomToolCallOutput
ID stringOptional
type OpenAIResponseCustomToolCall struct{…}

A call to a custom tool created by the model.

CallID string
Input string
Name string
Type CustomToolCall
ID stringOptional
type OpenAITypesResponsesResponseInputItemItemReference struct{…}

An internal identifier for an item to reference.

ID string
Type OpenAITypesResponsesResponseInputItemItemReferenceTypeOptional
MaxOutputTokens int64Optional
MaxToolCalls int64Optional
Metadata map[string, string]Optional
PreviousResponseID stringOptional
Prompt OpenAIResponsePromptOptional

Reference to a prompt template and its variables. Learn more.

ID string
Variables map[string, OpenAIResponsePromptVariableUnion]Optional
One of the following:
string
type OpenAIResponseInputText struct{…}

A text input to the model.

Text string
Type InputText
type OpenAIResponseInputImage struct{…}

An image input to the model.

Learn about image inputs.

Detail OpenAIResponseInputImageDetail
One of the following:
const OpenAIResponseInputImageDetailLow OpenAIResponseInputImageDetail = "low"
const OpenAIResponseInputImageDetailHigh OpenAIResponseInputImageDetail = "high"
const OpenAIResponseInputImageDetailAuto OpenAIResponseInputImageDetail = "auto"
Type InputImage
FileID stringOptional
ImageURL stringOptional
type OpenAIResponseInputFile struct{…}

A file input to the model.

Type InputFile
FileData stringOptional
FileID stringOptional
FileURL stringOptional
Filename stringOptional
Version stringOptional
PromptCacheKey stringOptional
PromptCacheRetention OpenAIResponsePromptCacheRetentionOptional
One of the following:
const OpenAIResponsePromptCacheRetentionInMemory OpenAIResponsePromptCacheRetention = "in-memory"
const OpenAIResponsePromptCacheRetention24h OpenAIResponsePromptCacheRetention = "24h"
Reasoning ReasoningOptional

gpt-5 and o-series models only

Configuration options for reasoning models.

Effort ReasoningEffortOptional
One of the following:
const ReasoningEffortNone ReasoningEffort = "none"
const ReasoningEffortMinimal ReasoningEffort = "minimal"
const ReasoningEffortLow ReasoningEffort = "low"
const ReasoningEffortMedium ReasoningEffort = "medium"
const ReasoningEffortHigh ReasoningEffort = "high"
const ReasoningEffortXhigh ReasoningEffort = "xhigh"
GenerateSummary ReasoningGenerateSummaryOptional
One of the following:
const ReasoningGenerateSummaryAuto ReasoningGenerateSummary = "auto"
const ReasoningGenerateSummaryConcise ReasoningGenerateSummary = "concise"
const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"
Summary ReasoningSummaryOptional
One of the following:
const ReasoningSummaryAuto ReasoningSummary = "auto"
const ReasoningSummaryConcise ReasoningSummary = "concise"
const ReasoningSummaryDetailed ReasoningSummary = "detailed"
SafetyIdentifier stringOptional
ServiceTier OpenAIResponseServiceTierOptional
One of the following:
const OpenAIResponseServiceTierAuto OpenAIResponseServiceTier = "auto"
const OpenAIResponseServiceTierDefault OpenAIResponseServiceTier = "default"
const OpenAIResponseServiceTierFlex OpenAIResponseServiceTier = "flex"
const OpenAIResponseServiceTierScale OpenAIResponseServiceTier = "scale"
const OpenAIResponseServiceTierPriority OpenAIResponseServiceTier = "priority"
Status OpenAIResponseStatusOptional
One of the following:
const OpenAIResponseStatusCompleted OpenAIResponseStatus = "completed"
const OpenAIResponseStatusFailed OpenAIResponseStatus = "failed"
const OpenAIResponseStatusInProgress OpenAIResponseStatus = "in_progress"
const OpenAIResponseStatusCancelled OpenAIResponseStatus = "cancelled"
const OpenAIResponseStatusQueued OpenAIResponseStatus = "queued"
const OpenAIResponseStatusIncomplete OpenAIResponseStatus = "incomplete"
Temperature float64Optional

Configuration options for a text response from the model.

Can be plain text or structured JSON data. Learn more:

Format OpenAIResponseTextConfigFormatUnionOptional

Default response format. Used to generate text responses.

One of the following:
type OpenAIResponseTextConfigFormatResponseFormatText struct{…}

Default response format. Used to generate text responses.

Type Text
type OpenAIResponseTextConfigFormatResponseFormatTextJsonSchemaConfig struct{…}

JSON Schema response format.

Used to generate structured JSON responses. Learn more about Structured Outputs.

Name string
Schema map[string, any]
Type JsonSchema
Description stringOptional
Strict boolOptional
type OpenAIResponseTextConfigFormatResponseFormatJsonObject struct{…}

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.

Type JsonObject
Verbosity OpenAIResponseTextConfigVerbosityOptional
One of the following:
const OpenAIResponseTextConfigVerbosityLow OpenAIResponseTextConfigVerbosity = "low"
const OpenAIResponseTextConfigVerbosityMedium OpenAIResponseTextConfigVerbosity = "medium"
const OpenAIResponseTextConfigVerbosityHigh OpenAIResponseTextConfigVerbosity = "high"
TopLogprobs int64Optional
TopP float64Optional
Truncation OpenAIResponseTruncationOptional
One of the following:
const OpenAIResponseTruncationAuto OpenAIResponseTruncation = "auto"
const OpenAIResponseTruncationDisabled OpenAIResponseTruncation = "disabled"
Usage OpenAIResponseUsageOptional

Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.

InputTokens int64
InputTokensDetails OpenAIResponseUsageInputTokensDetails

A detailed breakdown of the input tokens.

CachedTokens int64
OutputTokens int64
OutputTokensDetails OpenAIResponseUsageOutputTokensDetails

A detailed breakdown of the output tokens.

ReasoningTokens int64
TotalTokens int64
User stringOptional
SequenceNumber int64
Type ResponseQueued
type ResponseNewResponseResponseCustomToolCallInputDeltaEvent struct{…}

Event representing a delta (partial update) to the input of a custom tool call.

Delta string
ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseCustomToolCallInputDelta
type ResponseNewResponseResponseCustomToolCallInputDoneEvent struct{…}

Event indicating that input for a custom tool call is complete.

Input string
ItemID string
OutputIndex int64
SequenceNumber int64
Type ResponseCustomToolCallInputDone
type ResponseNewResponseGenericResponseEvent struct{…}
Type string

Run OpenAI Responses API (OpenAI only)

package main

import (
  "context"
  "fmt"

  "github.com/scaleapi/sgp-dev-go"
  "github.com/scaleapi/sgp-dev-go/option"
)

func main() {
  client := sgpdev.NewClient(
    option.WithAPIKey("My API Key"),
    option.WithAccountID("My Account ID"),
  )
  response, err := client.Responses.New(context.TODO(), sgpdev.ResponseNewParams{
    Input: sgpdev.ResponseNewParamsInputUnion{
      OfString: sgpdev.String("string"),
    },
    Model: "model",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}
{
  "id": "id",
  "created_at": 0,
  "model": "gpt-5.2",
  "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",
      "phase": "commentary"
    }
  ],
  "parallel_tool_calls": true,
  "tool_choice": "none",
  "tools": [
    {
      "name": "name",
      "type": "function",
      "description": "description",
      "parameters": {
        "foo": "bar"
      },
      "strict": true
    }
  ],
  "background": true,
  "completed_at": 0,
  "conversation": {
    "id": "id"
  },
  "error": {
    "code": "server_error",
    "message": "message"
  },
  "incomplete_details": {
    "reason": "max_output_tokens"
  },
  "instructions": "string",
  "max_output_tokens": 0,
  "max_tool_calls": 0,
  "metadata": {
    "foo": "string"
  },
  "previous_response_id": "previous_response_id",
  "prompt": {
    "id": "id",
    "variables": {
      "foo": "string"
    },
    "version": "version"
  },
  "prompt_cache_key": "prompt_cache_key",
  "prompt_cache_retention": "in-memory",
  "reasoning": {
    "effort": "none",
    "generate_summary": "auto",
    "summary": "auto"
  },
  "safety_identifier": "safety_identifier",
  "service_tier": "auto",
  "status": "completed",
  "temperature": 0,
  "text": {
    "format": {
      "type": "text"
    },
    "verbosity": "low"
  },
  "top_logprobs": 0,
  "top_p": 0,
  "truncation": "auto",
  "usage": {
    "input_tokens": 0,
    "input_tokens_details": {
      "cached_tokens": 0
    },
    "output_tokens": 0,
    "output_tokens_details": {
      "reasoning_tokens": 0
    },
    "total_tokens": 0
  },
  "user": "user"
}
Returns Examples
{
  "id": "id",
  "created_at": 0,
  "model": "gpt-5.2",
  "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",
      "phase": "commentary"
    }
  ],
  "parallel_tool_calls": true,
  "tool_choice": "none",
  "tools": [
    {
      "name": "name",
      "type": "function",
      "description": "description",
      "parameters": {
        "foo": "bar"
      },
      "strict": true
    }
  ],
  "background": true,
  "completed_at": 0,
  "conversation": {
    "id": "id"
  },
  "error": {
    "code": "server_error",
    "message": "message"
  },
  "incomplete_details": {
    "reason": "max_output_tokens"
  },
  "instructions": "string",
  "max_output_tokens": 0,
  "max_tool_calls": 0,
  "metadata": {
    "foo": "string"
  },
  "previous_response_id": "previous_response_id",
  "prompt": {
    "id": "id",
    "variables": {
      "foo": "string"
    },
    "version": "version"
  },
  "prompt_cache_key": "prompt_cache_key",
  "prompt_cache_retention": "in-memory",
  "reasoning": {
    "effort": "none",
    "generate_summary": "auto",
    "summary": "auto"
  },
  "safety_identifier": "safety_identifier",
  "service_tier": "auto",
  "status": "completed",
  "temperature": 0,
  "text": {
    "format": {
      "type": "text"
    },
    "verbosity": "low"
  },
  "top_logprobs": 0,
  "top_p": 0,
  "truncation": "auto",
  "usage": {
    "input_tokens": 0,
    "input_tokens_details": {
      "cached_tokens": 0
    },
    "output_tokens": 0,
    "output_tokens_details": {
      "reasoning_tokens": 0
    },
    "total_tokens": 0
  },
  "user": "user"
}