Skip to content
AnswerWell geo Documentation

Research · 10 min read · Answerwell

Chat Completions Migration, Agent Effort Levels, and Web Search

When Sonar chat completions end, how to migrate to the Agent API, pick effort levels, and configure web_search versus the Search API.

This page summarizes Perplexity documentation on Sonar Chat Completions (legacy web-grounded chat) and its replacement, the Agent API, including effort levels, the web_search tool, and the separate Search API. Sonar pages remain for accounts with continued access, but new work should move to the Agent API.

Sonar Chat Completions: support end and what still works

Section titled “Sonar Chat Completions: support end and what still works”

Sonar exposed web-grounded answers through an OpenAI-style chat completions interface at POST https://api.perplexity.ai/v1/sonar, with optional async jobs at POST https://api.perplexity.ai/v1/async/sonar.

Sonar Chat Completions support ended on September 27, 2026. Synchronous and streaming requests keep working: they are being reformulated as Agent API requests, rolling out gradually by model.

— Perplexity, Migrate from Sonar overview

Asynchronous Sonar requests are not reformulated and are no longer supported; move them to background mode.

— Perplexity, Migrate from Sonar overview

Legacy model pages repeat that Sonar Chat Completions has been replaced by the Agent API and point to the migration guide. On the benchmarks page, Perplexity states Sonar is retired and Agent API numbers are the current product direction.

Sonar is retired and has migrated to the Agent API. The Sonar numbers on this page are the baseline those models were measured against before retirement.

— Perplexity, Agent API vs Sonar benchmarks

The older sonar-reasoning model was removed on December 15, 2025; use sonar-reasoning-pro instead (changelog).

sonar-deep-research and other long jobs could use the async API: submit with POST https://api.perplexity.ai/v1/async/sonar, poll GET https://api.perplexity.ai/v1/async/sonar/{request_id} until status is COMPLETED, then read response (create async, Sonar Deep Research).

Async requests have a time-to-live (TTL) of 7 days. After this period, the request and its results will no longer be accessible.

— Perplexity, Sonar Deep Research

After the September 2026 cutover, async Sonar is not reformulated; use Agent API background runs instead (migrate overview, how to migrate).

Agent API versus Sonar: endpoints and response shape

Section titled “Agent API versus Sonar: endpoints and response shape”
Concern Sonar (legacy) Agent API (current)
Primary call chat.completions.create / POST /v1/sonar responses.create / POST /v1/agent (alias POST /v1/responses)
Input messages input (+ optional instructions)
Answer text choices[0].message.content output_text; full trace in output array
Search Built into Sonar models web_search and other tools; effort presets replace model names for many flows
OpenAI SDK base_url="https://api.perplexity.ai" Same host; use Responses-style client.responses.create() (OpenAI compatibility, how to migrate)

Perplexity recommends migrating all new integrations to the Agent API for multi-model support, tool loops, sandbox, MCP, and tuned effort levels (migrate overview). Step-by-step mapping lives in How to migrate from Sonar and the GitHub migrate-sonar-to-agent-api skill.

Multi-turn Sonar threads map to previous_response_id or replayed turns in input (how to migrate).

The Sonar API provides web-grounded chat completions using Perplexity’s Sonar models through an OpenAI-compatible interface.

— Perplexity, Sonar API quickstart

Model ID Role (per docs) Notes
sonar Lightweight, cost-effective grounding Baseline; Pro claims 2× more results (Sonar, Sonar Pro)
sonar-pro Complex queries, deeper understanding Pair with Pro Search for multi-step search
sonar-reasoning-pro Multi-step CoT, hard analytical tasks Emits <think> before answer; structured JSON needs a custom parser (Sonar Reasoning Pro)
sonar-deep-research Exhaustive multi-source reports Prefer async API for long runs (Sonar Deep Research)

An advanced search model designed for complex queries, delivering deeper content understanding with enhanced search result accuracy and 2x more search results than standard Sonar.

— Perplexity, Sonar Pro

A powerful research model capable of conducting exhaustive searches across hundreds of sources, synthesizing expert-level insights, and generating detailed reports with comprehensive analysis.

— Perplexity, Sonar Deep Research

