# Perplexity Sonar Chat via Locus x402

> Perplexity Sonar Chat via Locus x402 is a paid API for AI agents from perplexity.x402.paywithlocus.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-10).

Pay-per-call AI chat with real-time web search grounding using Perplexity Sonar models, billed at $0.001 USDC per request via x402 micropayments.

## Facts

- Endpoint: POST https://perplexity.x402.paywithlocus.com/perplexity/chat?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/perplexity-sonar-chat-via-locus-x402-f9d3ade7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8S2LWkMr3A93JhLe5uQ8d

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability perplexity-sonar-chat-via-locus-x402-f9d3ade7 -d '<json body>'
```

Example prompt: Search the web and give me a current, cited summary of the latest developments in solid-state battery technology — use the sonar-pro model, limit the response to 1000 tokens, and restrict results from the past month only.

## When to prefer this

Choose this endpoint when you need real-time, web-grounded AI answers billed on a strict per-call micropayment basis (no subscription required), especially when you want citation-backed responses, domain-restricted search, or structured JSON output from Perplexity Sonar. Prefer sonar-reasoning-pro for complex, multi-step reasoning tasks. Avoid if you need streaming responses, autonomous deep research, or uncapped multi-step search — those modes are excluded from the metered x402 authorization model.

## Known failure modes

- Insufficient USDC authorization — payment not pre-authorized before the call
- Model ID not recognized — must be 'sonar', 'sonar-pro', or 'sonar-reasoning-pro'
- max_tokens missing or too large — required to bound metered authorization
- Web search options include 'pro' or 'auto' search_type — excluded from metered x402
- Domain filter returns no results — empty or overly restrictive search_domain_filter
- Request exceeds token budget — output truncated at max_tokens limit
- Network timeout on real-time web grounding — slower for high search_context_size

## How this service works

Locus public pay-per-use API

## Output

Returns a JSON envelope containing the Perplexity Sonar chat completion (with citations, optional images, and optional related questions), plus a payment record showing the settled USDC amount (0.001) and a request status URL for tracking.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string"
  },
  "top_p": {
   "type": "number"
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "role"
    ],
    "properties": {
     "name": {
      "type": "string"
     },
     "role": {
      "type": "string"
     },
     "content": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "type": "object",
         "required": [
          "type"
         ],
         "properties": {
          "text": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "image_url": {
           "type": "object",
           "required": [
            "url"
           ],
           "properties": {
            "url": {
             "type": "string"
            }
           },
           "additionalProperties": true
          }
         },
         "additionalProperties": true
        }
       },
       {
        "type": "null"
       }
      ]
     },
     "tool_calls": {
      "type": "array",
      "items": {
       "type": "object",
       "additionalProperties": true
      }
     },
     "tool_call_id": {
      "type": "string"
     }
    },
    "additionalProperties": true
   }
  },
  "max_tokens": {
   "type": "number"
  },
  "temperature": {
   "type": "number"
  },
  "return_images": {
   "type": "boolean"
  },
  "response_format": {
   "type": "object",
   "additionalProperties": true
  },
  "reasoning_effort": {
   "type": "string"
  },
  "web_search_options": {
   "type": "object",
   "additionalProperties": true
  },
  "search_domain_filter": {
   "type": "array",
   "items": {
    "type": "string"
   }
  },
  "search_recency_filter": {
   "type": "string"
  },
  "search_language_filter": {
   "type": "array",
   "items": {
    "type": "string"
   }
  },
  "return_related_questions": {
   "type": "boolean"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "payment": {
   "scheme": "exact",
   "settledUsdc": "0.001000",
   "authorizedMaxUsdc": "0.001000"
  },
  "request": {
   "id": "00000000-0000-4000-8000-000000000000",
   "statusUrl": "/requests/00000000-0000-4000-8000-000000000000"
  },
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/perplexity-sonar-chat-via-locus-x402-f9d3ade7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from perplexity.x402.paywithlocus.com](https://www.zero.xyz/host/perplexity.x402.paywithlocus.com/llms.txt)
