perplexity

Usage Instructions

Generate completions using Perplexity AI models with real-time knowledge and search capabilities. Create responses, answer questions, and generate content with customizable parameters.

Where to Get Your Perplexity API Key

To get an API key for Perplexity, you need to manage it through your account settings in the web interface.

Here is the step-by-step process:

1

Log in to your account

If you don't have one, you'll need to create one first.

2

Go to your account settings

This is usually located in the bottom-left corner of the interface and can often be accessed by clicking on your profile picture or a gear icon.

3

In your settings menu, look for the API tab or a section specifically for API keys.

4

Add Payment and Purchase Credits

Perplexity's API is a paid service. You must have a non-zero balance or be on a Pro plan to generate a key.

5

Generate a New API Key

In the API section, you'll find an option to "Generate API Key" or "Create API Key."

6

Copy and Save the Key

Once generated, copy the key and store it securely. For security reasons, it is often only shown once.

Tools

perplexity_chat

Generate completions using Perplexity AI chat models

Input

Parameter
Type
Required
Description

systemPrompt

string

No

System prompt to guide the model behavior

content

string

Yes

The user message content to send to the model

model

string

Yes

Model to use for chat completions (e.g., sonar, mistral)

max_tokens

number

No

Maximum number of tokens to generate

temperature

number

No

Sampling temperature between 0 and 1

apiKey

string

Yes

Perplexity API key

Output

Parameter
Type
Description

content

string

Generated response

model

string

Model used

usage

json

Token usage

Notes

  • Category: tools

  • Type: perplexity

Was this helpful?