Introduction
Perplexity Embed v1 4B produces 2,560-dimensional dense vectors up to 32,000 tokens, designed for search ranking and document retrieval.
| Field | Value |
|---|---|
| Input | Text |
| Output | Structured data |
| Dimensions | 2560 |
| Context window | 32,000 tokens |
| Batch limits | 128 items · 300K tokens |
Key features & highlights
Dense 2560-dimensional representations
Perplexity Embed v1 4B from Perplexity outputs floating-point vectors of 2560 dimensions ready for cosine similarity search, clustering, and reranking pipelines.
Single-text or homogeneous batch requests
Send Perplexity Embed v1 4B one passage or a batch of up to 128 strings or token arrays synchronously, preserving each vector's original input index.
Request parameters
| Parameter | Required | Description |
|---|---|---|
embedding_input | Yes | Pass a single string, a batch of up to 128 strings, or token ID arrays for Perplexity Embed v1 4B; each returned vector keeps its input index. |
Pricing
$0.00003 / 1M input tokens
Perplexity Embed v1 4B is billed by measured input tokens.
Use cases
Semantic search and RAG indexing
Index knowledge bases and technical collections with Perplexity Embed v1 4B to retrieve relevant passages before passing context to a generation model.
Clustering and duplicate detection
Compare 2560-dimensional vectors from Perplexity Embed v1 4B to group similar tickets, articles, or code snippets.
Prompt guide & pro tips
Prompt guide & Pro tips
Use Perplexity Embed v1 4B for both document indexing and query embedding, keeping each Perplexity Embed v1 4B call within 128 items and 300,000 tokens and re-embedding when text changes.
Introduction
Perplexity Embed v1 4B produces 2,560-dimensional dense vectors up to 32,000 tokens, designed for search ranking and document retrieval.
Key features
Perplexity Embed v1 4B from Perplexity outputs floating-point vectors of 2560 dimensions ready for cosine similarity search, clustering, and reranking pipelines.
Send Perplexity Embed v1 4B one passage or a batch of up to 128 strings or token arrays synchronously, preserving each vector's original input index.
Use cases
Index knowledge bases and technical collections with Perplexity Embed v1 4B to retrieve relevant passages before passing context to a generation model.
Compare 2560-dimensional vectors from Perplexity Embed v1 4B to group similar tickets, articles, or code snippets.
Usage tips
Use Perplexity Embed v1 4B for both document indexing and query embedding, keeping each Perplexity Embed v1 4B call within 128 items and 300,000 tokens and re-embedding when text changes.
API quick start
# Generate the idempotency key once; reuse it when retrying after a lost response.
export SPICY_IDEMPOTENCY_KEY="${SPICY_IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.spicyapi.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SPICY_IDEMPOTENCY_KEY" \
-d '{
"model": "perplexity/embed-v1-4b/embedding",
"input": {
"embedding_input": "The customer asks for a refund after being billed twice."
}
}'
# Copy data.taskId from the response into TASK_ID, then poll the status.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.spicyapi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"
See the API reference for authentication, the complete schema, polling, and error handling.



