Package-level declarations
Types
A new content part has started inside an output item.
A content part is complete; part holds its final form.
An event marking the start or the end of one content part inside an output item.
A free-form tool that takes raw text instead of JSON arguments.
A fragment of the free-form input the model is generating for a CustomToolCallItem.
The finished input of a custom tool call.
A call to the apply_patch custom tool, which takes free-form input instead of JSON arguments.
The result of running a CustomToolCallItem.
A fragment of the JSON arguments the model is generating for a FunctionCallItem.
The finished JSON arguments of a function call.
A function the model asked to call.
The result of running a function the model called.
A function the model may call, described by its JSON Schema.
Why a ResponseStatus.INCOMPLETE response stopped short.
Reason a response was truncated, serialized as the raw value the API sends.
Image sent to the model, as input_image.
Text sent to the model, as input_text.
Breakdown of the input tokens counted in ResponseUsage.inputTokens.
A message turn: text, or multimodal parts, attributed to a ResponseRole.
A response produced by the Responses API.
Forces the model to call one specific tool.
A new output item — reasoning, message, tool call — has started.
An output item is complete; item holds its final form.
An event marking the start or the end of one item of ModelResponse.output.
A fragment of the visible answer. This is the event most callers print as it arrives.
The visible answer of one content part, complete.
Text produced by the model, as output_text.
Breakdown of the output tokens counted in ResponseUsage.outputTokens.
Thinking-mode configuration of a Responses API request.
The chain-of-thought a thinking model produced before its answer.
A fragment of the chain-of-thought a thinking model produces before its answer.
The chain-of-thought of one content part, complete.
Chain-of-thought produced by the model in thinking mode, as reasoning_text.
Terminal event of a response that finished normally, carrying its output and usage.
The two shapes a content or output field takes on the wire: a bare string, or an array of ResponseContentParts.
One element of the content array of a ResponseItem.
The first event of the stream: the response exists and generation has started.
What went wrong on a ResponseStatus.FAILED response.
Terminal event of a response that failed; see ModelResponse.error.
Terminal event of a response that was cut short — by max_output_tokens or the content filter; see ModelResponse.incompleteDetails.
Progress ping: the response is still being generated.
The two shapes the input of a ResponseRequest takes on the wire: a bare string, treated by the API as a single user message, or an array of ResponseItems.
One entry of the conversation handed to — or produced by — the Responses API.
Everything about a Responses API call except the conversation itself.
A request to the Responses API.
Author of a MessageItem.
An event carrying a snapshot of the whole response.
State of a ModelResponse or of a single ResponseItem, serialized as the raw value the API sends.
One semantic server-sent event of a streamed Responses API call.
A tool the model may use while producing a response.
Controls which tool, if any, the model calls.
Coarse tool-selection strategy.
Token usage statistics of a ModelResponse.
Shape of the text the model must produce.
Base of the three content parts that carry nothing but text, so they can be matched at once:
An incremental piece of text produced inside a content part.
The complete text of a content part, sent once its deltas are done.
Wire form of TextConfig.format. Build it through the TextConfig factories rather than directly.
An incremental piece of the input the model is generating for a tool call.
The complete input of a tool call, sent once its deltas are done.
An item whose type this version of the SDK does not model.
A content part whose type this version of the SDK does not model.
An event this version of the SDK cannot map: an unknown type, or a known one whose payload does not fit the expected shape.
A tool whose type this version of the SDK does not model, kept verbatim so it round-trips.
The web search has finished and its results are feeding back into the model.
A status update of a web search the API is running server-side.
A web search call has been created and is about to run.
A web search the API ran on its own, server side.
The web search is running.
The built-in web search, executed on the API's side.
Functions
Parses FunctionCallItem.arguments into a JsonObject, or returns null when the model produced malformed JSON or a JSON value that is not an object.
Creates Responses API parameters using a builder.
Creates streaming Responses API parameters using a builder.