Web search

A built-in tool backed by our own search instance — the model asks, we search and deduplicate, and you get an answer with the results already folded in.

web_search runs against a search instance this platform operates itself — nothing here calls out to a third-party search API. Results are deduplicated to one per domain before the model ever sees them, so a question about a statute does not come back as the same aggregator site eight times over.

What this costs
Metered per search — one charge each time the model actually calls web_search, regardless of how many results come back. Pricing is set by your platform operator and may not be published yet — check Pricing.

Declaring it

tools
[{ "type": "web_search" }]

That is the whole declaration — no ids, no configuration. When it calls the tool, the model itself chooses the arguments below.

ParameterTypeDescription
query
Required
stringWhat the model searches for.
count
Optional
integerHow many results to return.
Default: 6
lang
Optional
stringfa, en or es to narrow the search to one language; left empty, it is unrestricted.

What comes back

The raw result list is not handed to you over the API — it goes to the model, and only the model's finished answer comes back in choices[0].message.content. If you need the sources visible, ask for them: a system message telling the model to list the URL for every claim works, because the titles, URLs and snippets below are exactly what it has to work with.

What the model sees
{
  "query": "latest Python release",
  "results": [
    { "title": "Python 3.13 release notes",
      "url": "https://docs.python.org/3/whatsnew/3.13.html",
      "snippet": "…" },
    { "title": "Download Python",
      "url": "https://www.python.org/downloads/",
      "snippet": "…" }
  ]
}

Complete example

One request. The model is larsa-auto — the only model on this platform that runs web_search server-side.

curl https://api.console.larsa.larsima.com/v1/chat/completions \
  -H "Authorization: Bearer $LARSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "larsa-auto",
    "messages": [
      {"role": "system", "content":
        "List the source URL after every claim you make from a search."},
      {"role": "user", "content":
        "What is the latest stable Python release?"}
    ],
    "tools": [{"type": "web_search"}]
  }'
Navigate Open esc Close