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.
Controlling search
| web_search | Behavior |
|---|---|
| true | The request searches the web first. |
| false | The request never searches. |
| left out | An API-key request doesn't search. In the Playground, Web Search Allowed lets Aivana use search when your question calls for it. |
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.
Try the Playground
Experiment with Aivana MMI — no account or code required.
Quickstart Guide
Get your key and make your first request in minutes.
Still have questions? We are here to help!