๐Ÿ”Ž

Perplexity Sonar

Perplexity Sonar is Perplexity AI's search-grounded model family, built specifically to power "AI search engine" style question-answering rather than general open-ended chat. It ranks #12 in usage share at roughly 7.6%. Its defining feature is that every answer comes back with live web citations attached, so users (and API callers) can see exactly which sources backed a given claim โ€” reducing hallucination risk compared to models with no live web access.

Quick facts
Made by: Perplexity AI
Access: Free tier in the Perplexity app + a paid, usage-based API
Context window: ~128K tokens
Strengths: Live web search grounding, inline citations, up-to-date answers on current events
Primary use case: AI-powered search and research โ€” question-answering that needs cited, current information
Jump to: ExampleGetting startedBest for

Example

The Sonar API uses the same OpenAI-compatible chat completions format, but responses include a citations field with the source URLs behind the answer.

curl https://api.perplexity.ai/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "sonar",
    "messages": [{"role": "user", "content": "What are the latest updates to the Python 3.14 release?"}]
  }'
# the JSON response includes a "citations" array
# alongside the normal chat completion, e.g.
{
  "choices": [...],
  "citations": ["https://docs.python.org/3.14/whatsnew/3.14.html", ...]
}

Getting started

Sign up for a Perplexity API key from the developer settings page, then call the endpoint with any HTTP client.

# 1. sign up and generate an API key at perplexity.ai/settings/api

# 2. call it with curl, requests, or the OpenAI SDK pointed at
#    base_url = "https://api.perplexity.ai"
export PERPLEXITY_API_KEY="your-key-here"
Best for: Building research assistants, fact-checking tools, or any product where users need a sourced answer to "what's happening right now" rather than a model's frozen training-data knowledge.