Perplexity Chat
perplexity_chatHold multi-turn web-search-grounded conversations: start or continue a chat, then list, read or delete stored chats.
Instructions
Hold a multi-turn conversation grounded in web search. A send continues the chat from its last stored response; the messages are kept in this server's local database. Actions: send (starts a chat when chat_id is omitted), list, read and delete.
Approximate cost per send by depth (observed ranges; the upper figures are estimates): fast $0.001 to $0.002, low $0.0005 to $0.004 (up to about $0.02 estimated), medium $0.016 to $0.025 as a research run (up to about $0.05 estimated; a synchronous medium send was not measured); high and xhigh are not available here (use perplexity_research). Every send is recorded as spend (see perplexity_usage). list, read and delete make no upstream call and cost nothing; they read or change only the local database and never create a project.
Chat text is stored in the local database. A send sets store to false, which only hides the response from retrieval at the provider; the provider's documentation says it still persists state, so this is not a retention control. If the provider cannot continue from the previous response, send again with replay true to resend the stored history.
Routing mode: standard. With no depth, tier or model perplexity/sonar answers with web search; tier is for custom mode only. A model is always used as given. The per-depth costs above apply to depth; the default model's cost differs (see perplexity_usage). Details: call perplexity_help.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tier | No | send: light, standard or complex (custom mode); may change per turn | |
| after | No | send: only results after this date (YYYY-MM-DD) | |
| depth | No | send: fast, low or medium; may change on every turn | |
| limit | No | list: chats to return, 1 to 100 (default 20), newest first. read: the last N messages, 1 to 200 (default 50) | |
| model | No | send: an explicit model id instead of a depth (see perplexity_ask) | |
| title | No | send, new chat only: its title, 1 to 120 characters (required) | |
| action | Yes | send, list, read or delete | |
| before | No | send: only results before this date (YYYY-MM-DD) | |
| replay | No | send: resend the stored history instead of continuing from the previous response id (use it when the provider cannot continue) | |
| search | No | send: false answers from the model alone (not with depth) | |
| chat_id | No | send: continue this chat; omit to start a new one | |
| confirm | No | delete: must be true; removing a chat cannot be undone | |
| country | No | send: two-letter country code to localize the search | |
| domains | No | send: at most 20 domains, all allowed or all denied with '-' | |
| message | No | send: the message (at most 20000 characters, not blank) | |
| project | No | Project the chat belongs to (default: default) | |
| recency | No | send: hour, day, week, month or year | |
| max_results | No | send: search results to retrieve, 1 to 50 | |
| instructions | No | send: system-style instructions, at most 10000 chars | |
| max_output_tokens | No | send: cap on answer tokens, 1 to 64000 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat | No | That chat's record | |
| chats | No | Chats found (list only) | |
| depth | No | send: the preset used | |
| model | No | send: the model that answered | |
| usage | No | send: tokens and cost | |
| action | Yes | The action that ran | |
| answer | No | send: the answer text | |
| status | No | send: completed or incomplete | |
| chat_id | No | The chat the action concerns (the new chat for a first send); null for list and for an incomplete or unsaved first send | |
| project | Yes | The project the action ran in | |
| routing | No | send: how the model was picked | |
| sources | No | send: pages the run found or fetched, by first use | |
| messages | No | Messages in order (read only) | |
| warnings | No | Things worth knowing about this result | |
| truncated | No | Whether limit cut the list or the messages | |
| latency_ms | No | send: upstream call wall time | |
| answer_json | No | Always null: send takes no json_schema | |
| chats_total | No | All chats in the project (list) | |
| response_id | No | send: the API's response id | |
| continuation | No | send only: new, chained (from the last response id) or replay | |
| messages_total | No | All messages in the chat (read) | |
| messages_removed | No | Messages removed with the chat (delete) | |
| incomplete_reason | No | send: why it stopped |