This guide will help you get started with Perplexity chat models. For detailed documentation of allDocumentation Index
Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-naomid-1779801766-572e290.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
ChatPerplexity features and configurations head to the API reference.
Overview
Integration details
| Class | Package | Serializable | PY support | Downloads | Version |
|---|---|---|---|---|---|
ChatPerplexity | @langchain/perplexity | beta | ✅ |
Model features
See the links in the table headers below for guides on how to use specific features.| Tool calling | Structured output | Image input | Audio input | Video input | Token-level streaming | Token usage | Logprobs |
|---|---|---|---|---|---|---|---|
| ❌ | ✅ | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ |
Setup
To access Perplexity models you’ll need to create a Perplexity account, get an API key, and install the@langchain/perplexity integration package.
Credentials
Head to the Perplexity API key dashboard to sign up and generate an API key. Once you’ve done this set thePERPLEXITY_API_KEY environment variable:
Installation
The LangChain Perplexity integration lives in the@langchain/perplexity package:
Instantiation
Now you can instantiate the model:Invocation
Related integrations
The@langchain/perplexity package also includes search components that do not use the chat API:
PerplexitySearchRetriever: returnsDocumentobjects from the Perplexity Search API for RAG pipelinesPerplexitySearchResults: agent tool that returns JSON search results
API reference
For detailed documentation of allChatPerplexity features and configurations head to the API reference.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

