What Is Perplexity API? A Simple Guide for 2026
Learn how Perplexity’s developer platform connects AI and search services to your own app, what its five APIs do, and how to get started safely.
What Is the Perplexity API?
The Perplexity API is a developer platform that lets software communicate with Perplexity’s AI and search services. API stands for Application Programming Interface: a documented way for one program to request a service from another.
In everyday terms, you build an app or workflow, send a request to a Perplexity API, and use the response in your product. Depending on which API you choose, that response might be a source-cited answer, ranked web results, access to a supported model, text embeddings for retrieval or a structured decision.
The API is for developers and organizations integrating these capabilities into software. If you only want to ask questions yourself, the Perplexity website and apps are simpler to use. The API Platform’s official overview introduces its developer services.
How Does the Perplexity API Work?
- A user asks a question or takes an action in your application.
- Your backend sends a request to the relevant API with the input and settings.
- Perplexity processes the request using that API’s capabilities.
- Your application receives the result in the documented format.
- Your software decides how to display or further process the result.
For example, a research app might send a question to Agent API and show a response with citations. A custom search product might call Search API and display ranked results in its own interface.
Five Types of Perplexity API
Current Perplexity developer documentation describes five core APIs. They serve different jobs; some may have separate eligibility or access requirements.
| API | What it does | Choose it when… |
|---|---|---|
| Agent API | Combines supported models and tools, including web research, to produce AI responses such as cited answers. | You want an AI agent or generated answer in an integrated request. |
| Search API | Returns ranked web results as structured data instead of a complete generated answer. | You want to handle retrieval and presentation in your own code. |
| Orchestrator API | Offers a unified interface to supported open-weight models hosted by Perplexity. | You need model access or routing it provides; approval may apply. |
| Embeddings API | Turns text into vectors that help software find semantically related information. | You are building semantic search or document retrieval. |
| Decisions API | Returns typed, structured outputs such as probabilities or answers against defined criteria. | Your application needs a machine-readable classification or decision. |
Perplexity recommends Agent API for a full agent, Search API for raw retrieval, or Orchestrator for model choice. See the official API quickstart for current options and requirements.
Which API Should You Start With?
Agent API
Start here if the application needs a generated answer with web grounding or an agent workflow using configured tools.
Search API
Choose this when you want ranked search results as data and plan to filter, summarize or display them yourself.
Orchestrator API
Explore this if you need a unified interface to supported hosted open-weight models. Check access approval before building around it.
Embeddings or Decisions
Use Embeddings for semantic retrieval from text collections. Use Decisions when your workflow needs structured judgments rather than prose.
What Can You Build With the Perplexity API?
Research assistant
Answer questions about current topics and return linked sources users can inspect.
Custom search product
Retrieve ranked web results and present them in a specialized interface.
Document discovery
Use embeddings to find passages related by meaning, even when a query uses different wording.
Structured triage
Use defined criteria and structured output to help categorize requests, with appropriate human review.
Internal business tool
Integrate search and AI into internal software while managing access and data carefully.
Multi-model application
Use supported model access and combine API capabilities where your use case needs them.
The API provides building blocks, not a finished product. You design the interface, permissions, error handling and checks for generated results. See Perplexity AI for business for related use cases.
How to Get Started With the Perplexity API
- Open an API Platform account. Start at the official Perplexity API Platform.
- Review billing and access. API pricing is pay-as-you-go; some API options may require separate access approval.
- Create an API key. Generate it in the API Console’s API Keys section and keep it private.
- Try a playground or quickstart. Make a small test request using the official docs and SDK.
- Integrate through your backend. Send requests from a secure server environment rather than public client code.
- Monitor usage and validate responses. Check spend, rate limits, errors and answer quality as you test.
The official quickstart covers the first API call. The platform offers Python and TypeScript libraries and links to references and examples.
Simple request flow
Your backend authenticates with a protected key, sends a request to the API you chose, receives the documented response, then validates and displays it in your application. Endpoint fields and output formats differ by API, so use that API’s current reference.
How Much Does the Perplexity API Cost?
Perplexity’s docs describe pay-as-you-go billing with no subscription required. Rates depend on the API and usage. For example, Agent and Orchestrator requests may be priced by model tokens, while Search API uses request pricing. Models and tools can have different rates.
Prices and billing rules can change, so do not treat an old price table or an example as a quote. Review the live Perplexity API pricing page, estimate expected usage, and monitor spend in the API console.
For consumer subscriptions, see our Perplexity pricing guide.
Perplexity API vs Perplexity Website
| Consideration | Website or app | API |
|---|---|---|
| Typical user | People asking questions or doing research directly | Developers building their own software |
| How it works | Use a ready-made interface | Send programmatic requests from an application |
| Need to build software? | No | Usually, yes, or use an existing integration |
| Billing | Consumer plan options | Separate pay-as-you-go API usage |
| Best starting point | Open Perplexity and ask a question | Read the docs, set up billing and create a secure key |
If you only need answers and research for yourself, start with the regular Perplexity service. Choose the API when you need to build Perplexity-powered functionality into software you control. You can explore general Perplexity features or our Deep Research guide for product-side information.
What About the Older Sonar API?
Older tutorials may refer to Sonar endpoints or the original Perplexity API offering. Current docs organize the platform around Agent, Search, Orchestrator, Embeddings and Decisions APIs and include a migration guide from Sonar. The previously announced retirement date for old Sonar endpoints, September 27, 2026, has passed.
If you maintain older code, review the Sonar migration documentation and current changelog. For a new project, follow current endpoints and authentication instructions instead of assuming older samples still work.
Things to Plan For
- Development work: You still need to build and operate an application around the API.
- Cost management: Estimate usage, test with realistic requests and monitor billing.
- Output validation: AI responses and classifications can be wrong; set appropriate review rules.
- Key security: Keep credentials out of public client-side code and rotate exposed keys.
- Access and rate limits: Confirm availability and rate limits for each API before designing a production workflow.
- Data practices: Review the official API privacy and terms documents before sending sensitive or personal information.
- Changing docs: Use current official references for endpoints, models, limits and prices.
Frequently Asked Questions
What is the Perplexity API used for?
It lets developers add Perplexity services to their own applications, including web-grounded answers, search results, supported model access, embeddings and structured decisions.
Does Perplexity have an official API?
Yes. Perplexity has an API Platform with official documentation, an API Console, API keys and multiple APIs for developer use.
Is the Perplexity API free?
The API uses pay-as-you-go pricing, and current documentation says no subscription is required. Check the live pricing page for rates; API usage is separate from consumer subscriptions.
Is the API included in Perplexity Pro?
No. Consumer subscriptions and API platform usage are separate. API credits and requests are billed separately.
What is the difference between Agent API and Search API?
Agent API can use supported models and tools to generate web-grounded answers. Search API returns ranked web results as structured data rather than a complete generated response.
Which API should a beginner use?
Try Agent API if you want an AI agent or generated answer. Choose Search API if you want raw ranked results to process yourself. The right option depends on your application.
Do I need coding knowledge?
Custom integrations generally require programming or a development platform that can make API calls. The docs provide quickstarts and SDKs, but you still need to build and secure the application.
Where do I get a Perplexity API key?
Create it in the API Console’s API Keys section. Keep it secret and use it from a secure server-side environment.
What happened to the Sonar API?
Current documentation includes a migration guide from Sonar to the newer API platform. The announced September 27, 2026 retirement date has passed; consult current docs if you maintain a legacy integration.
Explore the Official Developer Resources
Choose an API, check current pricing and follow the first-request guide.
Official references: API Platform · Quickstart · Pricing · Sonar migration · Consumer plan comparison.