tools parameter, and the model returns tool_calls when it determines a function should be used. You then execute these functions and optionally pass the results back to the model for further processing.
Patterns
Function calling fits a handful of common shapes. Pick the one that matches what you’re building, then follow the link for runnable Python, TypeScript, and cURL examples.Supported models
For the current list of models that support function calling, see the serverless and dedicated model inference catalogs.Next steps
- Call functions: one tool call per response (simple and multiple).
- Call functions in parallel: multiple tool calls in one response.
- Agentic patterns: multi-step and multi-turn loops.
- Vision-language function calling: combine image understanding with tool use on VLMs.
- Best practices: design tools and control selection for reliable calls.