/ai/v2/guarded/responses) and Completions V2 (/ai/v2/guarded/chat/completions). Tool definitions use the identical OpenAI function schema on both endpoints; they differ only in how the request is framed (input vs messages) and how tool calls are returned (output[] typed items vs choices[].message.tool_calls).
New to the idea? Tool Use (or Function Calling) in the AI Learning Center explains it in plain terms, and Tools and MCP in AI 104 walks through a full tool loop.
Using Tools with the Responses API
The Responses API (/ai/v2/guarded/responses) supports the same function calling as Completions V2, with the same tool definitions. The difference is on the response side: a tool call comes back as a typed function_call item inside the output[] array (rather than choices[].message.tool_calls).
The Responses API uses pinned models: pass the exact
model you want. Auto-routing and model_family selection are Completions V2 features; use Completions V2 if you need them.image_generation tool to draw images. See Image generation tool for the models that support it.
Defining tools
Sendtools (and optionally tool_choice) alongside input. With the official OpenAI SDKs, set the base URL to /ai/v2/guarded and call responses.create.
Tool call output
When the model invokes a tool, the response contains afunction_call item in output[]:
JSON
Returning a tool result (multi-turn)
Run your function, then continue the conversation by appending two items toinput: the model’s function_call, followed by a function_call_output carrying the result under the matching call_id.
message item. function_call and function_call_output items both require a matching call_id.
Using Tools with Completions V2
Many Gloo models support tools; the Supported Models Guide lists each model’s capabilities.Tool Calling with V2 Routing
Tool calling works with all Completions V2 routing mechanisms:
For details on routing mechanisms, see the Completions V2 Guide.
Supported Models for Tool Use
Examples by provider:Calling a tool
Example response
Example response
JSON
Using Inngest's AgentKit SDK (TypeScript)
Using Inngest's AgentKit SDK (TypeScript)
TypeScript
What tools let you do
Language models are good at writing text, but on their own they can’t reach live data or do exact calculations. With tools, the model can ask your application to:- Fetch up-to-date information (e.g., weather, stock prices, calendars).
- Execute code or math (e.g., calculate complex equations, generate charts).
- Interact with databases, APIs, or internal systems (e.g., CRM updates, file searches, emails).
- Chain together steps in a workflow (e.g., “Analyze this document, then email a summary”).
- Act like a coordinator between systems (e.g., Slack + GitHub + Notion integration).
- Enable interactive applications where the AI can take actions and report back results.
Next steps
Step-by-step tutorial
Structured output with tool use, step by step.
Responses
Tool use with the Responses API.
Before you ship
Handle errors and retries in production.

