/ai/v1/responses — the recommended surface for new integrations) and Completions V2 (/ai/v2/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).
Adding Tools to the Completions API allows you to grow your experience with Gloo AI, adding capabilities that are human flourishing.
Extended Capabilities Beyond Text Generation
All models are excellent at language generation, but they can’t access real-time data or perform calculations natively. Tools allow the model 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).
Automation of Multi-Step Workflows
By using tools, Gloo AI models can:- 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.
Improved Accuracy and Reliability
Rather than “hallucinating” answers, the model can use tools to ground its outputs in real data. By delegating precision tasks like date parsing, data lookup, or logic execution to deterministic systems, you reduce the chance of errors and make the AI trustworthy in mission-critical scenarios.Using Tools with the Responses API (v1)
The Responses API (/ai/v1/responses) is the recommended endpoint for new integrations and supports the same function-calling capability as Completions V2. Tool definitions use the identical OpenAI function schema — {"type": "function", "function": { ... }}. 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 is a direct model interface — pass the exact
model you want. Auto-routing and model_family selection are planned for the Responses API but not yet available here; use Completions V2 if you need them today.Defining tools
Sendtools (and optionally tool_choice) alongside input. Because Gloo is OpenAI-compatible, you can use the official OpenAI SDKs — set the base URL to /ai/v1 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
Gloo provides several models with tooling support. For a complete and up-to-date list of all available models and their specific capabilities, please see our Supported Models Guide.Tool Calling with V2 Routing
Tool calling works seamlessly with all Completions V2 routing mechanisms:- AI Core (auto_routing: true): Gloo automatically selects the best model for your tools based on query complexity
- AI Core Select (model_family): Tools work with your preferred provider family (OpenAI, Anthropic, Google, Open Source)
- AI Select (model): Direct model selection with explicit tool support
Supported Models for Tool Use
Gloo V2 provides multiple models with tool calling support across different providers:| Model Family | Example Models | Tool Use | Streaming |
|---|---|---|---|
| OpenAI | gloo-openai-gpt-5.5-pro, gloo-openai-gpt-5-mini | Yes | Yes |
| Anthropic | gloo-anthropic-claude-sonnet-4.5, gloo-anthropic-claude-haiku-4.5 | Yes | Yes |
gloo-google-gemini-2.5-pro, gloo-google-gemini-2.5-flash | Yes | Yes | |
| Open Source | gloo-deepseek-v3.2, gloo-openai-gpt-oss-120b | Yes | Varies |
For the complete list of supported models and their capabilities, see our Supported Models Guide.
Using cURL
cURL
Using the OpenAI SDK (Python)
Using Inngest’s AgentKit SDK (TypeScript)
TypeScript
Example Response
JSON

