Perplexity API
Perplexity 接口
Access Sonar search-grounded LLMs with real-time web search and citations.
调用 Sonar 搜索增强模型,实时联网搜索并附带引用。
Website
Documentation
Pricing
pay-as-you-go, subscription available
Authentication
- API Key (Bearer Token)
Rate Limit
200 req/min
Typical Latency
<2s
Max Context
128K
Popularity
58/100
Endpoints
https://api.perplexity.ai/chat/completions
SDKs
PythoncurlOpenAI-compatible SDKs
Key Features
- ◆Sonar search-grounded LLMs
- ◆Real-time web search with citations
- ◆Up-to-date information retrieval
- ◆OpenAI-compatible API format
- ◆Subscription plans for higher limits
Code Examples
Search Chatbash
curl https://api.perplexity.ai/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $PERPLEXITY_API_KEY" \
-d '{
"model": "sonar-pro",
"messages": [{"role": "user", "content": "Latest AI news?"}]
}'Tags
llmsearchreal-time
Last updated: 2026-07-27