Skip to main content
Perplexity logo

Perplexity (Sonar)

Lets an agent ask web-grounded questions and get answers with live citations, run long research jobs asynchronously, and run raw web searches via Perplexity Sonar.

What it can do

MethodWhat it does
perplexity_chat_completionAsk a web-grounded question and get an answer with citations - pick a Sonar model and optional search/recency/domain filters.
perplexity_create_async_chat_completionSubmit a long-running question (e.g. deep research) to run asynchronously; returns a request_id.
perplexity_get_async_chat_completionGet the status and result of an async chat completion by request_id.
perplexity_list_async_chat_completionsList the user's async chat completion jobs, with optional paging.
perplexity_searchRun a raw web search and get a structured list of results (title, url, snippet) with no prose answer.
perplexity_embeddingsGenerate text embeddings for semantic search / RAG from one or more strings (pplx-embed-v1 models).
perplexity_contextualized_embeddingsGenerate chunk-level embeddings that share document-level context for RAG over chunked documents (pplx-embed-context-v1 models).
perplexity_create_agent_responseRun an agentic workflow on Perplexity's managed runtime (retrieval, tool execution, reasoning) with web_search / fetch_url tools.

How to get credentials

  1. Open perplexity.ai/settings/api.
  2. Add a payment method or buy API credits (the API is pay-as-you-go).
  3. Click Generate (or Create Key) to create a new API key.
  4. Copy the pplx-… key.

Fields to fill in FlyMyAI

FlyMyAI fieldWhere it comes from
PERPLEXITY_API_KEYSettings → API → Generate key (pplx-…)

Troubleshooting

  • 401 Unauthorized - the key is wrong or revoked. Generate a new one in the API settings.
  • 402 / credit errors - the account is out of API credits. Top up in the API settings.
We love our partners - FlyMy.AI builds with the best. Thanks, Perplexity!