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
Similar APIs
OpenAI API
★100Access GPT-4o, GPT-4, GPT-3.5, embeddings, DALL-E, Whisper, and TTS models via REST API.
Tavily Search API
★95AI-native search engine optimized for LLMs and AI agents. Real-time web data with structured results.
LangChain Platform
★91Framework and platform for building LLM applications. LangSmith for observability, LangServe for deployment.
Serper API
★90Fast Google Search API with rich SERP data including knowledge graph, shopping, and organic results.
Something wrong or missing? Open an issue on GitHub →
Pricing Comparison
| API | Pricing | Auth | Popularity |
|---|---|---|---|
| OpenAI API | pay-as-you-go (per token) | API Key (Bearer Token) | 100 |
| Anthropic Claude API | pay-as-you-go (per token) | API Key (x-api-key header) | 87 |
| Google Gemini API | free tier available, pay-as-you-go | API Key | 85 |
| OpenAI Assistants API | pay-as-you-go (per token + per tool use) | API Key (Bearer Token) | 84 |
Get Started with Perplexity API
Click below to visit the official website and start using this API.
Visit Perplexity API →Discussion
Questions, feedback, or suggestions? Start a discussion.
Discuss on GitHub