GET

/v1/schemas/perplexity/chat/v1%2Fsonar

kind inputactivity chathash 71680f3f…extracted Aug 15, 2026version currentsource upstream spec ↗

Request body

26 properties · 2 required · 14 $defs
propertytypedescriptionconstraints
model*enumModel to use, for example, sonar-prosonar | sonar-pro | sonar-deep-research | sonar-reasoning-pro
messages*ChatMessage-Input[]Array of messages forming the conversation history
max_tokensintegerMaximum number of completion tokens to generate0 < n ≤ 128000 · nullable
streambooleanIf true, returns streaming SSE responsenullable
stopstring | string[]Stop sequences. Generation stops when one of these strings is producednullable
temperaturenumberControls randomness in the response. Higher values make output more random. Range: 0-20 ≤ n ≤ 2 · nullable
top_pnumberNucleus sampling parameter. Controls diversity via nucleus sampling0 ≤ n ≤ 1 · nullable
response_formatResponseFormatText | ResponseFormatJSONS…Optional. Controls the output format. Omit for default text output. Set `type` to `json_schema` for structured output.nullable
web_search_optionsWebSearchOptionsConfiguration options for web search behavior
search_modeenumSource of search results (web, academic, or sec)web | academic | sec · nullable
return_imagesbooleanWhen true, include image results in the responsenullable
return_related_questionsbooleanWhen true, generates suggested follow-up queries based on the search resultsnullable
enable_search_classifierbooleanWhen true, uses a classifier to determine if web search is needed for the querynullable
disable_searchbooleanWhen true, disables all web search capabilities. The model responds based solely on its training datanullable
search_domain_filterstring[]Limit search results to specific domains (e.g. github.com, wikipedia.org)nullable
search_language_filterstring[]Filter results by language using ISO 639-1 codes (e.g. en, fr, de)nullable
search_recency_filterenumFilter by publication recency (hour, day, week, month, or year)hour | day | week | month | year · nullable
search_after_date_filterstringReturn results published after this date (MM/DD/YYYY)nullable
search_before_date_filterstringReturn results published before this date (MM/DD/YYYY)nullable
last_updated_before_filterstringReturn results last updated before this date (MM/DD/YYYY)nullable
last_updated_after_filterstringReturn results last updated after this date (MM/DD/YYYY)nullable
image_format_filterstring[]Filter image results by format (e.g. png, jpg)nullable
image_domain_filterstring[]Limit image results to specific domainsnullable
stream_modeenumControls the format of streaming events. 'full' suppresses reasoning events and includes metadata inline; 'concise' emits reasoning events separatelyfull | concise · default: "full"
reasoning_effortenumControls how much effort the model spends on reasoningminimal | low | medium | high · nullable
language_preferencestringISO 639-1 language code for preferred response languagenullable

Validate a payload

before you spend tokens
shell
$ curl -X POST https://modelschemas.com/v1/validate \
    -d '{"provider":"perplexity","endpointId":"v1/sonar","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}