{"id":629,"date":"2026-03-21T22:52:57","date_gmt":"2026-03-21T14:52:57","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/providers-perplexity-provider\/"},"modified":"2026-03-21T23:08:56","modified_gmt":"2026-03-21T15:08:56","slug":"providers-perplexity-provider","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/providers-perplexity-provider\/","title":{"rendered":"Perplexity (Provider)"},"content":{"rendered":"<h1>Perplexity (Provider)<\/h1>\n<h1>Perplexity (Web Search Provider)<\/h1>\n<p>The Perplexity plugin provides web search capabilities through the Perplexity<br \/>\nSearch API or Perplexity Sonar via OpenRouter.<\/p>\n<p>\n  This page covers the Perplexity <strong>provider<\/strong> setup. For the Perplexity<br \/>\n  <strong>tool<\/strong> (how the agent uses it), see <a href=\"\/tools\/perplexity-search\">Perplexity tool<\/a>.\n<\/p>\n<ul>\n<li>Type: web search provider (not a model provider)<\/li>\n<li>Auth: <code>PERPLEXITY_API_KEY<\/code> (direct) or <code>OPENROUTER_API_KEY<\/code> (via OpenRouter)<\/li>\n<li>Config path: <code>plugins.entries.perplexity.config.webSearch.apiKey<\/code><\/li>\n<\/ul>\n<h2>Quick start<\/h2>\n<ol>\n<li>Set the API key:<\/li>\n<\/ol>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw configure &#8211;section web<\/p>\n<pre><code>\nOr set it directly:\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw config set plugins.entries.perplexity.config.webSearch.apiKey &quot;pplx-xxxxxxxxxxxx&quot;\n<\/code><\/pre>\n<ol start=\"2\">\n<li>The agent will automatically use Perplexity for web searches when configured.<\/li>\n<\/ol>\n<h2>Search modes<\/h2>\n<p>The plugin auto-selects the transport based on API key prefix:<\/p>\n<table>\n<thead>\n<tr>\n<th>Key prefix<\/th>\n<th>Transport<\/th>\n<th>Features<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>pplx-<\/code><\/td>\n<td>Native Perplexity Search API<\/td>\n<td>Structured results, domain\/language\/date filters<\/td>\n<\/tr>\n<tr>\n<td><code>sk-or-<\/code><\/td>\n<td>OpenRouter (Sonar)<\/td>\n<td>AI-synthesized answers with citations<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Native API filtering<\/h2>\n<p>When using the native Perplexity API (<code>pplx-<\/code> key), searches support:<\/p>\n<ul>\n<li><strong>Country<\/strong>: 2-letter country code<\/li>\n<li><strong>Language<\/strong>: ISO 639-1 language code<\/li>\n<li><strong>Date range<\/strong>: day, week, month, year<\/li>\n<li><strong>Domain filters<\/strong>: allowlist\/denylist (max 20 domains)<\/li>\n<li><strong>Content budget<\/strong>: <code>max_tokens<\/code>, <code>max_tokens_per_page<\/code><\/li>\n<\/ul>\n<h2>Environment note<\/h2>\n<p>If the Gateway runs as a daemon (launchd\/systemd), make sure<br \/>\n<code>PERPLEXITY_API_KEY<\/code> is available to that process (for example, in<br \/>\n<code>~\/.openclaw\/.env<\/code> or via <code>env.shellEnv<\/code>).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Perplexity (Provider) Perplexity (Web Search Provider)  [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-629","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/comments?post=629"}],"version-history":[{"count":2,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/629\/revisions"}],"predecessor-version":[{"id":728,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/629\/revisions\/728"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}