How to Connect Perplexity to an AI Agent
Auth setup
1. Sign up at perplexity.ai. 2. Go to Settings > API. 3. Generate key. 4. Requires payment method for API access.
Key facts
| Base URL | https://api.perplexity.ai/ |
| API version | v1 (OpenAI-compatible) |
| Auth | API key as Bearer token. Generate at perplexity.ai/settings/api. |
| Request body | application/json |
| Pagination | N/A โ single endpoint with streaming support. |
| Rate limit | Varies by plan. Free: very limited. Pro: 50 req/min. Check response headers. |
| Error format | JSON: {"error":{"message":"...","type":"...","code":...}} |
Key endpoints
| Method | Path | Description |
POST | /chat/completions | Search-augmented chat completion |
Quickstart
POST /chat/completions
Authorization: Bearer {api_key}
{"model":"sonar-pro","messages":[{"role":"user","content":"What is MCP?"}]}
Agent pitfalls & tips
- Perplexity is search-augmented โ responses include citations from the web.
- Use 'sonar-pro' for best quality with citations, 'sonar' for speed.
- Responses include 'citations' array with source URLs.
- Great for fact-checking and real-time information queries.
- OpenAI SDK compatible โ change base_url to https://api.perplexity.ai.
Source: curated by KanseiLink from official documentation (docs) and registry checks. Last reviewed: 2026-04-07. Specs change โ verify against the official docs before production use.
Frequently Asked Questions
What is Perplexity's AEO score?
โผ
Perplexity has an AEO score of 0.60 and is rated BBB (Basic agent connectivity available). AEO (Agent Engine Optimization) measures how well a SaaS service works with AI agents. Scores range from 0.00 to 1.00, with grades from AAA (best) to D (not agent-ready).
Is Perplexity AI-agent-ready?
โผ
Perplexity is currently connectable for AI agent use. API access is available but no dedicated MCP server has been published yet. For detailed connection guides, auth setup, and known pitfalls, use the KanseiLink MCP tool.
How does Perplexity compare to other AI & ML services?
โผ
In the AI & ML category, Perplexity is rated BBB. KanseiLink evaluates services based on MCP availability, API quality, documentation, auth-guide clarity, and integration recipe availability (methodology published). Visit the full rankings at kansei-link.com to see how Perplexity compares.
How can I integrate Perplexity with an AI agent?
โผ
The fastest way to integrate Perplexity with an AI agent is through KanseiLink MCP. Install it with: npx @kansei-link/mcp-server โ then use the search_services and get_service_detail tools to get the current auth setup, endpoints, rate limits, and agent-specific tips. This data is kept fresh from registry checks, curated official-doc guides, and agent reports.
How do I authenticate with Perplexity?
โผ
API key as Bearer token. Generate at perplexity.ai/settings/api. Setup: 1. Sign up at perplexity.ai. 2. Go to Settings > API. 3. Generate key. 4. Requires payment method for API access.
What are Perplexity's API rate limits?
โผ
Varies by plan. Free: very limited. Pro: 50 req/min. Check response headers.