Skip to main content
Perplexity

Search documentation

Type to search this documentation.

On this pageOverview

Embeddings API

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.

Pricing

Pay-as-you-go pricing for all APIs. No subscription required.

See pricing

Model Dimensions Context MRL Quantization Price ($/1M tokens)
pplx-embed-v1-0.6b 1024 32K Yes INT8/BINARY $0.004
pplx-embed-v1-4b 2560 32K Yes INT8/BINARY $0.03
pplx-embed-context-v1-0.6b 1024 32K Yes INT8/BINARY $0.008
pplx-embed-context-v1-4b 2560 32K Yes INT8/BINARY $0.05

All models use mean pooling and require no instruction prefix—you can embed text directly without prompt engineering.

Python
pip install perplexityai
TypeScript/JavaScript
npm install @perplexity-ai/perplexity_ai

Set your API key as an environment variable:

Bash
export PERPLEXITY_API_KEY="your_api_key_here"
powershell
setx PERPLEXITY_API_KEY "your_api_key_here"
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu