Register functions the model can invoke during a Responses API conversation thread.
Not yet available. Tool calling in the Responses API is on the roadmap. The page below documents the intended behavior.
Tool calling lets you expose functions to the model. When the model decides a function should run, it returns a tool call event; your code executes the function and submits the result back to continue the turn.
Include a tools array in your request. Each tool is a JSON Schema function definition:
When the model decides to invoke a tool, the response contains a function_call output item instead of (or before) the assistant's text:
Your code runs the function, then submits the result by continuing the thread:
Control whether the model must call a tool, may call one, or is forbidden from calling:
tool_choice value | Behaviour |
|---|---|
"auto" (default) | Model decides |
"required" | Model must call at least one tool |
"none" | No tool calls allowed this turn |
{"type": "function", "name": "..."} | Force a specific function |
You can register as many tools as the model's context window allows. The model may call several in a single turn; handle each function_call item in the output array before submitting results.
Set "stream": true and handle response.function_call.delta events to receive tool call arguments incrementally — useful when argument payloads are large.