Skip to main content
Portrix includes built-in managed web search that lets AI models retrieve current information from the web before generating a response. There’s no separate search API to integrate, no API keys to manage, and no retrieval pipeline to build — you enable it with a single header and Portrix handles the rest. AI models have a training data cutoff and cannot answer questions about recent events, live prices, or anything that has changed since their training ended. Managed web search closes this gap. When search is enabled, Portrix’s search layer sits between your request and the model:
  1. It extracts the user’s information need from the message
  2. It fetches relevant, current web content
  3. It injects that content into the model’s context as grounding material
  4. The model generates a response using both its parametric knowledge and the fresh web data
This means you get accurate, up-to-date answers without changing your prompt format or managing a retrieval pipeline yourself. Set the x-portrix-search: true header on any chat completions request to activate managed web search for that call.
You can also enable search in the request body by adding "search": true alongside your model and messages fields — useful in environments where you cannot set custom headers.

How it works

When a request arrives with search enabled, Portrix executes the following pipeline before the model sees the message:
1

Query extraction

Portrix parses the user’s message and generates one or more optimised search queries.
2

Web retrieval

The search layer fetches current results from across the web, including news, documentation, and general web content.
3

Context injection

Retrieved content is formatted and prepended to the model’s context as a system-level grounding block. Your original system prompt is preserved.
4

Model response

The model reads the injected content and your original messages, then generates a response grounded in the fresh information.

Search with tool calling

For applications that need fine-grained control over when search runs, you can expose web search as an OpenAI-compatible tool. Define the tool in your request and Portrix handles execution when the model calls it:
When the model decides it needs a web search, it emits a tool_calls response. Portrix intercepts the web_search call, executes it, and returns the results — you handle the follow-up completion in the same way as any other tool use.

Use cases

Current events

Answer questions about news, sports results, or market movements that postdate the model’s training cutoff.

Product research

Look up current pricing, availability, and reviews for products and services in real time.

Live data queries

Retrieve live metrics, exchange rates, weather, or any publicly available real-time data.

Fact-checking

Ground model outputs in current authoritative sources to reduce hallucination on factual claims.

Response with citations

When search is enabled, the response object includes a citations field containing the source URLs used to ground the answer. Use these to display references in your UI or to let users verify claims:
Access citations in Python with response.citations or via the raw JSON if you are working with the HTTP API directly.
Managed web search adds approximately 1–3 seconds of latency to each request while results are fetched and injected. If your application is latency-sensitive — such as a real-time chat interface — consider enabling search only for messages that contain explicit signals of recency-dependent questions (e.g. “latest”, “current”, “today”).
Combine managed web search with a capable reasoning model like openai/gpt-4o or anthropic/claude-3-5-sonnet for the best results. These models are better at synthesising retrieved content into coherent, well-attributed answers.