Docs

Guides

Web Search

Web Search

Let Aivana use live web information when a question needs it.

Aivana answers most questions from its own intelligence. For questions about recent events, current figures or a specific web page, live web information gives a better answer. Web search is a setting you control per request.

web_searchBehavior
trueThe request searches the web first.
falseThe request never searches.
left outAn API-key request doesn't search. In the Playground, Web Search Allowed lets Aivana use search when your question calls for it.
bash
curl https://api.aivana.ai/v1/generate \
  -H "X-API-Key: $AIVANA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "What changed in the latest Node.js release?", "web_search": true}'

When search is off

If a question asks for the web ("search the web for…", a link to read) while search is off, the answer is written without searching, and the response's notices include web_search_off so your application can tell your user. An answer is never passed off as searched when it wasn't.

In the Intelligence Trace

When you request the Intelligence Trace, its summary shows under Fresh Data whether live web information was used for the request.

Usage and billing

A request that searches the web is charged every token used to answer it, not only your prompt and the answer, so it uses more tokens than the same question without search. The part served from cache is charged as cached input. If your balance can't cover a search, the request is refused with a 402 that says so, and is never answered as if it had searched.

Usage & Insights includes runs that searched when it estimates how your cost compares with a benchmark. The separate fees for the search itself are left out of that comparison.

Learn more

Parameters

Every option the Generate API accepts.

View in Docs

Try the Playground

Experiment with Aivana MMI — no account or code required.

Open PlaygroundView in Docs

Quickstart Guide

Get your key and make your first request in minutes.

Still have questions? We are here to help!

Try live

Run chat interactively in the Playground without any setup.

On this page

Web SearchControlling searchWhen search is offIn the Intelligence TraceUsage and billing

Helpful links

Aivana Status

Was this helpful?

Still have questions? We are here to help!