# Perplexity Sonar Chat

> Perplexity Sonar Chat is a paid API for AI agents from Perplexity at perplexity.mpp.paywithlocus.com, paid per call via MPP, Model-dependent (~$0.005–$0.02) (dynamic), status unknown (last checked 2026-10-10).

Sends a chat message to Perplexity's Sonar models with real-time web search grounding and returns an AI-generated response with citations

## Facts

- Endpoint: POST https://perplexity.mpp.paywithlocus.com/perplexity/chat?utm_source=zero.xyz
- Price: Model-dependent (~$0.005–$0.02) (dynamic)
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Provider: Perplexity
- Docs: https://docs.perplexity.ai
- Website: https://perplexity.ai
- Tags: search, ai-search, web-grounding, sonar, ai
- Canonical page: https://www.zero.xyz/c/perplexity-chat-9950874e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IIZ7X7Q3UYUSyz3IlZbsN

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-chat-9950874e -d '<json body>'
```

Example prompt: Search the web using Perplexity's sonar-pro model and tell me what the latest developments are in quantum computing this week — include related questions and cite your sources.

## When to prefer this

Prefer this endpoint when you need AI-generated answers grounded in real-time web content with citations, especially for questions about recent events, current data, or topics requiring live web search. Choose sonar-deep-research for comprehensive multi-step research tasks, sonar-reasoning-pro for complex reasoning with web grounding, or sonar for fast everyday queries. Prefer over generic LLMs when freshness and source attribution matter.

## Known failure modes

- Invalid model ID returns 400 error
- Messages array missing or empty returns 422 validation error
- Temperature out of range (0.0–2.0) returns 400
- Max tokens exceeds 128000 returns 400
- Invalid search_recency_filter value returns 400
- reasoning_effort used on non-reasoning model returns 400
- Rate limit exceeded returns 429
- Insufficient funds returns 402

## How this service works

Generate chat completions with Sonar models. Features real-time web search grounding, citations, structured output, and reasoning capabilities.

## Output

Returns a chat completion response containing the AI-generated answer grounded in real-time web search results, along with source citations, optionally related follow-up questions, and optionally image results. The response follows a standard chat completion format with model metadata and usage stats.

## Example request

```json
{
 "model": "sonar",
 "messages": [
  {
   "role": "user",
   "content": "What are the latest developments in artificial intelligence this week?"
  }
 ],
 "max_tokens": 1000,
 "temperature": 0.7,
 "return_images": false,
 "search_recency_filter": "week",
 "return_related_questions": true
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "model",
  "messages",
  "max_tokens"
 ],
 "properties": {
  "model": {
   "type": "string",
   "description": "Metered x402 Sonar model ID: 'sonar', 'sonar-pro', or 'sonar-reasoning-pro'. Deep Research is excluded because its autonomous usage cannot be safely preauthorized."
  },
  "top_p": {
   "type": "number",
   "description": "Nucleus sampling threshold (0.0–1.0)"
  },
  "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
   },
   "description": "Conversation messages. Each: { role: \"system\"|\"user\"|\"assistant\", content: \"text\" } or multimodal with image_url content blocks."
  },
  "max_tokens": {
   "type": "number",
   "description": "Maximum output tokens (up to 128000). Required to bound metered x402 authorization."
  },
  "temperature": {
   "type": "number",
   "description": "Sampling temperature (0.0–2.0)"
  },
  "return_images": {
   "type": "boolean",
   "description": "Include image results in the response"
  },
  "response_format": {
   "type": "object",
   "description": "Structured output. { type: \"json_schema\", json_schema: { name: \"...\", schema: {...} } }",
   "additionalProperties": true
  },
  "reasoning_effort": {
   "type": "string",
   "description": "Reasoning effort level (sonar-reasoning-pro only): 'minimal', 'low', 'medium', 'high'"
  },
  "web_sea
… (truncated)
```

## More

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