{"uid":"cap_8S2LWkMr3A93JhLe5uQ8d","slug":"perplexity-sonar-chat-via-locus-x402-f9d3ade7","name":"Perplexity Sonar Chat via Locus x402","description":"Locus public pay-per-use API","url":"https://perplexity.x402.paywithlocus.com/perplexity/chat?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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"}}},"responseSchema":{"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}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_lS4uvMzhlN7kudpeoDGjZ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Real-time competitive intelligence lookup","prompt":"Search the web right now and give me a concise summary of what competitors like OpenAI, Anthropic, and Google have announced in AI this past week — use sonar-pro, up to 800 tokens, and filter to results from the last 7 days."},{"title":"Domain-restricted research for legal updates","prompt":"I need a web-grounded answer about recent EU AI Act enforcement updates, but only pull from europa.eu and reuters.com — use the sonar model, limit to 600 tokens, and only look at content from the past month."},{"title":"Structured JSON answer for product pipeline","prompt":"Use sonar-reasoning-pro with high reasoning effort to answer: what are the top 5 programming languages by popularity in 2025 and why? Return the answer as a JSON object with a ranked list — cap output at 500 tokens."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T06:39:21.644Z","isFirstParty":false,"canonicalSlug":"perplexity-sonar-chat-via-locus-x402-f9d3ade7"}