Latest news on a topic
What important things happened in “<topic>” over the past week? Give five points, each with a source.
system: Answer in English, as a list, with a source after every point.max_tokens: 800Perplexity Sonar API: Sonar, Sonar Pro and Sonar Reasoning Pro with built-in web search through one Zerocoder key. No extra per-search fee.
Perplexity Sonar models answer with live web search: for every request the model finds fresh pages itself and writes an answer with sources. Through Zerocoder, Sonar, Sonar Pro and Sonar Reasoning Pro are served on the OpenAI-compatible /v1/chat/completions with streaming — no Perplexity account needed.
Search is built into the model and is not billed separately: you pay only per token — input and output at their own prices — with a minimum per call and a refund if the answer never starts. Below are the live prices of all three models, a calculator and code samples.
The live GET /v1/models price list in US dollars. Minimum per call: $0.00556. Endpoints: /v1/messages, /v1/chat/completions
| Model | Price | Unit |
|---|---|---|
Perplexity Sonarrecommended sonar · Perplexity | input $0.60 / output $0.60 | per 1M tokens |
Perplexity Sonar Pro sonar-pro · Perplexity | input $0.72 / output $3.36 | per 1M tokens |
Perplexity Sonar Reasoning Pro sonar-reasoning-pro · Perplexity | input $0.60 / output $1.92 | per 1M tokens |
Pick a model and a volume — the calculator uses the same formulas as API billing.
input $0.60 / output $0.60 per 1M tokens
minimum per call: $0.00556
Prices from GET /v1/models in US dollars at the internal rate. Failed generations are not charged.
The OpenAI SDK in Python and Node.js, the Anthropic SDK or curl: swap the base URL and the key — requests, streaming and response handling stay as they are. Perplexity Sonar answers on POST /v1/messages and /v1/chat/completions.
Base URLhttps://zerocoder.com /api/v1Anthropic SDK — https://zerocoder.com, without /v1
Model in the samples — sonar; any model from the table works
from openai import OpenAI client = OpenAI( base_url="https://zerocoder.com/api/v1", api_key="zc-sk-…",) r = client.chat.completions.create( model="sonar", messages=[{"role": "user", "content": "Hello!"}],)print(r.choices[0].message.content)import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://zerocoder.com/api/v1", apiKey: "zc-sk-…",}); const r = await client.chat.completions.create({ model: "sonar", messages: [{ role: "user", content: "Hello!" }],});console.log(r.choices[0].message.content);import Anthropic from "@anthropic-ai/sdk"; const client = new Anthropic({ // without /v1: the SDK appends /v1/messages itself baseURL: "https://zerocoder.com/api", apiKey: "zc-sk-…",}); const msg = await client.messages.create({ model: "sonar", max_tokens: 300, messages: [{ role: "user", content: "Hello!" }],});console.log(msg.content[0].text);# Anthropic Messages formatcurl https://zerocoder.com/api/v1/messages \ -H "x-api-key: zc-sk-…" \ -H "content-type: application/json" \ -d '{"model": "sonar", "max_tokens": 400, "messages": [{"role": "user", "content": "Hello!"}]}' # OpenAI chat/completions format, streamingcurl -N https://zerocoder.com/api/v1/chat/completions \ -H "authorization: Bearer zc-sk-…" \ -H "content-type: application/json" \ -d '{"model": "sonar", "stream": true, "messages": [{"role": "user", "content": "Hello!"}]}'
From a key to production — six steps based on the real /api/v1 contracts. Each step links to the relevant docs section.
Sign up, open the API section of your account, top up the balance and create a zc-sk-… key. One key unlocks Perplexity Sonar and every other model in the catalogue.
Read more →POST /v1/chat/completions (Bearer) or /v1/messages (x-api-key) with model and messages — OpenAI and Anthropic shapes, the SDKs work with a swapped base URL.
Read more →stream: true — the answer arrives as SSE chunks with a final billing event showing the real charge. The reserve is taken by max_tokens (default 8192), so set it to fit the task.
Read more →30 requests per minute per key: on 429 wait and retry with a growing pause; 402 — top up the balance; 400 — check model against GET /v1/models. Failed generations are not charged, so retrying is safe.
Read more →GET /v1/balance returns the balance and 30-day spend; every call's price comes back in the response — write it to your logs and set an alert threshold in your own monitoring.
Read more →Keep the key in server secrets, never in the frontend. For high Perplexity Sonar volumes contact us — the limit is raised individually and companies can pay by invoice. Check the observed stability on the status page.
Read more →HTTP Request node: POST to the /api/v1 endpoint, x-api-key header and a JSON body built from workflow fields. For video add a Wait node and a second HTTP Request on GET ?id= in a loop until completed.
HTTP “Make a request” module: POST, Body type JSON, x-api-key header. The response is parsed automatically — the image url or the answer text flows into the next modules.
Webhooks by Zapier → Custom Request action: POST, Data — JSON with model and prompt, Headers — x-api-key. Response fields are available to the following Zap steps.
In Apps Script use UrlFetchApp.fetch with method post, contentType application/json and a payload from the cells: prompts in one column, results written to the next one.
A bot on aiogram, grammY or Telegraf calls the same HTTP API: user message → model request → reply in the chat. For video — poll the status and send the file from the finished URL.
For text models the official OpenAI and Anthropic SDKs work with a swapped base URL and our key — your application code stays the same. Images and video are a plain HTTP call from any language.

