Perplexity API logo

Perplexity API

Perplexity API

Perplexity API provides web-connected LLM — automatically searches the web when answering, avoiding LLM knowledge cutoff issues.

Visit site ↗Documentation ↗Health checked 9h ago
Use it when

Auto web connectivity (no manual Google API + RAG implementation)

Watch for

No custom retrieval (Perplexity decides what to search)

First check

Apply for API access at docs.perplexity.ai for key. POST https://api.perplexity.ai/chat/completions with model: "llama-3.1-sonar-large-128k-online" + messages.

Auth
api_key
CORS
?
HTTPS
Yes
Signup
?
Latency
77 ms
Protocol
REST
Pricing
paid

Uptime · 30-day window

Probes: 1Uptime: 0%Avg latency: 77ms
01

About this API

Perplexity is an AI search engine company founded 2022, focused on "conversational web search" — unlike traditional Google giving a pile of links, Perplexity directly answers questions with citations. Technically an engineered integration of LLM + web search: user asks question → Perplexity auto-queries Bing/Google → top results fed to LLM → LLM generates answer with citations. This design naturally solves LLM's two big problems: knowledge cutoff ("I don't know post-2024") and hallucination (citations let users verify). The API lets developers integrate this web-connected LLM into their apps — AI assistants answering "what happened today", research tools auto-searching latest literature, customer service answering policy-related questions. Sonar series is its LLM (fine-tuned from Llama); online-suffix models auto-connect to web, offline models don't.

02

What you can build

  • 1Real-time news Q&A
  • 2Research assistants (auto-search latest literature)
  • 3AI agents needing current info
  • 4Customer service answering latest product / policy questions
03

Strengths & limitations

Strengths

  • Auto web connectivity (no manual Google API + RAG implementation)
  • Answers include citation links
  • OpenAI-compatible API

Limitations

  • No custom retrieval (Perplexity decides what to search)
  • Slightly higher than pure LLM pricing
  • Tighter rate limits
04

Example request

Generic template — replace <endpoint> with the real path from the docs.
curl https://www.perplexity.ai/<endpoint> \
  -H "Authorization: Bearer $API_KEY"
# Some providers use X-Api-Key instead — verify in the docs.
05

Getting started

Apply for API access at docs.perplexity.ai for key. POST https://api.perplexity.ai/chat/completions with model: "llama-3.1-sonar-large-128k-online" + messages.

06

FAQ

Can I control which sources are searched?+

API supports search_domain_filter parameter to allow/exclude specific domains, but internal search algorithm is not exposed.

Perplexity vs. OpenAI + custom RAG?+

Perplexity: zero-ops but black box. Custom RAG: controllable but engineering-heavy. Choose based on how hands-on you want to be.

07

Technical details

CORS: ?HTTPS: YesSignup: ?Open source: No
Auth type
api_key
Pricing
paid
Rate limit
默认 50 calls/分;可申请提高
Protocols
REST
SDKs
python, typescript
Response time
77 ms
Last health check
5/12/2026, 7:38:04 AM
08

Tags