Use the Exa web search tools
Set thex-baseten-server-tools: true header, and add one or more Exa selectors to your tools array. Only the type is needed; Baseten expands the tool schema automatically, and the model decides when to search, what to search for, and which pages to read. Server-side tools work on Baseten’s Chat Completions, Messages, and Responses endpoints, buffered or streaming.
Selectors take no extra fields; the model fills in the tool arguments from Exa’s schema. Use the system prompt to steer search policy, such as when to search, whether to fetch primary sources, and how to cite. Use
baseten.tool_settings to bound the loop:
How results come back
The final answer arrives through the endpoint’s normal field. Completed Exa calls are recorded per protocol:tool_use and tool_result blocks on Messages, mcp_call items on Responses, and baseten.iterations[].continuation_messages on Chat Completions. Streaming requests receive each search call and result as server-sent events while the loop runs, so you can show progress before the answer lands. The baseten.request.server_tool_calls[] array reports the outcome of every Exa call in the request.
Pricing
Exa calls bill to your Baseten account at Exa’s rate with no markup, in addition to the model’s token costs: about $0.007 per search and $0.001 per fetched URL. Exa reports the charge for each call at runtime, so individual calls can deviate from these figures. Billed tool calls appear in Baseten workspace settings under Billing → Usage, grouped by provider. See Baseten’s pricing table for current rates. Hosted Tools are in early access on Baseten with a 25 requests per minute limit per organization. Try Exa search in the Baseten playground, or contact Baseten to raise the limit for production workloads.Resources
Baseten web search docs
Runnable Messages, Responses, and Chat Completions examples with server-side tools.
Server-side tool reference
Tool catalog, loop settings,
tool_choice formats, and response shapes.