Skip to content
Petra Vlk

Dec 3, 202616 min read

Don't expect Pro to cover the Perplexity API, which is a paid developer product billed separately, so anyone wiring it into an automation tool like Activepieces should expect its usage to show up on its own invoice.

Two separate paper bills on a desk: a small Pro subscription card and a separate larger API billing statement, each with…

Pro gives you a small API credit, but the two are different things with different meters.

Get your Perplexity API key

What the Perplexity API is, and how it differs from Pro

Send a question from your own code or automation and the API returns an answer from Perplexity's models, with the cost counted per token and per search. Pro is a seat in the consumer app.

The table below shows where the two diverge. The row to read twice is billing basis: a flat subscription never surprises you, and usage billing can.

Pro subscription API
Monthly price $20 No fixed fee
Included API credit $5/month Only what you add yourself
Billing basis Flat monthly charge Per token plus per search
Where used Perplexity's app and website Your own code and tools
How you get a key Generated from your account's API settings Generated after you add credit

Don't mistake the $5 credit for a free tier: it is a balance that gets spent, so a script that loops will drain it and then run into billing. The $20 doesn't cover that usage, so you need additional funds.

Once the credit is gone, the account's balance and billing setup govern what happens to your requests. A job that ran fine on Monday can fail on Thursday.

Next come the console steps, which are short. Whether you call the API from code or from Activepieces, whose free plan includes 1,000 credits a month and unlimited flows, you need the key first.

A job that ran fine on Monday can fail on Thursday.

  1. Sign in to your Perplexity account, or create one.
  2. Open the API settings area of the account.
  3. Add a payment method and credit. Without a funded balance, a key may exist but the requests it authorises won't be paid for.
  4. Generate a key and copy it immediately, then store it in a secrets manager or environment variable, not in source code.

Treat the key as a password. Anyone holding it spends your balance.

Where to confirm what your plan includes

Check the vendor's own documentation at docs.perplexity.ai for tier limits, rate limits and per-request costs.

Because these details change, this section reflects the docs as of December 2026. Before you build on any limit or price, open the docs page yourself and compare it with your account's billing screen. That screen, not this article, decides what you are charged.

If you are running this arithmetic for your own team, see what the same workload costs on Activepieces.

Make your first API request

Send a POST to the chat completions path on Perplexity's API host, with a Bearer header, a model name and a messages array.

The reply carries the answer, a list of citations and a usage block, and the usage block is what you'll later compare your billing screen against.

Authenticate with the Bearer header

Generate a key in your API account, not in your Pro subscription settings, because the subscription doesn't issue API credentials. Send it as Authorization: Bearer <your key> on every call.

Anything that asks you for a base URL and a key, such as the provider dialog below, wants these same two values.

Below is an OpenAI provider setup in a platform admin panel, not Perplexity's. It shows the shape of what you're about to do: a pre-filled base URL, a masked key field, and a note to attach payment details before generating the key.

Modal dialog for enabling OpenAI as an AI provider in Activepieces Platform Admin, showing API key setup instructions and…

Take the lesson on payment from it. A key with no billing behind it is the first place a working script turns into an error, so check your account's billing page before you test.

Next comes the request itself.

  1. Start with curl and the URL: the API host plus /chat/completions. A wrong path returns an error, not a different endpoint.
  2. Add -H "Authorization: Bearer $PPLX_API_KEY". Keep the key in an environment variable so it never lands in shell history or a repository.
  3. Add -H "Content-Type: application/json". Without it the API may reject the body as unreadable.
  4. In the body, set "model" to a model name from the current docs page. Names change, so copy one rather than trusting memory or this article.
  5. Set "messages" to an array of objects, each with a role and content. One user message is enough for a first test, and a system message ahead of it sets behaviour.

A terminal window showing a curl command with a URL ending in chat/completions and an Authorization Bearer header line…

If you use an official SDK for OpenAI-compatible clients, it works the same way: point the client's base URL at Perplexity's host, pass your key, and send the same model and messages.

Read Perplexity API response, citations and usage

Print only the content and you discard the sources, because citations arrive as a separate field at the top level of the response, not inside the text. The answer text sits in the first item of choices, under message and content.

Log the usage block from the first call, because per-token billing is only auditable if you kept what each call reported. It reports token counts for the request.

Then break the request on purpose, with a bad key or an empty messages array, and save the error body before you build anything around it.

Model and endpoint choice by cost per unit

With the error bodies saved, price the successful calls the same way.

Sonar at low context is the cheapest chat-style option at $5 per 1,000 requests, and each step up in model or context adds up to $9 per 1,000 before Perplexity bills a single token.

Sonar models compared on token price and request fee

For each endpoint, the table shows the per-request fee. Pick the row whose fee you can afford at your volume, then check token charges separately. I've left token prices out because they change, and the pricing page is where to confirm them.

