Choose a search-augmented API when the answer needs evidence beyond the material your application already supplies. Evaluate the sources and claim support as carefully as the generated prose.
What matters for ai apis with built-in web search
Define what must be current and which sources are acceptable. A search-enabled model can discover material, but the application still needs a standard for supporting a claim. Include a fixture where search results conflict and another where a recent fact cannot be established reliably.
Perplexity’s Sonar quickstart demonstrates citation information in the response, while OpenAI and Gemini document search or grounding features for their model interfaces. Official documentation.
A citation is a link to investigate, not automatic proof that every nearby sentence is supported. Inspect whether the linked source actually establishes the claim, whether its date fits the question and whether the answer distinguishes uncertainty. Preserve that evaluation in the acceptance record.
Separate discovery from a conclusion. The application may need an official source, a direct quote within its allowed use or a comparison of changing facts. Define the evidence requirement before choosing the model so an attractive answer does not lower the source standard after generation.
Ranked candidates
Only active candidates with documented values for this ranking are included. Prices retain the tier and deployment condition shown below.
Blended price = (input price × 3 + output price) ÷ 4, in USD per 1M tokens. This fixed mix is a comparison measure; estimate your own workload separately.
| Model | Provider | Input USD / 1M | Output USD / 1M | Blended USD / 1M | Context tokens | Price condition | Cost |
|---|---|---|---|---|---|---|---|
| Sonar | Perplexity | $1 | $1 | $1 | 128,000 | Standard | Estimate cost |
| Sonar Deep Research | Perplexity | $2 | $8 | $3.5 | 128,000 | Standard | Estimate cost |
| Sonar Reasoning Pro | Perplexity | $2 | $8 | $3.5 | 128,000 | Standard | Estimate cost |
| Sonar Pro | Perplexity | $3 | $15 | $6 | 200,000 | Standard | Estimate cost |
Last verified · Source ↗
This table compares each provider’s lowest documented baseline input-price model. Baseline prices use standard or short-context conditions and exclude separate free-tier and off-peak rows when paid standard rates exist. The full pricing reference preserves all documented conditions.
| Attribute | Sonar | Gemini 2.5 Flash Preview TTS | gpt-5.6-luna |
|---|---|---|---|
| Provider | Perplexity | OpenAI | |
| Official identifier | sonar | gemini-2.5-flash-preview-tts | gpt-5.6-luna |
| Input USD / 1M | $1 | Free | $0.2 |
| Output USD / 1M | $1 | Free | $1.2 |
| Cached input USD / 1M | Not documented | Not documented | $0.02 |
| Context tokens | 128,000 | 8,192 | 1,050,000 |
| Maximum output tokens | Not documented | 16,384 | 128,000 |
| Modalities | text | text | text |
| OpenAI-compatible endpoint | Yes | Not documented | Yes |
| SDK languages | See official documentation | Python, JavaScript, Go, Java | Python, JavaScript, Go, Java, C# |
| Reference | Sonar | Gemini 2.5 Flash Preview TTS | gpt-5.6-luna |
Last verified · Source ↗
This list filters documented search-related capability. It does not establish that every candidate enables search by default or uses the same billing and response shape. Inspect the exact interface and required tool setting before running the fixture.
Our three picks
Find your starting point
Your text and estimates stay in this browser. No API requests are sent to model providers.
Loading verified model records…
The cheapest role should preserve the required source quality and claim support. Balanced can be a starting point when search behavior and model cost both fit the task. Strongest requires a relevant evidence-quality comparison, not only a general model score.
Keep the search settings, selected model, returned sources and accepted answer together. If a router or fallback is involved, preserve the actual serving identity. This makes a later change in source quality or cost attributable to the path used.
When each pick is wrong
A search-enabled candidate is wrong when the task needs only a controlled supplied document and external discovery adds irrelevant material. A low-cost option is wrong when its evidence does not support the answer or repeated searches are needed to reach acceptance.
A candidate is also wrong when the application discards grounding metadata and displays unsupported prose as though the sources were checked. Build citation rendering and verification into the result workflow rather than treating them as decorative links.
Inspect Sonar API guidance, Gemini grounding and OpenAI search-enabled requests for the relevant interface and source behavior.
Estimate cost
Estimate your API costs
Your text and estimates stay in this browser. No API requests are sent to model providers.
Loading verified model records…
Use the cost calculator for supported token categories and add documented search or hosted-tool charges separately when required.
Measure cost per accepted sourced answer, including additional searches and model stages. Keep ordinary factual requests separate from broad research tasks so an average does not hide a much more expensive workflow.
Last verified · Source ↗
Frequently asked questions
Does a citation prove every claim is supported?
Is search enabled identically across providers?
When is external search unnecessary?
What should a search fixture include?
What should be retained with an answer?
What belongs in the cost estimate?
Sources
Last verified · Source ↗