# Perplexity AI API **Provider:** Perplexity AI **Category:** ai **Base URL:** `https://api.perplexity.ai` **Auth:** bearer — `Authorization: Bearer pplx-...` **Rate Limit:** 50 requests/min **Free Tier:** No **Pricing:** from $0.20/mo (pay-as-you-go) **Docs:** https://docs.perplexity.ai ## Description Perplexity AI's API provides access to its search-augmented language models. Unlike standard LLMs, Perplexity models fetch current web data to ground responses with citations, making them ideal for research, news summarization, and fact-checking workflows. Supports both online models (with live search) and offline models (standard generation). OpenAI-compatible API format. ## Endpoints | Method | Endpoint | Description | |--------|----------|-------------| | POST | `https://api.perplexity.ai/chat/completions` | Chat completions with optional web search grounding | ## Authentication Generate an API key in Perplexity Settings → API. Pass it as a Bearer token in the Authorization header. ``` Authorization: Bearer pplx-... ``` ## Sample Request ```bash curl "https://api.perplexity.ai/chat/completions" \ -H "Authorization: Bearer $PERPLEXITY_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"sonar","messages":[{"role":"user","content":"What are the latest AI model releases in 2026?"}]}' ``` ## Sample Response ```json { "id": "gen-abc123", "model": "sonar", "choices": [{ "message": { "role": "assistant", "content": "In 2026, notable AI releases include... [1][2]" } }], "citations": ["https://techcrunch.com/...", "https://theverge.com/..."] } ``` ## Pricing Details Sonar (online): $1 per 1M input tokens + $5 per 1,000 search queries. Sonar Pro: $3/M input + $5/1k searches. Offline models from $0.20/M tokens. --- *Source: [API Map](https://apimap.dev/apis/perplexity/) — CC BY 4.0*