More than a key: we help wire Perplexity Sonar and other models into your workflows — from audit to production, with invoice payment.
# 401 {"type":"error","error":{"type":"authentication_error","message":"Invalid or revoked API key."}}
# 402 {"type":"error","error":{"type":"billing_error","message":"Not enough API balance: …"}}
# 429 {"type":"error","error":{"type":"rate_limit_error","message":"…"}} ← 30 requests/min per key
# 400 {"type":"error","error":{"type":"invalid_request_error","message":"Unknown model \"…\". See GET /v1/models."}}
# /chat/completions uses the OpenAI envelope: {"error":{"message":"…","type":"…","code":"insufficient_balance"}}
# streaming: the reserve (by max_tokens) is settled after the answer; a failure before the first token is refunded
# event: billing {"charged_rub":…,"reserved_rub":…,"balance_rub":…,"unit":"1M_tokens","rub_per_mtok_in":…,"rub_per_mtok_out":…,"rub_per_mtok":…}
Numbers come from the public /status summary: the share of successful requests over a period for the whole API and for the category as a whole (the summary has no per-model breakdown), no SLA promises. Failed generations are not charged, so retrying is safe.
Tracking since Aug 8, 2026.
Answers about recent events, prices and news, with sources
Monitoring competitors, markets and brand mentions
Topic briefs and overviews that cite the pages they use
Fact-checking articles and other models' answers
Search assistants and bots that need up-to-date data
In-depth analysis of complex questions on the reasoning model

Copy the prompt and the parameters into the request body — the fields are named exactly as in the /api/v1 contract. Replace the angle-bracket placeholders with your material.
What important things happened in “<topic>” over the past week? Give five points, each with a source.
system: Answer in English, as a list, with a source after every point.max_tokens: 800Which new products, prices and promotions has “<company>” announced in the past month? Cite sources.
max_tokens: 700Is it true that <claim>? Answer “yes”, “no” or “unconfirmed” and give sources.
system: Give the verdict in one word first, then two or three sentences of reasoning.max_tokens: 400Put together a short brief on “<topic>”: definition, key figures, recent events. A source for every fact.
max_tokens: 1200<a multi-step question that needs data compared across several sources>
model: sonar-reasoning-promax_tokens: 1500Use the reasoning model for such questions — it costs more than the base one.

Industries where this kind of generation becomes part of the workflow rather than an experiment.
Perplexity Sonar is billed only per token: each model has two prices per million tokens — input and output — in the table above and in GET /v1/models, plus a per-call minimum. Web search is built into the model and carries no separate per-request fee.
Search is built into the Perplexity Sonar models: for every request the model finds fresh pages itself and writes an answer grounded in them, with sources. No extra parameter is needed to turn search on — just ask the question in messages on /v1/chat/completions.
In the Perplexity Sonar line the base Sonar gives quick answers and facts, Sonar Pro fuller overviews across several sources, and Sonar Reasoning Pro handles multi-step questions with reasoning. All three use one key with their own id from the table, at different prices.
Set base_url to zerocoder.com/api/v1 and a zc-sk-… key in the OpenAI SDK, and the Perplexity Sonar model id from the table in model. The /v1/chat/completions format and streaming match OpenAI, so existing code barely changes. Python, Node.js and curl samples are in the “First request” block.
A shared key limit of 30 requests per minute across all API endpoints; above it, 429. If the Perplexity Sonar answer never starts, the max_tokens reserve is refunded automatically; format errors are free. These models take no image input — a request with an image returns 400 with nothing charged.
Yes. Request an invoice in the API dashboard and pay from the company account; the credited amount is spent on Perplexity Sonar and any other model with the same key. Card top-ups are instant, and accounting documents are provided on request. No Perplexity account needed.
There are no free requests: the API wallet opens with a minimum first top-up, then every Perplexity Sonar call is charged per token with a per-call minimum. For a cheap test use the base Sonar and short questions — the cost shows in the billing block of the response.
Yes, that is the core strength of Perplexity Sonar: the model answers from fresh web pages and cites sources, so it is used for market and mention monitoring, topic briefs and checking claims. Ask for a source next to every fact — the answer is easier to verify.