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
| Tool | Description | Pricing |
|---|---|---|
web_search | Search the web, get up to 20 results | $4 – $7 / 1,000 calls |
web_fetch | Fetch web pages, get up to 5 URLs | $4 – $7 / 1,000 calls |
code_interpreter | Execute Python code in a sandbox | Free |
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
| Aspect | Built-in Tools | Function Tools |
|---|---|---|
| Implementation | Handled by Aivene | You implement the logic |
| Setup | Just add { type: 'tool_name' } | Define schema + handle responses |
| Execution | Automatic | Manual in your code |
| Billing | Per-call pricing | Only 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.