Endpoint Low Medium High Best use
Sonar $5 $8 $12 Quick grounded answers, high volume
Sonar Pro $6 $10 $14 Multi-part questions needing more sources
Search API $5 $5 $5 Raw ranked results you summarize yourself

Because the Search API row is a flat $5 per 1,000 calls, context size doesn't change it.

On low context, Keiro Labs lists $5 to $6 per 1,000 requests, on medium $8 to $10, and on high $12 to $14, so context window selection can multiply per-request cost by 2–3x. Moving from low to high therefore more than doubles the request fee.

Leaving context on high "to be safe" doubles your search bill on every call, including the ones that didn't need it.

How Perplexity search fees compare with other providers

According to Synapse Reality, Perplexity fast costs $1 per 1,000 calls, Agent $2.50 and Search $5. Synapse Reality reports that OpenAI and Anthropic are each $10, and Google is $14, so cost-sensitive projects would naturally avoid Google.

Web-search fees per 1,000 calls across AI providers

Per call, Perplexity's Search endpoint costs half what OpenAI or Anthropic charge, and its fast tier costs a tenth. Google's rate is nearly three times the Search endpoint's.

Fees only, tokens excluded, for 10,000 requests:

  1. Sonar at low context: 10 × $5 = $50, so even at minimum-cost configuration, you need fifty dollars per ten thousand requests. At high context: 10 × $12 = $120.
  2. Sonar Pro at low context: 10 × $6 = $60. At high context: 10 × $14 = $140.
  3. Search API: 10 × $5 = $50.
  4. For comparison, 10,000 Google calls cost $140 and OpenAI or Anthropic calls cost $100, so Sonar's cost advantage depends on context level, dominant on low-context tiers but evaporating at high-context pricing where it meets Google parity.

$50 to $140 is the spread inside Perplexity's own lineup, and it is larger than the gap to most other providers, so your decision between tiers matters as much as your decision between vendors.

Context size and model choice therefore matter more than which vendor you pick.

Set both deliberately, and log them with each request so the invoice can be reconciled line by line.

Worth checking against a plan that does not meter every step: one credit covers a whole run on Activepieces.

Rate limit planning by tier

50 requests per minute is where a new account starts on Perplexity's published tiers, and the ceiling rises to 8,000 at the top, which means you're initially confined to one request per second.

How much you have spent sets it, not what you would like to send.

Reconciling a per-request invoice is only half the job. The other half is whether the account can legally send the traffic you have planned.

Perplexity API rate limits by tier table

The ceiling rises steeply with spend and then jumps at the top, so a plan that works at one tier can fail without warning at the one beneath it.

At $0 spent, Tier 0 allows 50 requests per minute. That's under one request per second, so a single batch job fanning out in parallel can exhaust it within the first few seconds.

Tier 1 ($50+) allows 150, which triples your headroom for fifty dollars, by which point free users face a completely different operational ceiling.

At $250+, Tier 2 allows 500, and Tier 3 ($500+) allows 1,000, enough for a modest production service with several concurrent users. Tier 4 ($1,000+) allows 4,000 and Tier 5 ($5,000+) allows 8,000, which is the ceiling the docs publish.

Prototype numbers don't carry over. A load test that passed on a Tier 3 account tells you nothing about the same code on a fresh Tier 0 key.

Move up a Perplexity API usage tier

Use the API and pay for it: that is the only route up, because tiers are earned through cumulative spend.

The thresholds above are totals, not monthly figures, and the usage tiers page is where the docs say to check which tier your account currently holds. Look there before launch, not after the first rejected request.

Perplexity API request limits by usage tier

If you expect launch traffic above 150 requests per minute, you'll need to have spent at least $250 beforehand to reach Tier 2. Budget that as a pre-launch cost, not a surprise.

Backoff and queueing that respect the limit

Queue outbound calls and cap them below your tier's per-minute figure, with a margin. At Tier 1, a worker pool that releases around 120 requests per minute leaves room for retries without tripping the 150 ceiling.

When a request is rejected for exceeding the limit, wait and retry with exponential backoff plus random jitter, so parallel workers don't all retry at the same instant.

Set a maximum retry count and send exhausted jobs to a dead-letter queue, where you can read them rather than lose them.

Log the status code and timestamp with every rejection. A support ticket that says "throttled at 14:02:11" gets answered; one that says "it was slow" doesn't.

Troubleshoot Perplexity API errors

Log the status code and a timestamp on every failed call, then fix by class. Keys are the fix for 401 and 403, request shape for 400, backoff for 429, and retries with a hard timeout for 5xx. Throttling dominates what actually fails.

On the Requesty gateway in April 2026, 429 accounted for 65.8% of non-success upstream responses, 5xx for 4.8%, and other 4xx for the remainder, nearly three in ten.

