Skip to main content

Perplexity

Connects to the Perplexity AI search/answer API. An agent can run a quick web search with cited sources, or kick off a deeper multi-step research query.

Add to an agent node's tools array with _node_type: "tool-perplexity". See Connector Reference — How connectors are used.

Authentication

FieldRequiredDescription
api_keyYes (or perplexity_api_key)Perplexity API key, sent as Authorization: Bearer <api_key>.
perplexity_api_keyYes (if api_key not set)Used if api_key is not set.
{
"name": "perplexity",
"_node_type": "tool-perplexity",
"api_key": "{{ secret.PERPLEXITY_API_KEY }}"
}

Tools

Search the web using Perplexity AI and get a synthesised answer with source citations.

Parameters

ParameterTypeRequiredDescription
querystringYesWhat to search for
modelstringNosonar (default) | sonar-pro | sonar-deep-research
max_tokensnumberNoMax output tokens (default 1024)

Returns: JSON with answer (synthesised text), citations (array of source URLs), input_tokens, and output_tokens.

perplexity_deep_research

Perform deep multi-step research using Perplexity sonar-deep-research. Returns a detailed answer with many sources. Slower but much more thorough.

Parameters

ParameterTypeRequiredDescription
querystringYesResearch question or topic

Internally always uses model sonar-deep-research with max_tokens fixed at 4096.

Returns: JSON with answer (synthesised text), citations (array of source URLs), input_tokens, and output_tokens.

Next