Sonar responses add Perplexity fields on top of OpenAI-style JSON: citations, search_results (title, url, snippet, dates), and usage often including search_context_size and nested cost (Sonar API quickstart). Illustrative Sonar Pro pricing on a sample call combines per-million token rates, per-request search context, and totals in usage.cost (Sonar Pro).

Effort levels: Sonar model to Agent API preset

Section titled “Effort levels: Sonar model to Agent API preset”

Effort replaces picking a Sonar model name for many Agent API flows. Perplexity’s suggested starting map:

Former Sonar model Agent API effort Typical use (Perplexity)
sonar fast Single-fact lookups, quick summaries
sonar-pro fast Everyday research, light multi-step
sonar-reasoning-pro low Multi-hop browsing, wide aggregation
sonar-deep-research high Expert deep research, many sources
(beyond Sonar) xhigh Longer tool loops, code sandbox

Details and legacy Pro Search search_type hints ("fast" → effort fast, "pro" → effort low, no "auto" equivalent on Agent API) are in How to migrate.

On published benchmarks, Perplexity claims Agent API low effort beats legacy Sonar Deep Research on BrowseComp and DSQA at a fraction of per-request cost:

Even the low effort level beats Sonar’s best model, Deep Research, on both benchmarks at 1-2% of its per-request cost.

— Perplexity, Agent API vs Sonar benchmarks

Treat benchmark dollars as documentation snapshots, not a quote for your account (pricing).

Search API versus Agent API web_search: which to use

Section titled “Search API versus Agent API web_search: which to use”

Two different products address “get web data” versus “get a written answer.”

Ranked results your code filters, stores, or feeds to your own model — Search API” vs “A finished answer with citations, written by a model that searched for you — Agent API with the web_search tool.

— Perplexity, Search overview

  • Search API — POST /search returns ranked JSON snippets; you bring your own model or RAG. Successful calls bill as query units (multi-query rules in pricing).
  • Agent API — declare tools: [{ "type": "web_search", ... }], read citations from the output array; tool invocations bill separately from tokens (Web Search tool, FAQ).

Built-in Agent tools listed in the FAQ include web search, image search, fetch URL, people search, finance search, and code sandbox, plus custom functions and MCP.

Fast Search search_type is not Agent API effort: "fast"

Section titled “Fast Search search_type is not Agent API effort: "fast"”

These names collide in conversation but not in the API.

Fast Search is a search type, not the Agent API fast effort level.

— Perplexity, Fast Search

Mechanism What "fast" means Pricing hint (docs)
Search API search_type: "fast" Lower-latency search tier About $1.00 / 1K requests vs $5.00 standard web (Fast Search)
Agent web_search search_type: "fast" Fast Search path per tool call $1.00 / 1K invocations vs $2.50 for web (Web Search)
Agent API effort: "fast" Quality/latency preset for the agent Different knob; default tool search type on many efforts is still fast unless overridden

Use fast for day-to-day agent loops and high-volume tool calls. Use web for rare, difficult, or ambiguous questions. search_type is separate from the Agent API fast effort level.

— Perplexity, Web Search

The fast, low, medium, high, and xhigh effort levels set search_type: “fast” by default. To override an effort level’s search type, pass search_type on the web_search tool in your request.

— Perplexity, Web Search

Passing search_type on the tool needs Python SDK 0.43.6+ or TypeScript 0.38.6+ (Web Search).

Legacy Sonar top-level search_domain_filter, search_recency_filter, and date filters move under tools[].filters on Agent API (how to migrate, Sonar filters). On the Web Search tool page, up to 20 domains or URLs per request apply to search_domain_filter; use retry/backoff for Agent rate limits (Web Search).

Academic search_mode on Sonar silently ignored date-style filters; put dates in the user query instead (Sonar filters). Sonar’s academic search_mode is not mirrored one-for-one on the Agent API; use filters and prompting (how to migrate).

Pro Search required stream: true; without streaming, calls fell back to standard Sonar Pro (Pro Search quickstart). web_search_options.search_type could be "fast", "pro", or "auto" (classifier).

Pro Search provides two built-in tools that the model uses automatically to answer your queries. The model decides which tools to use and when, so no configuration is needed.

