A collection of practical guides, runnable examples, and integration patterns for building with Perplexity’s API Platform — covering the Agent API, Search API, Embeddings API, and Sonar API.Documentation Index
Fetch the complete documentation index at: https://docs.perplexity.ai/llms.txt
Use this file to discover all available pages before exploring further.
How to Use This Cookbook
Guides
Practical deep-dives on patterns that go beyond the docs — structured outputs, function calling, RAG pipelines, and cross-cutting best practices.
Examples
Runnable projects covering every API. From research assistants and news monitors to document Q&A and image analysis — with Python and TypeScript.
Integration Guides
Connect Perplexity with external frameworks like the OpenAI Agents SDK, LangChain memory systems, and persistent storage.
Community Showcase
Real-world applications built by the community — see what others are building with the API Platform.
Quick Start
Get API Access
To use the Perplexity API Platform, you’ll need an API key. If you don’t have one yet:
Get your Perplexity API Key
Navigate to the API Keys tab in the API Portal and generate a new key.
Install the SDK
The Perplexity API SDK is available in Python and TypeScript. Install the package for your preferred language:
Pick a Starting Point
The Perplexity API Platform supports a wide range of use cases across its different APIs. Here are some recommended starting points based on your goals:
- New to the platform? Refer to our Quick Start Guide
- Want to build something? Take a look at our Examples
What’s Covered
| API | Guides | Examples |
|---|---|---|
| Agent API | Multi-Provider Orchestration, Function Calling End-to-End, OpenAI Agents Integration | Research Assistant, Model Comparison, TypeScript CLI, Image Analysis, File Attachment Q&A |
| Search API | Search Domain Filtering | News Monitor, SEC Filing Search |
| Embeddings API | RAG Pipeline | Document Q&A |
| Sonar API | Streaming Citations, Academic Search, Async Deep Research | — |