How to Use Perplexity Sonar in Openclaw

Image
Table of contents: [Show]

Quick Start

Perplexity Sonar brings real-time web search with citations directly into Openclaw. This guide shows you how to configure it in under 5 minutes.

Perplexity Sonar in Openclaw

Get Your API Key

  1. Visit Perplexity API settings and create an account
  2. Generate a new API key (starts with pplx-)

Configuration Options

Option A: CLI Wizard (Recommended)

Run the interactive configuration wizard:

Openclaw configure --section web

This saves your key to ~/.Openclaw/Openclaw.json under tools.web.search.perplexity.apiKey.

Option B: Environment Variable

Set PERPLEXITY_API_KEY in your Gateway environment. For daemon installs, add to ~/.Openclaw/.env:

PERPLEXITY_API_KEY="pplx-..."

Option C: Manual Configuration

Edit ~/.Openclaw/Openclaw.json directly:

{ "tools": { "web": { "search": { "provider": "perplexity", "perplexity": { "apiKey": "pplx-..." } } } } }

For more web search options, check out our guide on Firecrawl Web Scraping or learn about Elevated Mode Openclaw for advanced permissions.

Test Your Setup

Once configured, test Perplexity search:

"Search for the latest OpenAI model releases using Perplexity"

Troubleshooting

  • Key not recognized: Verify the key starts with pplx- and is saved correctly
  • Search fails: Check your API key has available quota in Perplexity dashboard
  • Gateway restart required: After config changes, run Openclaw gateway restart

Pro tip: Perplexity Sonar provides cited sources with every response—perfect for research tasks requiring verified information.