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.
https://api.perplexity.ai
Auth type
Bearer Token
Auth header
Authorization: Bearer pplx-...
Rate limit
50 requests/min
Pricing
from $0.20/mo
Free quota
$5 free credits for new accounts
Documentation
https://docs.perplexity.ai
Endpoint status
Server online — HTTP 404 — server is online but path returned an error (may require auth)564ms
(checked Mar 29, 2026)
Builder score
C
55%
builder-friendly
Generate an API key in Perplexity Settings → API. Pass it as a Bearer token in the Authorization header.
Authorization: Bearer pplx-...
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.
| Method | Path | Description |
|---|---|---|
| POST | /chat/completions |
Chat completions with optional web search grounding |
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?"}]}'
{
"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/..."]
}
Data sourced from API Map. Always verify pricing and rate limits against the official Perplexity AI documentation.