Skip to main content

Overview

Composio is a universal tool gateway for AI agents. The Composio Perplexity toolkit exposes the full Perplexity API — Chat Completions, Agent, Search, Embeddings, and async variants — as tools that any agent framework can call through a single MCP URL or direct API integration.
Composio handles authentication, secure credential storage, OAuth flows, and tool routing for 1000+ apps. Learn more at composio.dev.
The toolkit ships these Perplexity actions:
  • Execute AgentPOST /v1/agent (Agent API responses)
  • Create Chat CompletionPOST /v1/sonar (Sonar chat completions)
  • Create Async Chat CompletionPOST /v1/async/sonar
  • Get / List Async Chat CompletionsGET /v1/async/sonar/{id}, GET /v1/async/sonar
  • Perplexity Search (Raw Results)POST /search
  • Create EmbeddingsPOST /v1/embeddings
  • Create Contextualized EmbeddingsPOST /v1/contextualizedembeddings
  • List ModelsGET /v1/models

Prerequisites

Get API Key

Generate your Perplexity API key from the API portal.

Installation

For agent-framework integrations, install your framework SDK alongside Composio (Composio supports Claude Agent SDK, OpenAI Agents SDK, LangChain, LlamaIndex, Mastra, Pydantic AI, AutoGen, CrewAI, Google ADK, and more).

Quick Start: Tool Router (MCP)

The Tool Router exposes Perplexity as an MCP server your agent can connect to. This works with any MCP-compatible client (Claude Code, Cursor, OpenCode, etc.).
Wire that URL into your agent’s MCP configuration:

Quick Start: Direct API Actions

You can also execute Perplexity actions directly from Composio without an MCP layer:

Supported Agent Frameworks

Composio’s Perplexity toolkit works with every agent framework Composio supports, including:
  • ChatGPT, OpenAI Agents SDK, Codex
  • Claude Agents SDK, Claude Code
  • Cursor, VS Code, OpenCode
  • Google ADK, LangChain, AI SDK, Mastra AI
  • LlamaIndex, CrewAI, Pydantic AI, AutoGen
Each framework has a dedicated setup guide in the Composio Perplexity toolkit page.

Authentication

Composio stores your Perplexity API key securely and injects it into every request. You provide your key once during the toolkit authorization flow — either through the Composio dashboard or programmatically via composio.toolkits.authorize(...). Composio handles token refresh, scope management, and request signing on every call.

Composio Perplexity Toolkit

Full toolkit documentation with framework-specific guides.

Composio Docs

Composio platform documentation.

Perplexity API Reference

Full Perplexity API reference.

Perplexity Models

Available Perplexity models.

Support

Need help with the integration?