— Perplexity, Pro Search built-in tools

These tools are called automatically by the system; custom tools cannot be registered.

— Perplexity, Pro Search built-in tools

On Agent API, multi-step behaviour maps to effort levels, explicit models, and max_steps rather than Sonar’s "auto" classifier (how to migrate).

From How to migrate — parameter reference:

  • max_tokens → max_output_tokens; stream unchanged; JSON schema via text.format on Agent API (FAQ).
  • return_images → image_search tool (image_search defaults filters.safe_search: true; legacy Sonar web SafeSearch differed — FAQ, image search).
  • disable_search / empty tools: omit web_search; tools: [] does not clear effort-bundled tools — max_tool_calls: 0 is documented as a workaround.
  • No Agent equivalent for Sonar response_format.type: "regex", video fields, or search_language_filter.
  • Citations: fast effort uses [1]; higher efforts use [web:1]; sources appear in output items type: "search_results" (how to migrate).

sonar-reasoning-pro with structured output still returns thinking tokens; response_format does not strip them (Sonar Reasoning Pro). Image input with structured outputs is not supported on thinking models (same page).

Section titled “Prompting: why the system prompt does not steer Sonar search”

Sonar runs a web search before generating its answer, and only the user message is used to drive that search. The system prompt is not visible to search; it reaches the model only at answer time, when results are already in hand.

— Perplexity, Sonar prompt guide

Use search_domain_filter, search_recency_filter, and related parameters instead of system-instruction workarounds (Sonar filters). On Agent API, instructions are re-read each agent loop turn (prompt guide).

API answers can differ from the web UI because configuration and models differ:

The API uses the same search system as the UI with differences in configuration, so their outputs may differ. The underlying AI model might differ between the API and the UI for a given query.

— Perplexity, FAQ

Full tables live in pricing. Representative tool invocation rates:

Tool Price (docs)
web_search (web) $0.0025 / invocation
web_search (fast) $0.001 / invocation
fetch_url $0.0005 / invocation
image_search $0.0025 / successful invocation
sandbox $0.03 / session (20-minute window)

web_search is billed at $2.50 per 1,000 invocations**, or **$1.00 per 1,000 invocations with search_type: “fast”. Fast calls are still reported under tool_calls_details.search_web. Model token usage is billed separately according to Agent API token pricing.

— Perplexity, Web Search

Sonar billed search context per request plus tokens (see sample math on Sonar Pro and Sonar Reasoning Pro).

Brave Search Answers (alternative pattern)

Section titled “Brave Search Answers (alternative pattern)”

For comparison, Brave Search Answers separates single-search (faster, lower cost) from multi-search research modes:

The decision between single-search and multi-search significantly influences both cost efficiency and response time.

— Brave, Search Answers

Brave pricing mixes per-search fees with token rates on the Answers doc; Perplexity mixes per-request or per-tool invocation with model tokens. Both ecosystems distinguish lightweight Q&A from deeper multi-search research; Perplexity encodes depth primarily in Agent effort and tool choice.

AG2 integration notes async Sonar ends September 27, 2026; perplexity_answer paths should follow the Sonar migration guide for full Agent response shapes. LangChain is documented as verified with Agent API (same page). Hermes and Search quickstart cover adjacent entry points.

Hosting MCP at https://api.perplexity.ai/mcp exposes tools such as perplexity_search with optional search_type (changelog, Fast Search).

Missing Sonar behaviour after migration can be reported to Perplexity at api@perplexity.ai (how to migrate).

  1. Confirm your integration target: legacy POST https://api.perplexity.ai/v1/sonar versus POST https://api.perplexity.ai/v1/agent, and plan async Sonar cutover before September 27, 2026 (migrate overview).
  2. Send a test Sonar call with Authorization: Bearer and inspect citations, search_results, and usage.cost (Sonar API quickstart).
  3. Mirror the same question on Agent API with chosen effort and web_search; verify tool_calls_details.search_web when using search_type: "fast" (Web Search).
  4. If you use raw retrieval, exercise POST /search and compare latency and billing with Agent-grounded answers (Search overview, Fast Search).
  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page looks wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact wording you are asking about, and we will correct or clarify it.