codai Tools API
Native web tools for agents: verified web search, a server-side page fetch with an SSRF guard and asynchronous deep research (`/v1/research`). The contract (names, JSON schemas, limits, how results render for a model) is shared with every codai agent surface — VS Code, desktop, phone, headless CLI, hosted MCP and the SDKs — and lives in `packages/agent-core/spec/tools-web.json`. None of them is a model call, so no usage row is written; each call is metered separately: $3 per 1,000 fast searches, $8 per 1,000 deep searches, $0.50 per 1,000 fetches and $0.20 per research job (plus the job's own model tokens), charged in EUR from your wallet. The first 1,000 calls per user per UTC month are free, and calls made inside a codai agent turn are never charged; errors and cache hits are never charged either. All of them share the per-key request limiter with `/v1/chat/completions` and pass through your rules (a `deny web_search` / `deny browser_fetch` rule is a 403, never an empty result; `deny web_search` also denies research). The `/v1/cards/*` endpoints return data already shaped as card blocks (weather, places, maps, exchange rates, link previews). Weather, exchange rates and link previews are free; Google-backed places, geocoding and static maps write one usage row per upstream call at Google's list price.