Perplexity Sonar

Perplexity · Research & Search
POST /v1/chat/completionsReal-time web-connected search with accurate citations and customizable sources for up-to-date AI search integration in production apps.
At a glance
| Field | Value |
|---|---|
| Model id | perplexity-sonar |
| Model release date | - |
| Input modalities | Text, Image, Document |
| Output modalities | Text |
| Context window | 127K |
| Weight precision | - |
| Features | web_search |
| Native inference | No |
| New | No |
| Supported endpoints | POST /v1/chat/completions, POST /v1/responses, POST /v1/messages, POST /v1/search, POST /v1beta/models/perplexity-sonar:generateContent |
| Alternate model ids | perplexity/sonar |
Pricing
| Charge | Spec | Rate |
|---|---|---|
| Input | per 1M prompt tokens | $2.40 |
| Output | per 1M generated tokens | $2.40 |
| Base Fee (Low Context) | per request | $0.012 |
| Base Fee (Medium Context) | per request | $0.019 |
| Base Fee (High Context) | per request | $0.029 |
Example request
curl https://api.empiriolabs.ai/v1/search \-H 'Authorization: Bearer $EMPIRIOLABS_API_KEY' \-H 'Content-Type: application/json' \-d '{"model": "perplexity-sonar", "query": "latest LLM benchmarks 2026"}'
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
max_tokens | number | no | - | Maximum tokens in the response, at least 16. When omitted, the model’s own default applies. · Range: 16 – 32768 |
search_context_size | enum | no | "medium" | Higher context gives better answers but increases the base fee per request. · Allowed: low, medium, high |
search_mode | enum | no | "default" | Filter search results by source type. Academic limits search to scholarly publishers. SEC adds financial filings and company data. · Allowed: default, academic, sec |
search_domain_filter | string | no | - | Comma-separated domains. Prefix with ’-’ to exclude. Max 20. |
max_results | number | no | 10 | Most results each web search returns. More results give more sources to draw on. · Range: 1 – 50 |
search_after_date | string | no | - | Only include sources published after this date. Use MM/DD/YYYY or YYYY-MM-DD. |
search_before_date | string | no | - | Only include sources published before this date. Use MM/DD/YYYY or YYYY-MM-DD. |
search_recency_filter | enum | no | "none" | Relative time filter. Cannot be combined with specific dates. · Allowed: none, hour, day, week, month, year |
last_updated_after_filter | string | no | - | Only include sources last updated after this date. Use MM/DD/YYYY or YYYY-MM-DD. |
last_updated_before_filter | string | no | - | Only include sources last updated before this date. Use MM/DD/YYYY or YYYY-MM-DD. |
country | string | no | - | Two-letter ISO 3166-1 code (e.g. US, GB) for biasing results to a country. |
region | string | no | - | State or province name for location bias. |
city | string | no | - | City name for location bias. |
latitude | number | no | - | Latitude for location bias, in decimal degrees. |
longitude | number | no | - | Longitude for location bias, in decimal degrees. |
disable_formatting | boolean | no | false | Return the answer without EmpirioLabs formatting: citations stay as plain [N] markers, and no References, Images or Videos block is added. search_results and citations are still returned. |
Machine-readable schema: GET https://api.empiriolabs.ai/v1/models/perplexity-sonar.
