Start Async Completion
perplexity.create_async_completion
ActionAI & modelsconnection required
Calls the Perplexity API with the connection's credentials.
Submit a long-running Sonar request as a background job and return its request id; use this for sonar-deep-research rather than waiting inline.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- Perplexity
- Secret shape
- {"api_key": "…"}
- Config it needs
- base_url, default_model
- Resolved by
- config.connection_id, else node.connection_id
Configuration
16 fields, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
prompt The question to research, as the user turn. Use this or 'messages'. | string | No | — | — | Compare the 2026 EU and US AI regulations. |
system_prompt Optional system turn setting tone, format or role for the answer. | string | No | — | — | — |
messages The conversation as a JSON array of {role, content} objects. Use this instead of 'prompt' for a multi-turn request. | array | No | — | array of object | — |
model Sonar model to run; sonar-deep-research is the usual reason to go async. Falls back to the connection's default model, then sonar. | string | No | sonar-deep-research | — | sonar-deep-research |
search_mode Which corpus Perplexity searches: web (the whole web), academic (scholarly papers) or sec (SEC filings). Defaults to web. | string | No | — | one of "web", "academic", "sec" | — |
search_domain_filter Domains to restrict the search to, as a JSON array or a comma-separated list. Prefix a domain with '-' to exclude it instead. | array | No | — | array of string | ["arxiv.org","-reddit.com"] |
search_recency_filter Only use sources published within this window, counted back from now. | string | No | — | one of "hour", "day", "week", "month", "year" | — |
search_after_date_filter Only use sources published on or after this date, written as MM/DD/YYYY. | string | No | — | — | 01/01/2026 |
search_before_date_filter Only use sources published on or before this date, written as MM/DD/YYYY. | string | No | — | — | 12/31/2026 |
search_context_size How much web context to retrieve before answering; larger costs more and answers more thoroughly. Sent as web_search_options.search_context_size. | string | No | — | one of "low", "medium", "high" | — |
return_related_questions Ask Perplexity to suggest follow-up questions alongside the answer. | boolean | No | false | — | — |
return_images Include image results from the sources alongside the answer. | boolean | No | false | — | — |
max_tokens Cap on the tokens generated in the answer. Leave blank for the model default. | number | No | — | ≥ 1 | — |
temperature Sampling randomness, from 0 (deterministic) to 2 (most varied). | number | No | 0.2 | 0–2 | — |
top_p Nucleus sampling threshold between 0 and 1; leave blank to use the model default. | number | No | — | 0–1 | — |
response_format Structured-output request, e.g. {"type": "json_schema", "json_schema": {"schema": {...}}}. Sent through to Perplexity unchanged. | object | No | — | — | — |
- At least one of prompt, messages must be set.
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"model": "sonar-deep-research",
"prompt": "Compare the 2026 EU and US AI regulations.",
"return_images": false,
"return_related_questions": false,
"search_after_date_filter": "01/01/2026",
"search_before_date_filter": "12/31/2026",
"search_domain_filter": [
"arxiv.org",
"-reddit.com"
],
"temperature": 0.2
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
id The async request id, used to fetch the result later. | string | — |
status CREATED, IN_PROGRESS, COMPLETED or FAILED. | string | — |
model The model the job runs. | string | — |
created_at When the job was submitted, as a Unix timestamp. | number | — |
started_at When the job began running, as a Unix timestamp. | number | — |
completed_at When the job finished, as a Unix timestamp. | number | — |
failed_at When the job failed, as a Unix timestamp. | number | — |
error_message Why the job failed; empty unless the status is FAILED. | string | — |
content The answer text, once the job has COMPLETED. | string | — |
citations Source URLs behind the finished answer. | array | — |
search_results The sources behind the finished answer. | array | — |
related_questions Suggested follow-up questions, when asked for. | array | — |
usage Token counts and the cost breakdown, once the job has COMPLETED. | object | — |
raw The untouched job object, for anything not shaped above. | object | — |
{
"citations": [],
"completed_at": 0,
"content": "",
"created_at": 0,
"error_message": "",
"failed_at": 0,
"id": "",
"model": "",
"raw": {},
"related_questions": [],
"search_results": [],
"started_at": 0,
"status": "",
"usage": {}
}Related Perplexity nodes
See Start Async Completion run in a workflow.
In a technical demo we add the Perplexity connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.