Documentation Index
Fetch the complete documentation index at: https://docs.perplexity.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Theperplexity-haystack package provides Haystack components for Perplexity’s Agent API, Embeddings API, and grounded Search API, so you can build retrieval-augmented and agentic pipelines that combine chat, embeddings, and live web search.
Haystack is an open-source Python framework by deepset for building production-ready LLM applications, including RAG pipelines and agentic workflows. Learn more at haystack.deepset.ai.
- PerplexityChatGenerator — Chat completions through the Agent API (OpenAI-compatible).
- PerplexityTextEmbedder and PerplexityDocumentEmbedder — Embeddings through the Embeddings API.
- PerplexityWebSearch — Ranked, grounded web results through the Search API.
Installation
- pip
- uv
API Key Setup
Set your Perplexity API key as an environment variable:Get API Key
Generate your API key from the Perplexity dashboard.
Quick Start: Chat (Agent API)
PerplexityChatGenerator is powered by the Perplexity Agent API and defaults to openai/gpt-5.4.
Selecting a model
You can pick any of the supported Agent API models via themodel parameter:
openai/gpt-5.4 (default), openai/gpt-5.5, openai/gpt-4o, anthropic/claude-sonnet-4-6, xai/grok-4-1, and google/gemini-3-flash-preview. See the Agent API models page for the full list.
Quick Start: Embeddings
Embed a single query withPerplexityTextEmbedder:
PerplexityDocumentEmbedder:
pplx-embed-v1-0.6b. The larger pplx-embed-v1-4b model is also available — set it via the model parameter.
Quick Start: Web Search (Search API)
UsePerplexityWebSearch to get ranked, grounded web results inside a Haystack pipeline:
Links & Resources
Haystack Integrations
Catalog entry on haystack.deepset.ai
Source Code
perplexity-haystack on GitHub
PyPI Package
View on PyPI
Haystack Docs
Full Haystack documentation
Support
Need help with the integration?- Check the Haystack documentation
- Open an issue at haystack-core-integrations
- Review our FAQ