POST /v1/chat/completions
Tools are declared with a nested function object. The model returns tool_calls inside the assistant message.
Full loop
Streaming
Tool-call arguments arrive across multiple chunks. Accumulate delta.tool_calls[i].function.arguments strings until finish_reason: "tool_calls". See streaming.
"none" disables tools; "auto" is the default.
The model can return multiple tool_calls in one response. Execute them in parallel and append each result with a matching tool_call_id.Last modified on April 21, 2026