Guides · ai · Everyday developer services

Perplexity API (Sonar / Agent API)

Perplexity account, a project (API group) in console.perplexity.ai with organisation details, prepaid credits via Stripe, then an API key.

Researched · not yet run liveLast researched 25 October 2026 · Perplexity AI · provider site

Researched, not yet run live. Built from the provider’s official pages (linked below). A person hasn’t walked this flow end to end yet, so check each step against the source.

Who owns what

A Perplexity user account joins a project (API group) in the API console; the project holds billing, credits, API keys and members.

  • Perplexity account personal owned by the person
  • API project (API group) project owned by the company · under Perplexity accountOrganisation name and address appear on invoices. Admins manage billing and members; Members cannot see billing or usage.

API credits are separate from Perplexity consumer subscription features. [to verify current wording]

Have ready

  • Admin role in the API project for billing and key management
  • Credit card for prepaid API credits (processed by Stripe) · Usage is credit-based and keys are blocked when credits run out [1]Needed for: Add a payment method and buy credits
  • Organisation tax details, if applicable · Entered in project settings and used on invoices [1]Needed for: Set up the project in the API console
  • Organisation address (no document upload; address details only) · Shown on invoices [1]Needed for: Set up the project in the API console

Steps

Steps marked “human step” are ones only you can do: verapli never signs in, submits, pays or accepts terms for you.

  1. Create a Perplexity account

    You sign up yourself at perplexity.ai.

    • Guided by hand
    • Human step: You sign in

    Where: https://www.perplexity.ai/

  2. Accept the Perplexity API Terms of Service

    API use is governed by the API Terms of Service and the Acceptable Use Policy. You accept them yourself. [to verify where acceptance happens]

    • Guided by hand
    • Human step: You accept the terms
    • After: Create a Perplexity account
  3. Set up the project in the API console

    At console.perplexity.ai open Project > Settings and enter organisation name, address and tax details.

    • Guided by hand
    • Human step: You press submit
    • After: Accept the Perplexity API Terms of Service

    Where: https://console.perplexity.ai/

  4. Add a payment method and buy credits

    On the Billing page add a card (Stripe), buy credits, and optionally turn on Auto reload. Adding a card alone does not charge it. verapli never touches payment details.

    • Guided by hand
    • Human step: You add payment details
    • After: Set up the project in the API console
    If something goes wrong (1)
    • API keys stop working: Credits ran out; buy more credits or enable Auto reload. [1]

    Where: https://console.perplexity.ai/project/billing

  5. Generate an API key

    Open API keys and click + Generate API Key, then copy it. Keys are shown only once; verapli writes it to your env file.

    • verapli co-pilot
    • Human step: You press submit
    • After: Add a payment method and buy credits

    verapli captures PERPLEXITY_API_KEY here by plain code: encrypted in your browser, never shown to AI.

    Where: https://console.perplexity.ai/

Terms and gotchas

Plain-English summary, not legal advice. Each card links its source.

Can get you bannedThe rules say

Sonar Chat Completions support has ended

Perplexity's Sonar model pages say Sonar Chat Completions support ends September 27, 2026, and map Sonar models to Agent API effort levels. New integrations should target the Agent API. [5]

Can cost moneyThe rules say

Chatbots must disclose AI

The Acceptable Use Policy prohibits chatbot services that do not disclose to end users they are interacting with AI, claiming AI output was created solely by humans, and removing AI-generated watermarks or metadata. [7]

Can cost moneyThe rules say

No reselling or competing products

The AUP bars reselling or copying the Services, building competing products without permission, jailbreaking and prompt injection, unsupervised medical, financial, tax or legal services, and automated decisions that materially impact individuals. Violations can lead to suspension or termination. [7]

Worth knowingThe rules say

API keys are confidential; Perplexity can suspend keys

Each API key is Perplexity's Confidential Information; you must notify Perplexity of unauthorized access. Perplexity may suspend accounts or API keys for breach, nonpayment, legal compliance or attack mitigation. Payments are nonrefundable and late payments incur 1.5% per month. [6]

What you end up with

Env varSecretFormatWhat it is
PERPLEXITY_API_KEYsecretpplx-… [to verify]Perplexity API key, sent as a Bearer token

Renewals

  • Rotate API keys (Perplexity suggests every 90 days): every 90 days [2]

Pricing

  • Free tier: No free API tier found in the docs. [to verify]
  • Costs: Prepaid credits. Agent API lists perplexity/sonar at $0.25 per 1M input and $2.50 per 1M output tokens; Search API is $5.00 per 1K requests ($1.00 per 1K with Fast Search). Legacy Sonar request fees [to verify].
  • Credits are consumed at different rates per model; Auto reload tops up when the balance drops below a threshold.

Source [3]

For agents

The same entry as JSON: /api/v1/entries/perplexity/api · requirements /api/v1/requirements/perplexity/api · terms /api/v1/terms/perplexity/api.

Remote MCP (read-only, no auth)
claude mcp add --transport http verapli https://verapli.com/mcp

> "What do I need for Perplexity API (Sonar / Agent API), and how long will it take?"
  → tools/call requirements { "provider_id": "perplexity/api" }

Sources

  1. Projects & Billing Account at perplexity.ai; project settings with org name, address, tax details; billing page, Add payment method via Stripe, Buy more credits, Auto reload; keys blocked at zero credits; Generate API Key; Admin and Member roles · accessed 25 October 2026 · official
  2. API Key Management generate_auth_token and revoke_auth_token endpoints; keys shown only once; project must exist first; rotation every 90 days suggested · accessed 25 October 2026 · official
  3. Pricing Search API $5.00 per 1K requests ($1.00 with Fast Search); per-token billing for Orchestrator API · accessed 25 October 2026 · official
  4. Agent API Models perplexity/sonar at $0.25 input / $2.50 output per 1M tokens and other hosted model prices · accessed 25 October 2026 · official
  5. Sonar Pro model page Sonar Chat Completions support ends September 27, 2026; migration to Agent API effort levels · accessed 25 October 2026 · official
  6. Perplexity API Terms of Service (last updated 2026-01-23) API keys are confidential information; notify of unauthorized access; no training on customer content; suspension rights; non-transferable licence; nonrefundable payments; 1.5% late fee · accessed 25 October 2026 · official
  7. Perplexity Acceptable Use Policy (last updated 2025-07-08) Prohibited uses; AI disclosure for chatbots; no removing AI watermarks; no reselling or competing products; suspension · accessed 25 October 2026 · official

Provider rules change. This page is generated from verapli registry version 2026.1025.316; spotted something out of date? Tell us. Perplexity AI is not affiliated with verapli.