Perplexity Sonar

Perplexity Sonar
Perplexity · Research & Search
POST /v1/chat/completions

Real-time web-connected search with accurate citations and customizable sources for up-to-date AI search integration in production apps.

At a glance

FieldValue
Model idperplexity-sonar
Input modalitiesText, Image, Document
Output modalitiesText
Context window127K
Weight precision-
Featuresweb_search
Native inferenceNo
NewNo
Supported endpointsPOST /v1/chat/completions, POST /v1/responses, POST /v1/messages, POST /v1/search

Pricing

ChargeSpecRate
Inputper 1M prompt tokens$2.40
Outputper 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

ParameterTypeRequiredDefaultDescription
temperaturenumberno0.2Sampling temperature. 0 = deterministic, 2 = maximum randomness. · Range: 0 – 2
top_pnumberno0.9Nucleus sampling probability mass. Lower = more focused. · Range: 0 – 1
max_tokensnumberno1024Maximum tokens in the response. · Range: 1 – 32768
search_context_sizeenumno"medium"Higher context gives better answers but increases the base fee per request. · Allowed: low, medium, high
search_modeenumno"default"Filter search results by source type. Academic = scholarly papers, SEC = financial filings. · Allowed: default, academic, sec
search_domain_filterstringno-Comma-separated list of domains (allow with no prefix, deny with leading -)
search_language_filterstringno-Comma-separated ISO 639-1 codes (2 letters). Max 10.
search_after_datestringno-Use YYYY-MM-DD. Only include sources after this date.
search_before_datestringno-Use YYYY-MM-DD. Only include sources before this date.
search_recency_filterenumno"none"Relative time filter. Cannot be combined with specific dates. · Allowed: none, hour, day, week, month, year
last_updated_after_filterstringno-Use YYYY-MM-DD. Only include sources after this date.
last_updated_before_filterstringno-Use YYYY-MM-DD. Only include sources before this date.
countrystringno-Two-letter ISO 3166-1 code (e.g. US, GB) for biasing results to a country.
regionstringno-State or province name for location bias.
citystringno-City name for location bias.
latitudenumberno-Latitude for location bias, in decimal degrees.
longitudenumberno-Longitude for location bias, in decimal degrees.
return_imagesbooleannofalseInclude relevant images alongside the search results.
image_domain_filterstringno-Comma-separated domains for image results. Prefix with ’-’ to exclude. Max 10.
image_format_filterstringno-Comma-separated image file formats to allow (jpg, png, etc.).
return_videosbooleannofalseInclude relevant videos alongside the search results.
disable_formattingbooleannofalseSkip the EmpirioLabs Markdown formatting (citation [N] rewriting + References block + Images / Videos blocks). The raw upstream answer with plain [N] citations is returned; structured search_results / citations still pass through where Perplexity emits them.

Machine-readable schema: GET https://api.empiriolabs.ai/v1/models/perplexity-sonar.