Perplexity

Perplexity API

Access Perplexity instantly with Puter.js, and add AI to any app in a few lines of code without backend or API keys.

// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';

puter.ai.chat("Explain AI like I'm five!", {
    model: "perplexity/sonar"
}).then(response => {
    console.log(response);
});
<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
        puter.ai.chat("Explain AI like I'm five!", {
            model: "perplexity/sonar"
        }).then(response => {
            console.log(response);
        });
    </script>
</body>
</html>

List of Perplexity Models

Chat

Perplexity: Sonar Pro Search

perplexity/sonar-pro-search

Sonar Pro Search is Perplexity's most advanced agentic search system, available exclusively via OpenRouter API, adding autonomous multi-step reasoning to Sonar Pro. Instead of single query+synthesis, it plans and executes entire research workflows using tools, making it ideal for deeper reasoning and analysis. This model powers Perplexity's Pro Search mode on their consumer platform.

Chat

Perplexity: Sonar

perplexity/sonar

Sonar is Perplexity's lightweight, cost-effective search model built on Llama 3.3 70B, optimized for speed (1200 tokens/second) and quick factual queries. It provides real-time web search with grounding and citations, ideal for simple Q&A and straightforward integrations. Best for everyday use cases where fast, accurate answers are needed without complex reasoning.

Chat

Perplexity: Sonar Deep Research

perplexity/sonar-deep-research

Sonar Deep Research is Perplexity's expert-level research model designed for exhaustive multi-step retrieval, synthesizing hundreds of sources into comprehensive reports. It autonomously searches, reads, and evaluates sources while refining its approach for in-depth analysis across domains like finance, technology, and health. Ideal for detailed market analyses, literature reviews, and projects requiring synthesis of multiple information sources.

Chat

Perplexity: Sonar Pro

perplexity/sonar-pro

Sonar Pro is Perplexity's advanced search model with a 200K token context window, delivering 2x more citations and search results than standard Sonar for complex queries. It handles in-depth, multi-step queries with enhanced content understanding and supports longer, more nuanced follow-up conversations. Best for enterprise applications requiring deeper research and comprehensive source attribution.

Chat

Perplexity: Sonar Reasoning Pro

perplexity/sonar-reasoning-pro

Sonar Reasoning Pro is a premier reasoning model powered by DeepSeek R1 with Chain of Thought (CoT), designed for complex multi-step analysis and logical problem-solving. It excels at tasks requiring step-by-step thinking, strict instruction adherence, and information synthesis across sources with built-in web search. Ranked among the top models in Search Arena evaluations, statistically tied with Gemini-2.5-Pro-Grounding.

Frequently Asked Questions

What is this Perplexity API about?

The Perplexity API gives you access to models for AI chat. Through Puter.js, you can start using Perplexity models instantly with zero setup or configuration.

Which Perplexity models can I use?

Puter.js supports a variety of Perplexity models, including Perplexity: Sonar Pro Search, Perplexity: Sonar, Perplexity: Sonar Deep Research, and more. Find all AI models supported by Puter.js in the AI model list.

How much does it cost?

With the User-Pays model, users cover their own AI costs through their Puter account. This means you can build apps without worrying about infrastructure expenses.

What is Puter.js?

Puter.js is a JavaScript library that provides access to AI, storage, and other cloud services directly from a single API. It handles authentication, infrastructure, and scaling so you can focus on building your app.

Does this work with React / Vue / Vanilla JS / Node / etc.?

Yes — the Perplexity API through Puter.js works with any JavaScript framework, Node.js, or plain HTML. Just include the library and start building. See the documentation for more details.