Roughly two of every three failures are a rate limit you can design around, and server errors are the smallest slice, so spend your effort on backoff before anything else.

Order your fixes accordingly. The sections below start with the cheapest to rule out.

Fix Perplexity API 401 and 403 errors

When a 401 arrives, the key was missing, mistyped, revoked, or sent without the Bearer prefix in the Authorization header. Print the header your code actually sends, with the key masked, before suspecting the vendor.

A key from a Pro subscription is not an API credential; the API is a separate product with its own key and its own billing.

If a 403 appears, or a 401 after working for days, the account's credit may have run out. The documentation doesn't spell out every such case, so treat that reading as observed practice and check the billing page first.

When you get a 400, the fault is your request, not their service. The usual causes are a retired or misspelled model name and a parameter the chosen model doesn't accept.

Copy model names from the current model list in the vendor's docs instead of from old tutorials. Don't retry a 400; the same body will fail the same way.

429: rate limits and retry with jitter

Don't guess at the limits; they depend on your usage tier, so read the tier table in the docs. When a 429 arrives, wait, then retry with exponential backoff plus random jitter, so parallel workers don't all return at the same instant.

Robots leaving a door in staggered spacing

If the response carries a Retry-After header, honor it; whether it appears is observed practice, not something to rely on. Cap the number of attempts and queue the rest, because unbounded retries turn one throttle into a sustained one.

Handle Perplexity API 5xx errors and timeouts

Treat 5xx as transient: retry a few times with the same backoff, then fail visibly. Set an explicit client timeout, since search-backed requests can take longer than a plain completion, and a call with no timeout holds a worker open indefinitely.

Because billing is per token plus per search, check spend on a schedule. A retry loop that quietly repeats paid requests shows up on the invoice before it shows up in the logs.

Call the Perplexity API without code in Activepieces

To call the Perplexity API without code, build a visual flow in Activepieces: the key is stored once as a connection, and the Perplexity integration you connect there is both a step in your flow and a tool on the project's MCP server, so Claude, ChatGPT, Cursor or an agent of your own can call it with no export step and no second integration to maintain.

Activepieces workflow builder with HTTP request step selected and its settings panel open showing method, URL, headers, and…

Retries are set on the step.

The Integrations Framework and MCP Server docs describe the mechanism, and you can read it in packages/integrations in the open repo, one of 751 integrations counted there, where the same action serves as both the flow step and the MCP tool.

MoneyGram, Moneypenny, Alan and FundingSocieties run Activepieces in production.

A paid request that fails is then handled by a setting you can see instead of a loop you forgot to cap.

Choose your starting workflow connector

Look at the connectors library below, which lists the integrations available. What matters here is the starting set: Webhook, HTTP, Google Sheets and Gmail all sit on the first page, sorted by popularity.

Activepieces connectors library page showing 502 available integration pieces with filtering options and sample connector…

For this flow, Webhook gives you a trigger, HTTP gives you a way to reach any endpoint the vendor documents, and Google Sheets gives you somewhere to put the result. Next comes the order of the build.

  1. Choose a trigger. A Webhook integration gives the flow a unique URL, so another tool can start it by sending a request.
  2. Add the Perplexity step. If the library search shows a Perplexity integration, use it. If not, use the HTTP integration and point it at the endpoint in Perplexity's API documentation.
  3. Create the connection. Paste the API key into the connection field once, so it's never typed into a step or shared in a message.
  4. Turn on retries for that step, and keep them few. Every retry is a paid request.
  5. Add a Google Sheets step that appends the answer, with the question beside it, so each row is a record you can audit against the invoice.

Then add a branch for the error path. Write the failure status and the time into a second sheet tab, so a rejected key or a rate-limit response appears as a row rather than as a silent gap.

When to call the Perplexity API with code

When volume is high, code is the better choice. A visual flow runs one step after another, and each run uses 1 credit in Activepieces however many steps it has, against the 1,000 a month the free plan includes, on top of what Perplexity bills.

A job sending a large batch of queries wants a script with its own concurrency limit and backoff.

In code you also get finer control over how you read the vendor's rate-limit responses. Keep the flow for low and steady traffic, internal tools, and prototypes you want a colleague to be able to read.

On Monday, open Perplexity's API documentation and copy its current tier limits and per-request costs into the flow's description. Confirm that the API key belongs to the API account, not to a Pro subscription, then build the flow above with one test question.

Activepieces AI providers configuration showing active keys for Anthropic, Google Gemini, and OpenAI with their project…

Set retries to a small count and watch the first failed run, and check the error tab and the invoice together after the first day.

Share

Running the numbers

See what the same workload costs here.

Free forever plan, and every paid plan self-hosts at no extra cost.

See pricing Talk to sales