> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Perplexity Search

> Citation-backed web answers and deep research reports for autonomous agents. Four tiers of Perplexity Sonar — fast answers, synthesis, multi-step reasoning, and exhaustive deep research — all through one AIsa API key.

[View on GitHub →](https://github.com/AIsa-team/agent-skills/tree/main/perplexity-search)

**Citation-backed web answers and deep research for autonomous agents.** Access the full Perplexity Sonar family with one `AISA_API_KEY` — from sub-second lookups to exhaustive research reports.

## Install

First, install the AIsa CLI if you have not already:

```bash theme={null}
npm install -g @aisa-one/cli
```

Then install the skill:

```bash theme={null}
aisa skills install perplexity-search
```

## What can agents do with it?

<CardGroup cols={2}>
  <Card title="Fast factual answers" icon="bolt">
    "What shipped in OpenAI's latest release?" — answered in seconds with citations.
  </Card>

  <Card title="Comparative analysis" icon="scale-balanced">
    "Compare the top three AI coding agents in 2026 across pricing and features."
  </Card>

  <Card title="Multi-step reasoning" icon="diagram-project">
    "Walk through the tradeoffs of using x402 vs. traditional API keys."
  </Card>

  <Card title="Deep research reports" icon="microscope">
    "Generate a 2,000-word structured report on agentic browser frameworks."
  </Card>

  <Card title="Real-time news" icon="newspaper">
    "Summarize this week's AI infrastructure announcements."
  </Card>

  <Card title="Decision support" icon="list-check">
    "Should we adopt this library? Cite adoption, issues, and alternatives."
  </Card>
</CardGroup>

## Model tiers

| Model                 | Use when you need…                                                       |
| --------------------- | ------------------------------------------------------------------------ |
| `sonar`               | Fast, cited answers to simple questions (sub-second)                     |
| `sonar-pro`           | Synthesis, comparisons, longer answers with more sources                 |
| `sonar-reasoning-pro` | Multi-step analytical reasoning, tradeoff analysis, technical deep-dives |
| `sonar-deep-research` | Exhaustive long-form reports; accepts multi-minute processing            |

## Quick start

```bash theme={null}
export AISA_API_KEY="your-key"
```

### Sonar (fast answers)

```bash theme={null}
curl -X POST "https://api.aisa.one/apis/v1/perplexity/sonar" \
  -H "Authorization: Bearer $AISA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sonar",
    "messages": [{"role": "user", "content": "What is the Model Context Protocol?"}]
  }'
```

### Sonar Pro (synthesis)

```bash theme={null}
curl -X POST "https://api.aisa.one/apis/v1/perplexity/sonar-pro" \
  -H "Authorization: Bearer $AISA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sonar-pro",
    "messages": [{"role": "user", "content": "Compare the performance of top AI coding agents in 2026."}]
  }'
```

### Sonar Reasoning Pro (analysis)

```bash theme={null}
curl -X POST "https://api.aisa.one/apis/v1/perplexity/sonar-reasoning-pro" \
  -H "Authorization: Bearer $AISA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sonar-reasoning-pro",
    "messages": [{"role": "user", "content": "Analyze the tradeoffs of adopting x402 vs. traditional billing."}]
  }'
```

### Sonar Deep Research

```bash theme={null}
curl -X POST "https://api.aisa.one/apis/v1/perplexity/sonar-deep-research" \
  -H "Authorization: Bearer $AISA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sonar-deep-research",
    "messages": [{"role": "user", "content": "Create a 2,000-word deep research report on autonomous browser agents."}]
  }'
```

<Tip>
  Deep research accepts longer processing times and the Python client implements automatic retry logic. For time-sensitive requests, downgrade to `sonar-pro` or `sonar-reasoning-pro` rather than waiting for a long timeout.
</Tip>

## Python client

```bash theme={null}
# Fast
python3 scripts/perplexity_search_client.py sonar --query "What is MCP?"

# Synthesis
python3 scripts/perplexity_search_client.py sonar-pro --query "Compare AI coding agents 2026"

# Analytical reasoning
python3 scripts/perplexity_search_client.py sonar-reasoning-pro --query "x402 tradeoffs"

# Deep research (accepts long processing)
python3 scripts/perplexity_search_client.py sonar-deep-research --query "Agentic payments landscape"

# Optional system message to control output formatting
python3 scripts/perplexity_search_client.py sonar-pro \
  --query "Explain RAG" \
  --system "Answer in bullet points with citations inline as [1], [2]..."
```

## Endpoint reference

| Endpoint                          | Method | Purpose                                                                              |
| --------------------------------- | ------ | ------------------------------------------------------------------------------------ |
| `/perplexity/sonar`               | POST   | [Sonar — fast answers](/api-reference/perplexity/post_perplexity-sonar)              |
| `/perplexity/sonar-pro`           | POST   | [Sonar Pro — synthesis](/api-reference/perplexity/post_perplexity-sonar-pro)         |
| `/perplexity/sonar-reasoning-pro` | POST   | [Sonar Reasoning Pro](/api-reference/perplexity/post_perplexity-sonar-reasoning-pro) |
| `/perplexity/sonar-deep-research` | POST   | [Sonar Deep Research](/api-reference/perplexity/post_perplexity-sonar-deep-research) |

## Get started

1. Sign up at [aisa.one](https://aisa.one) (new accounts start with \$2 free credit).
2. Generate an API key from the console.
3. `export AISA_API_KEY="your-key"` and install the skill:
   ```bash theme={null}
   npm install -g @aisa-one/cli
   aisa skills install perplexity-search
   ```

## Related

<CardGroup cols={3}>
  <Card title="Perplexity API reference" icon="sparkles" href="/api-reference/perplexity/post_perplexity-sonar">
    All four Sonar endpoints with interactive playgrounds.
  </Card>

  <Card title="Pricing" icon="dollar-sign" href="/guides/pricing/ai-model-pricing-llm-inference">
    Per-token rates for each Sonar variant.
  </Card>

  <Card title="Error Codes" icon="triangle-exclamation" href="/api-reference/errors">
    Handling timeouts and upstream errors.
  </Card>
</CardGroup>
