sonar_chat
Produce AI chat answers with live web grounding. Refine searches using domain, recency, and location filters for up-to-date, relevant responses.
Instructions
Chat completions with live web grounding using Perplexity Sonar models (POST /v1/sonar). Supports domain filters, recency filters, and location-aware search.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Sonar model to use. | sonar |
| top_p | No | Nucleus sampling probability. | |
| messages | Yes | Conversation messages. | |
| max_tokens | No | Maximum tokens in the response. | |
| temperature | No | Sampling temperature. | |
| return_images | No | Include image results. | |
| user_location | No | User's location for localized results. | |
| search_domain_filter | No | Domain whitelist/blacklist. Prefix with '-' to exclude, e.g. '-reddit.com'. | |
| search_recency_filter | No | Restrict results to recent content. | |
| search_language_filter | No | BCP 47 language tag, e.g. 'en-US'. | |
| search_after_date_filter | No | Only search content after this ISO 8601 date. | |
| search_before_date_filter | No | Only search content before this ISO 8601 date. |