Skip to main content

Moderate
perplexity/sonar/chat

Perplexity Sonar web-grounded chat endpoint: 127,000-token context, up to 8,000 output tokens, image_url vision input, four reasoning levels, and structured JSON output.

Input $0.2125Output $2.125per 1 million tokensCached input $0.2125Cache write $0.2125

Workbench

Perplexity Sonar

What can Perplexity Sonar help with?

Missing the model you need?

WEB-GROUNDED SEARCH CHAT API

Perplexity Sonar API at a glance

Perplexity's fast search-grounded chat model with live web answers, 127,000-token context, vision, and JSON output.

Input context
127K
Perplexity Sonar accepts up to 127,000 tokens per call.
Reply ceiling
8K
Perplexity Sonar max_tokens reaches 8,000 (default 4,096).
Effort levels
4
Perplexity Sonar effort options: none, low, medium, high (default medium).
Input types
2
Perplexity Sonar reads text and image_url in one turn.
Streaming
SSE
Perplexity Sonar streams incremental replies over SSE.

Results

What Perplexity Sonar is good at

  • Web grounding

    Current answers backed by live search

    Perplexity Sonar retrieves fresh web context automatically before answering, reducing stale-cutoff gaps for news, product docs, pricing changes, and public filings.

  • Fast & compact

    127K input window with focused 8K replies

    Combine your internal context or reference notes with live search inside a 127,000-token window while keeping answers concise and responsive up to 8,000 tokens.

  • Vision & JSON

    Inspect images and return structured records

    Pass image_url parts alongside search questions and use response_format to obtain structured JSON summaries ready for downstream dashboards or pipelines.

Before you run it

What to know before you run Perplexity Sonar

Chat
Perplexity Sonar allows 127,000 input tokens across 256 messages and max_tokens from 1 to 8,000 (default 4,096).
Chat
On Perplexity Sonar, reasoning tokens count inside max_tokens, so tight limits at higher effort can end before visible text.
Chat
Live checks placed Perplexity Sonar in the borderline tier: romantic and sensual scenes pass, graphic horror is softened with warnings, and explicit erotica is refused or toned down.

Use cases

What to build with the Perplexity Sonar API

  • Competitive and release monitoring

    Track new software releases, changelog updates, or regulatory announcements and output dated bullet summaries for product teams.

  • Customer and analyst research briefs

    Combine a company profile or internal memo with live web lookup to produce concise background briefs with clear dates.

  • Fact-checked content pipelines

    Verify public statistics, documentation URLs, or technical specifications in structured JSON before publishing.

Prompts

Perplexity Sonar prompt examples you can copy

  • Chat

    Verify current browser release milestones

    Summarize the latest official release milestones for WebGPU across major desktop browsers and cite key dates. Focus on verifiable public announcements, note any regional or platform caveats, and flag items that need confirmation.

    Why it works. This query highlights Sonar's live web grounding by asking for dated public milestones and flagging details that still require verification.

    Try this prompt

Pricing

Perplexity Sonar API pricing

From $0.212 per million input tokens and $2.13 per million output tokens.

Get started

How to use the Perplexity Sonar API in three steps

  1. Step 1

    Ask specific, time-bounded questions

    State the entity, timeframe, and jurisdiction explicitly so web retrieval focuses on authoritative sources instead of broad overviews.

  2. Step 2

    Match the reasoning level to query depth

    Use none or low for quick lookups and medium or high when synthesizing conflicting web reports into a single structured brief.

  3. Step 3

    Validate structured outputs before storing

    When using response_format for JSON extraction, verify dates and numerical fields in your application before writing to a database.

Parameter reference and code samples are in the API and Readme tabs at the top of this page.

FAQ

Perplexity Sonar API FAQ

About Perplexity Sonar

Perplexity Sonar turns an ordinary chat completions call into a live web-grounded lookup with a 127,000-token window, image input, adjustable reasoning, and JSON output. Use it whenever freshness matters more than multi-file code editing.

Related models and next tasks