Perplexity has launched its Agent API, a new offering designed to streamline the development of large language model (LLM) applications. This multi-provider LLM API aims to consolidate access to models from various leading providers, including OpenAI, Anthropic, and Google, under a single, standardized interface.
Unified Access and Control
The Agent API promises developers a unified way to interact with diverse LLM capabilities. It integrates features like real-time web search, configurable tools, and controlled reasoning processes. This approach eliminates the need for developers to manage multiple API keys and SDKs for different providers.
Developer Benefits
Key advantages highlighted by Perplexity include multi-provider access, transparent pricing based on direct provider costs without markups, and granular control over models, reasoning parameters, and token budgets using consistent syntax. The company recommends using its official SDKs for a more streamlined and type-safe interaction.
The API endpoint is available at POST https://api.perplexity.ai/v1/agent, with an alias POST /v1/responses for OpenAI SDK compatibility.
Installation and Authentication
Developers can install the necessary SDKs via pip for Python or npm for TypeScript. Authentication is handled by setting the PERPLEXITY_API_KEY environment variable, which the SDKs automatically detect. Explicit key passing is also supported.
