BazaarLinkBazaarLink
Sign in
Solutions / Web search

Let the model check the web
before it answers

Add :online to the model name, or turn on web search in the request. BazaarLink runs the search first, hands the model what it found along with the sources, and the answer comes back with clickable citations.

Read the web search docs Browse models

Three ways to turn it on — pick one

All three behave the same. BazaarLink runs the search; these parameters are not passed through to the model. Works on chat/completions, responses and messages, streaming or not.

Append :online to the model

The simplest form: add :online after any supported model ID.

{
  "model": "openai/gpt-4o-mini:online",
  "messages": [
    { "role": "user", "content": "What changed in the EU AI Act this month?" }
  ]
}

plugins

Add a plugins entry with id web; max_results adjusts how many sources are retrieved (capped).

{
  "model": "openai/gpt-4o-mini",
  "plugins": [{ "id": "web", "max_results": 5 }],
  "messages": [
    { "role": "user", "content": "What changed in the EU AI Act this month?" }
  ]
}

web_search_options

Choose a search level with search_context_size: low, medium (default) or high.

{
  "model": "openai/gpt-4o-mini",
  "web_search_options": { "search_context_size": "high" },
  "messages": [
    { "role": "user", "content": "What changed in the EU AI Act this month?" }
  ]
}

The parameter format is compatible with OpenRouter: code that already enables web search the OpenRouter way keeps working after you point its base URL at BazaarLink.

Works with BYOK and BYOC too

Running the model on your own upstream key or your own machine? Add :online just the same and the model checks the web before answering. The search runs on the platform side, and the results go to your key or node together with the question.

BYOK

Handled by your key

BazaarLink doesn't charge the model cost — only the search fee.

About BYOK
BYOC

Handled by your node

The model fee is zero — only the search fee is charged.

About BYOC

The search fee is billed at platform prices, so your account needs enough balance to cover it. If a request is handled by a platform model instead, the model is billed at platform rates.

Search levels

low
Retrieves fewer sources — good for a quick fact check.
medium (default)
The general-purpose default.
high
Runs a deeper search for questions that need several sources compared; higher unit price.

How billing works

Per search, at platform pricing

Each web search is billed at platform pricing, on top of the model's own cost; high-level searches cost more per search.

Free models still pay for search

The model itself is free, but the web search is billed at platform pricing.

Failed searches are not billed

If the search service is unavailable, the request returns 503 (web_search_unavailable), the model is not called and there is no search charge. If the model does not end up producing a successful response, there is no search charge either.

Rejected before search, never searched

Requests stopped before the search — insufficient balance, invalid parameters and similar — do not run a search and incur no search charge.

Answers come with their sources

Every source the answer draws on is added to annotations as a url_citation with its URL, title and an excerpt, so you can show citations in your UI.

"message": {
  "role": "assistant",
  "content": "…",
  "annotations": [
    {
      "type": "url_citation",
      "url_citation": {
        "url": "https://example.com/article",
        "title": "Example article",
        "content": "Source excerpt…",
        "start_index": 0,
        "end_index": 0
      }
    }
  ]
}
  • chat/completions: non-streaming responses carry them in choices[].message.annotations; streaming sends one extra chunk with only delta.annotations before [DONE].
  • responses: in the output_text annotations; messages: on the text content block's annotations.
  • No [1]-style markers are inserted into the answer text. If the model marks a source in its answer, start_index and end_index point at that span; otherwise both are 0.

Every parameter, with examples

The full parameter list, error codes and complete examples for each endpoint are in the web search section of the docs.

Read the web search docs

Add :online to your next request

Nothing to apply for — your existing API key works. Search charges come out of your account balance.

Get an API key
Support
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.