Overview
Perplexity’s Embeddings API generates high-quality text embeddings for semantic search and retrieval. Choose between standard embeddings for independent texts or contextualized embeddings for document chunks that share context.We recommend using our official SDKs for a more convenient and type-safe way to interact with the Embeddings API.
Pricing
Pay-as-you-go pricing for all APIs. No subscription required.
Available Models
All models use mean pooling and require no instruction prefix—you can embed text directly without prompt engineering.
Installation
Authentication
Set your API key as an environment variable:- macOS/Linux
- Windows
Next Steps
Standard Embeddings
Embed independent texts, queries, and sentences.
Contextualized Embeddings
Document-aware embeddings for chunks that share context.
Best Practices
Batch processing, caching, RAG patterns, and performance optimization.
Model Cards
See the model cards on HuggingFace.