| model* | enum | Model to use, for example, sonar-pro | sonar | sonar-pro | sonar-deep-research | sonar-reasoning-pro |
| messages* | ChatMessage-Input[] | Array of messages forming the conversation history | |
| max_tokens | integer | Maximum number of completion tokens to generate | 0 < n ≤ 128000 · nullable |
| stream | boolean | If true, returns streaming SSE response | nullable |
| stop | string | string[] | Stop sequences. Generation stops when one of these strings is produced | nullable |
| temperature | number | Controls randomness in the response. Higher values make output more random. Range: 0-2 | 0 ≤ n ≤ 2 · nullable |
| top_p | number | Nucleus sampling parameter. Controls diversity via nucleus sampling | 0 ≤ n ≤ 1 · nullable |
| response_format | ResponseFormatText | ResponseFormatJSONSchema | Optional. Controls the output format. Omit for default text output. Set `type` to `json_schema` for structured output. | nullable |
| web_search_options | WebSearchOptions | Configuration options for web search behavior | |
| search_mode | enum | Source of search results (web, academic, or sec) | web | academic | sec · nullable |
| return_images | boolean | When true, include image results in the response | nullable |
| return_related_questions | boolean | When true, generates suggested follow-up queries based on the search results | nullable |
| enable_search_classifier | boolean | When true, uses a classifier to determine if web search is needed for the query | nullable |
| disable_search | boolean | When true, disables all web search capabilities. The model responds based solely on its training data | nullable |
| search_domain_filter | string[] | Limit search results to specific domains (e.g. github.com, wikipedia.org) | nullable |
| search_language_filter | string[] | Filter results by language using ISO 639-1 codes (e.g. en, fr, de) | nullable |
| search_recency_filter | enum | Filter by publication recency (hour, day, week, month, or year) | hour | day | week | month | year · nullable |
| search_after_date_filter | string | Return results published after this date (MM/DD/YYYY) | nullable |
| search_before_date_filter | string | Return results published before this date (MM/DD/YYYY) | nullable |
| last_updated_before_filter | string | Return results last updated before this date (MM/DD/YYYY) | nullable |
| last_updated_after_filter | string | Return results last updated after this date (MM/DD/YYYY) | nullable |
| image_format_filter | string[] | Filter image results by format (e.g. png, jpg) | nullable |
| image_domain_filter | string[] | Limit image results to specific domains | nullable |
| stream_mode | enum | Controls the format of streaming events. 'full' suppresses reasoning events and includes metadata inline; 'concise' emits reasoning events separately | full | concise · default: "full" |
| reasoning_effort | enum | Controls how much effort the model spends on reasoning | minimal | low | medium | high · nullable |
| language_preference | string | ISO 639-1 language code for preferred response language | nullable |