> ## Documentation Index
> Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Perplexity Models Move to the Agent API

> Perplexity is retiring the Sonar chat-completions API on 27th September, 2026. The AI Gateway now serves Perplexity models through the Agent API. Your model IDs, requests, and responses stay the same.

<Note>
  **Applicable to:** Users who call **Perplexity AI** models through the AI Gateway. For almost everyone, **no action is required**.
</Note>

## Your Perplexity models keep working

Perplexity is retiring the Sonar chat-completions API on **27th September, 2026** ([Perplexity: Migrating from Sonar](https://docs.perplexity.ai/docs/agent-api/migrate-from-sonar/overview)). The AI Gateway now serves Perplexity models through its replacement, the **Agent API**.

Nothing changes in how you call them: the same model IDs, the same request parameters and search filters, and the same content, `citations`, and `search_results` in the response (with web search still on by default). Upgrade to a release that includes this change and you are done.

## How your model IDs map on Chat Completions

Perplexity kept a single Sonar model slug, `perplexity/sonar`, and now expresses the old quality tiers as **presets**. The gateway does this translation for you, so you keep sending the model ID you already use:

| Model ID you send     | Agent API preset |
| --------------------- | ---------------- |
| `sonar`               | `fast`           |
| `sonar-pro`           | `low`            |
| `sonar-reasoning`     | `low`            |
| `sonar-reasoning-pro` | `medium`         |
| `sonar-deep-research` | `high`           |

Every one of them runs on `perplexity/sonar`, and the gateway pins that model explicitly. Pinning matters: a preset sent without a model can resolve to a third-party model, so pinning keeps your prompts with Perplexity. The preset is also what carries web search, which is why grounding stays on by default.

Perplexity publishes no preset for `sonar-reasoning`. TrueFoundry places it on `low`, one tier below `sonar-reasoning-pro`.

## Two things worth a look

* **If you read `images` or `related_questions`**: these are no longer returned, as the Agent API has no equivalent. `search_results` carries each source's URL, title, and publication date, which covers most of what they were used for.
* **If you branch on an empty `finish_reason`**: non-streaming responses now return the real value (`stop`, `length`, or `tool_calls`) instead of an empty string.

A few legacy Sonar parameters have no Agent API equivalent: `top_k`, the penalty parameters, `n`, `stop`, `seed`, `logprobs`, `search_mode`, `disable_search`, `return_images`, and `return_related_questions`. They are ignored rather than rejected, so requests carrying them keep succeeding.

The [Perplexity AI](/docs/ai-gateway/perplexity-ai) page has the details, including what each ignored parameter maps to.

## Perplexity now supports the Responses API

Perplexity models are also available on the [Responses API](/docs/ai-gateway/responses-api) using the model ID `sonar`. This is the surface Perplexity's Agent API is built around, and we recommend it for new integrations.

It behaves differently from Chat Completions by design. Nothing is added on your behalf: no preset and no web search tool. You ask for what you want, so send a `preset` or `tools: [{ "type": "web_search" }]` when you need grounding. The preset mapping and the automatic web search described above apply to Chat Completions only, where they exist to preserve how Sonar always behaved.

Existing Chat Completions integrations need no change.

***

If you have questions about your Perplexity integration, reach out to [**support@truefoundry.com**](mailto:support@truefoundry.com). We're happy to assist.
