Perplexity is retiring its Sonar API tiers on September 27, 2026 and directing developers to the Agent API. This is not a model-name replacement. Tool configuration, request fields, response structure, citations and cost accounting need a controlled migration.
Perplexity introduced the Agent API as one interface for models, web access and tools. Its migration notice says Sonar tiers retire September 27. Existing contract customers keep access through their current contract term.
What changes in the move
| Area | Sonar habit | Agent API decision |
|---|---|---|
| Model | Choose a Sonar tier | Choose a preset or provider model available through Agent API |
| Web | Search behavior bundled with the tier | Configure web search and URL fetch as tools |
| Other tools | Limited by the Sonar endpoint | Code, MCP, finance and person search can be available |
| Response | Sonar-specific fields and citations | Parse the Agent API response and tool outputs |
| Cost | Tier request and token pricing | Add model tokens and any tool or request charges |
| Reliability | One endpoint contract | Handle tool failure, partial output and multi-step latency |
Do not migrate with a string replacement
Changing a model identifier while keeping the old parser can silently drop citations or fail when the new response includes tool steps. Build a small adapter that converts your application request into Agent API input and normalizes the response into your internal format.
Keep your product contract stable. The rest of the application should receive a consistent answer, source list, usage record, status and error object whether the request went to Sonar or Agent API.
Map intent before choosing tools
- Fresh answer with sources: start with web search and a bounded search configuration.
- Known-page analysis: use URL fetch only for approved URLs and validate redirects.
- Calculation or transformation: enable code only when the task benefits and sandbox the execution.
- Internal system action: expose the narrowest MCP tools and keep write actions behind approval.
- Market or people lookup: use the specialized tool only if its data and terms fit the product.
Build a citation regression set
Save 30 to 100 representative Sonar requests before the deadline. Include easy, ambiguous, time-sensitive, multi-source and no-good-source cases. Store the original response, citations, latency and usage.
Run the same corpus through Agent API. Check whether every factual answer has usable source URLs, whether citations support the nearby claims, whether dates remain clear and whether low-confidence cases are identified. Answer similarity alone is not enough.
Our MCP stateless migration guide provides a related checklist for credentials, retries and state when tools are involved.
Recalculate cost from the complete workflow
Agent API cost can include the selected model’s input and output tokens plus tool or request charges described in Perplexity’s current pricing documentation. A workflow that searches, fetches pages and calls another tool is not comparable to Sonar by output-token price alone.
| Cost input | Record per request |
|---|---|
| Model usage | Input, cached input if applicable, and output tokens |
| Search | Search requests and configured search depth or context |
| Fetch | Number and size of fetched pages |
| Other tools | Each code, MCP, finance or person-search call |
| Retries | Failed, partial and fallback attempts |
| Human review | Minutes spent correcting sources or output |
A migration sequence with rollback
- Inventory every Sonar model, endpoint, request field and response field in production.
- Create an internal provider adapter instead of spreading Agent API fields across the application.
- Add Agent API behind a feature flag and keep Sonar as the default.
- Run the fixed regression corpus and compare citations, answer quality, latency and total cost.
- Send a small percentage of eligible production reads to the new path.
- Keep write-capable tools disabled until read-only behavior is stable.
- Increase traffic only after error budgets and source checks pass.
- Preserve a one-switch rollback until Sonar access ends for your account.
Failure cases to test
- Search returns no suitable source or sources that disagree.
- A fetched URL redirects, blocks the tool or contains malformed content.
- The model answers before a required tool result arrives.
- The tool succeeds but the final response omits its citation.
- One leg times out after earlier legs have already incurred cost.
- An MCP server asks for a permission beyond the user’s request.
- The result exceeds your product’s latency or spend ceiling.
My take: use the deadline to improve the abstraction
The retirement is inconvenient, but it is a useful forcing function. Applications should not let one vendor response shape leak across the whole codebase. A normalized provider layer makes citations, cost and fallback measurable.
Do not wait until September 26. Build the adapter and regression set now, then move traffic gradually. The migration is complete when your users receive equal or better supported answers inside the same cost and latency boundaries, not when the first request returns HTTP 200.
For multi-provider strategy, read our AI agent routing and spend guide and the Codex versus Claude Code workflow comparison.
Primary sources
Checked September 8, 2026. Retirement timing, contract exception and Agent API capabilities come from Perplexity. The migration architecture and tests are Musthave.ai analysis.