Built-in Tools
AIVAX provides a list of built-in tools for you to enable in your model. These tools can be used together with the server-side functions.
Some functions have a cost. This cost is applied to models used by AIVAX and those you provide through BYOK (bring-your-own-key), so it is important to add balance if you intend to use these tools.
Note that each model decides which function to call and its parameters. Not all models can obey the call rules.
How to Choose and Combine Tools
Built-in tools should be enabled as work capabilities, not as agent decoration. Each tool adds a decision to the model: it needs to perceive that the tool exists, understand when to use it, assemble valid arguments, wait for the result, and continue the response. The more similar tools are available at the same time, the higher the chance of redundant use or poor choice. Start with the smallest set that solves the use case and write clear instructions on when to use each.
Use WebSearch when the answer depends on public, recent, or variable information. Use OpenUrl when the user has already provided a URL and wants the assistant to analyze that specific content. Use AdvancedWebUsage when the task needs a deeper research pass over multiple sources rather than a single search. Use Code for calculation, data transformation, and small algorithmic reasoning. Use Request when the model needs to call an HTTP API with method, headers, or custom body. Use Remember and Calendar only in chat clients or calls with an identifiable user, because these tools depend on persistent per-user context.
Generation tools, such as image, document, and web page, should be treated as output actions. They do more than improve an answer; they create artifacts hosted or attached to the conversation. Therefore, instruct the model on when to generate an artifact and when to reply in text. In support, for example, generating a document can be useful for a quote, proposal, or formal summary; generating a web page can be useful for a visual report; generating an image can be useful for creative ideation. If the user only asked for an explanation, plain text is usually sufficient.
When tools are available via builtin_tools in a direct call, the application making the request decides the list for each inference. When configured in the AI Gateway, the list is centralized and can be combined with skills, workers, MCP, protocol functions, and shell. In production, prefer the gateway for permanent policies, because it prevents different clients from enabling different tools without control. Use direct calls for testing, internal routines, and flows where the application truly needs to choose tools dynamically.
The values in builtin_tools.tools are configuration flags such as WebSearch, Code, and OpenUrl. The model sees runtime function names such as web_search, evaluate_code, and open_url. Use runtime function names when configuring skill tool allowlists or shell tool allowlists.
Internet Search
This function enables internet search in your model. With this, the model can query specific or real‑time information such as weather data, news, game results, etc.
Internet search is performed by multiple providers, chosen based on network availability and latency. AIVAX uses a mix of providers to perform internet searches.
AIVAX provides two types of searches configurable via its dashboard:
- Full: the performed search is complete, inserting the entire content of each result into the conversation context.
- Summarized: the performed search is summarized, inserting into the conversation context a summary generated by AI by the search provider itself.
The cost of both modes is $5 per 1,000 searches performed. The Full mode may consume more input tokens from the conversation, but can provide more precise results. web_search_max_results must be between 1 and 25. web_search_mode accepts full or summarized.
Note
Important: the Full search is not always available.
Activation via builtin_tools:
{
"tools": [
"WebSearch"
],
"options": {
"web_search_max_results": 10,
"web_search_mode": "full"
}
}
Tool Diagnosis
When a tool is not called, first confirm that it is enabled in the gateway or in the builtin_tools field of the request. Then, check whether the selected model supports function calls or if a tool handler is configured for models without native support. Next, review the instruction: if it does not specify when to search, open a URL, generate an image, or query memory, the model may respond only with its own knowledge. Finally, test a direct question that clearly requires the tool, such as requesting a recent news article for WebSearch or asking to open a specific URL for OpenUrl.
When a tool is called too often, reduce ambiguity. Tools like WebSearch, AdvancedWebUsage, and XPostsSearch compete for recent information; OpenUrl and Request can seem similar when the user sends a link; Remember and Calendar can overlap when the user talks about preferences and dates. Remove unnecessary tools, make gateway instruction descriptions more restrictive, and, when possible, use workers to block or replace calls in specific scenarios.
When a tool fails, treat it as a normal part of the experience. Searches may return little content, URLs may block bots, APIs may deny authorization, image generation may refuse content, and code execution may receive ambiguous input. Instruct the model to explain the limitation objectively and offer the next step, such as requesting another link, trying a more specific query, asking for authorization, or responding based only on the available context. Do not rely on an external tool as the sole way to conclude a critical conversation without an experience fallback.
Advanced Internet Search
This function runs a deeper web research request through AIVAX's research agent. It is intended for complex questions that need synthesis across multiple sources or a more detailed research pass than WebSearch.
The runtime function name is advanced_web_search, and it accepts a single prompt argument. Avoid enabling it for routine lookup tasks; use WebSearch for quick current facts and OpenUrl for user-provided URLs.
This function has usage cost for the research model and search request.
Activation via builtin_tools:
{
"tools": [
"AdvancedWebUsage"
],
"options": {
}
}
Code Execution
This function allows the model to execute JavaScript code and inspect the execution result. With this, the model can evaluate algorithmic results of mathematical expressions and other situations that are better represented through code.
The code runs in a protected JavaScript environment. It is intended for calculations and small transformations, not for file I/O, network access, or importing external scripts.
This function has no cost.
Activation via builtin_tools:
{
"tools": [
"Code"
],
"options": {
}
}
URL Context
This function allows the model to access external content at URLs and links provided by the user. With this function, the model can access links and evaluate their content.
Note that some destinations may identify the access as a bot and block it, as this function is not crawling but a simple GET to the destination.
The model can access up to 5 links at once. Only the first 5 MB of the links are read. Upon obtaining the link content, the system checks the return content and handles them according to each type:
- HTML content is rendered: HTML tags, scripts, CSS, and “noise” are removed from the access result, keeping only the plain text of the link.
- Other textual content: the content is read directly and no transformation is performed.
- Non‑textual content: when the link responds with non‑textual content and the response indicates a filename (either by path or by the
Content‑Dispositionheader), the system attempts to convert the downloaded file to a textual version.
This function has no cost.
Activation via builtin_tools. image_generation_max_results must be between 1 and 4:
{
"tools": [
"OpenUrl"
],
"options": {
}
}
Memory
This function allows the model to store relevant content to be used across multiple conversations.
Currently, this function is only available when used in chat clients and when the session is identified by a
tag.
Through the session tag, the model stores a relevant piece of conversation data, such as name preferences or persistent context the assistant should remember.
The memory tool requires an identifiable session. Without a user reference ID, memory operations return an error instead of storing or searching information. The memory instruction tells the model not to save sensitive or personal data, however, it is not guaranteed that the model will always follow this rule.
Each saved memory can request a retention period from 1 to 365 days; when omitted, the default is 30 days. Memory items can be searched, updated, removed individually, or cleared for the user.
Note: in chat/completions requests, the
tagis specified in the$.userparameter.
This function has no cost.
Activation via builtin_tools:
{
"tools": [
"Remember"
],
"options": {
"include_all_memory_context": true
}
}
Image Generation
This function allows the model to create AI images.
AI‑generated images are attached to the conversation context, but are not directly visible to the assistant.
This function has a cost. The cost varies by the image generation model used. Image generation occurs on an external provider, so the cost can change based on various factors.
You can also enable the generation of explicit and adult images in image generation. When this feature is enabled, the model will be allowed to generate adult material. For this to happen, the model must also “agree” to generate such content. Some models have a lower security filter than others. For example, Gemini models have the lowest security filter, making them a viable option for role‑play and generating such material.
You are always responsible for the material you generate and the generated material must be compatible with our terms of service.
The available image generation models are:
gpt-image-2wan-image-2.7-prowan-image-2.7grok-imagine-progrok-imagineseedream-5-litenanobanana-2gpt-image-1.5gpt-image-1-miniseedream-4.5-proseedream-4nanobanana-pronanobananaflux-schnellzimage-turboflux-2-kleinmajicMIX-realisticAbsoluteRealityCyberRealisticRealCartoon-RealisticCyberRealistic-PonyHassaku-XLMeina-Mix
Generated images are stored on AIVAX servers for a few months before being permanently removed.
Activation via builtin_tools:
{
"tools": [
"ImageGeneration"
],
"options": {
"image_generation_model_name": "grok-imagine",
"image_generation_allow_reference_usage": true,
"image_generation_quality": "high",
"image_generation_max_results": 2,
"image_generation_allow_mature_content": false
}
}
X Posts Search
This function allows the model to search for posts on X (formerly Twitter), and to read a specific post when the model has a post ID.
It is a direct alternative to web_search, as it can be used to look for up‑to‑date information in real time, such as news, information, game results, etc. This tool provides much more recent results than the conventional internet search tool.
It is not recommended to use both functions together because they have the same purpose.
The cost of this function is $5 per 1,000 searches performed.
Activation via builtin_tools:
{
"tools": [
"XPostsSearch"
],
"options": {
}
}
Document Generation
This function allows the model to create PDFs from HTML text.
The created files are hosted on AIVAX servers and made available by the assistant.
The content is hosted for a few months before being permanently deleted.
This function has no cost.
Activation via builtin_tools:
{
"tools": [
"GenerateDocument"
],
"options": {
}
}
Web Page Generation
This function allows the model to host HTML pages on AIVAX servers.
This allows the model to host reports, landing pages, and other HTML infographics.
The content is hosted for a few months before being permanently deleted.
This function has no cost.
Activation via builtin_tools:
{
"tools": [
"GenerateWebPage"
],
"options": {
}
}
Advanced Request
This function provides the model with an advanced HTTP request tool. With this function, the model can set headers, forms, contents, and methods to perform advanced HTTP requests.
Text responses are read up to the platform content limit. Binary responses are not expanded into the context; the tool returns a short binary-content marker with the content type and size when available.
This function has no cost.
Activation via builtin_tools:
{
"tools": [
"Request"
],
"options": {
}
}
Calendar
Calendar is backed by the same persistent information store as memory, but stores date-based reminder objects instead of loose memory text. It can create, search, find, update, and delete appointments for an identified user.
It is not recommended to activate this function together with the memory function or message scheduling functions of the chat client.
This function has no cost.
Activation via builtin_tools:
{
"tools": [
"Calendar"
],
"options": {
}
}
English
Português