Built-in Tools

Pre-configured tools for web search, content extraction, and more.

Built-in tools are pre-configured tool types that give LLMs access to powerful capabilities without requiring you to implement the underlying functionality. Simply include the tool type in your request, and the model can use it autonomously.

Available tools

ToolDescriptionPricing
web_searchSearch the web, get up to 20 results$4 – $7 / 1,000 calls
web_fetchFetch web pages, get up to 5 URLs$4 – $7 / 1,000 calls
code_interpreterExecute Python code in a sandboxFree

Quick example

import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://api.aivene.com/v1',
  apiKey: process.env.AIVENE_API_KEY
});

const response = await client.chat.completions.create({
  model: 'gpt-4o',
  messages: [
    { role: 'user', content: 'What are the latest news about AI?' }
  ],
  tools: [
    { type: 'web_search' },
    { type: 'web_fetch' }
  ]
});

How they differ from function tools

AspectBuilt-in ToolsFunction Tools
ImplementationHandled by AiveneYou implement the logic
SetupJust add { type: 'tool_name' }Define schema + handle responses
ExecutionAutomaticManual in your code
BillingPer-call pricingOnly token costs

Combining with function tools

Built-in tools work seamlessly alongside your custom function tools:

const response = await client.chat.completions.create({
  model: 'gpt-4o',
  messages: [
    { role: 'user', content: 'Find the current Bitcoin price and save it' }
  ],
  tools: [
    { type: 'web_search' },
    {
      type: 'function',
      function: {
        name: 'save_price',
        description: 'Save a price to the database',
        parameters: {
          type: 'object',
          properties: {
            asset: { type: 'string' },
            price: { type: 'number' }
          },
          required: ['asset', 'price']
        }
      }
    }
  ]
});

The model will search the web for the current price, then call your save_price function with the result.