What is managed web search?
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:- It extracts the user’s information need from the message
- It fetches relevant, current web content
- It injects that content into the model’s context as grounding material
- The model generates a response using both its parametric knowledge and the fresh web data
Enabling web search
Set thex-portrix-search: true header on any chat completions request to activate managed web search for that call.
"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: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 acitations field containing the source URLs used to ground the answer. Use these to display references in your UI or to let users verify claims:
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”).