younifyd
Menu

Create Chat Completion

Create a chat completion using Perplexity API

Use it in a workflow

  1. Add a step and choose the Perplexity connector.
  2. Pick the Create Chat Completion action (under perplexity).
  3. Fill in the fields below, then reference the result from later steps as {{createChatCompletion.response.data}}.

Fields

modelstringrequired

Model ID to use (e.g., sonar-pro, sonar-reasoning)

messagesstringrequired

JSON array of messages (e.g., [{"role":"user","content":"Hello!"}])

temperaturenumber

Controls randomness (0-2, default: 1)

Default 1

topPnumber

Nucleus sampling (0-1, default: 1)

Default 1

maxTokensnumber

Maximum tokens to generate

frequencyPenaltynumber

Penalty for repetition (-2.0 to 2.0, default: 0)

Default 0

presencePenaltynumber

Penalty for new topics (-2.0 to 2.0, default: 0)

Default 0

streamboolean

Whether to stream the response

Default false

searchDomainFilterstring

JSON array of domains to include/exclude (e.g., ["example.com"])

searchRecencyFilterstring

Filter by recency (month, week, day)

One ofmonthweekday

returnImagesboolean

Whether to return image URLs in response

Default false

returnRelatedQuestionsboolean

Whether to return related questions in response

Default false

searchModestring

Search mode

One ofwebacademicDefault "web"

Need more? See the Perplexity guide for connection setup and behaviour shared by every action.

Was this page helpful?