Skip to content

Embed V2 Context: Perplexity's Contextualized Embedding Models Explained

AINewss Editorial Team

Embed V2 Context is Perplexity's second-generation embedding family: pplx-embed-v2-context-0.6b and pplx-embed-v2-context-9b. Both embed text and images in a shared space over 32K tokens, with chunks encoded in full-document context. This guide covers model selection, input_type rules, image chunking, vector decoding, pricing, and limits.

View 3 references
0 views 0 likes

Allow the functional cookie to save your likes. Privacy details

An abstract illustration of documents, images and search queries being converted into connected vectors, representing Perplexity Embed V2 Context models.

Embed V2 Context is the name for Perplexity's second-generation contextualized embedding models, pplx-embed-v2-context-0.6b and pplx-embed-v2-context-9b. They place text and images in a shared vector space and embed each document chunk with sight of the whole document. This guide explains model choice, chunking, pricing, and the encoding details that trip up implementations.

What is Embed V2 Context?

Embed V2 Context refers to Perplexity's two v2 contextualized embedding models: pplx-embed-v2-context-0.6b and pplx-embed-v2-context-9b. Both map text and images into one vector space over a 32K-token context, so a text query can retrieve passages, documents, photos, or screenshots of pages.

The official documentation describes these as the embedding models behind Perplexity Search. OpenRouter lists the 9B model as released on 20 November 2026.

Which Embed V2 Context model should I choose?

Choose the 0.6B model as the default for throughput and cost: 1,024 dimensions, $0.02 per million text tokens, and $0.40 per million image tokens. Choose the 9B model for retrieval quality: 2,048 or 1,024 dimensions at $0.12 and $0.42 respectively. Their 1,024-d outputs share a space.

That shared space is useful. You can index documents with the cheap 0.6B model and query with the stronger 9B model, as long as you request 1,024 dimensions on the 9B side. Both use INT8 or binary quantization and a 32K context window.

How does contextual chunk embedding work?

You send each document as an ordered array of non-overlapping chunks with input_type set to document. The model reads the whole document when embedding each chunk, so a passage vector carries context its neighbours provide. Results arrive at data[i].data[j].embedding, and overlapping or reordered chunks corrupt the context.

from perplexity import Perplexity

client = Perplexity()
response = client.embeddings.create(
    model="pplx-embed-v2-context-0.6b",
    input_type="document",
    input=[
        ["Curiosity sparks questions.", "They drive breakthroughs."],
        ["The Curiosity rover explores Mars."],
    ],
)
for doc in response.data or []:
    for chunk in doc.data or []:
        print(doc.index, chunk.index, chunk.embedding)

One nested array means one document. Each inner list is an ordered chunk sequence, and the API returns one vector per chunk.

Why does input_type matter?

input_type is mandatory in v2 and must be query only for text a user actually typed. Titles, summaries, FAQs, and any indexed text are documents, even when short. Embedding the same string as a query and as a document yields two different, purpose-optimised vectors, so mixing them silently degrades retrieval.

Queries must be plain strings; nested arrays or images under input_type query return HTTP 400. A single request also cannot mix text and image inputs.

How do I embed images with Embed V2 Context?

Images are accepted only in document mode, as base64 data URIs for JPEG, PNG, or WebP files. Set num_chunks to 1, 2, 4, 8, 16, or 32 to split a page into regions; dense document scans benefit from more chunks. Requests cannot mix text and images, and each image is capped at 20 MB.

For a paper page or screenshot, four or more region embeddings often retrieve better than one global vector. Each region is embedded from top to bottom, and small images may return fewer regions than requested.

How do I decode the returned vectors?

The default encoding_format is base64_int8, which decodes to signed 8-bit integers, then float32, followed by cosine similarity. If you use inner product, L2-normalize both query and document vectors. The base64_binary format packs one bit per dimension and is compared with Hamming distance instead.

Confusing int8 bytes with floats is the most common integration bug. Decode to signed integers first, cast to float32, then normalise consistently on both sides of the comparison.

What are the limits and pricing?

Each request accepts up to 512 texts or documents, 16,000 total chunks, 32,768 tokens per document, and 120,000 tokens overall. Image requests allow up to 96 images. Both v2 models use 32K context and INT8 or binary quantization. A single request must contain either text or images, never both.

Empty strings and empty chunk lists are rejected. Image token usage depends on image size and num_chunks, and the exact count appears in usage.prompt_tokens.

When do the v1 models retire?

Perplexity's documentation states that v1 models will be phased out during 2027. Those older endpoints include pplx-embed-v1-0.6b, pplx-embed-v1-4b, and the contextualized v1 variants. New projects should build on v2, where input_type is explicit and images share the embedding space with text.

Unlike v2, v1 standard models used the same vector for query and document and had no mandatory input_type. Migrating means changing both request shape and similarity handling.

Frequently asked questions about Embed V2 Context

Typical questions concern mixing model sizes, chunk overlap, and whether images can be queried like text. You can index with 0.6B and query with 9B at 1,024 dimensions, chunks must not overlap, and image input is document-only. Check the current model identifier on OpenRouter or Perplexity's docs before hardcoding it.

Can I mix 0.6B indexing with 9B queries?

Yes, if both sides use 1,024 dimensions. Perplexity states that the 9B model's 1024-dimensional MRL output and the 0.6B model's 1024-dimensional output occupy the same embedding space. Requesting 2,048 dimensions from the 9B model breaks that compatibility.

Why must chunks be non-overlapping?

The model reads the entire document when embedding each chunk. Overlapping text appears more than once in that context, which distorts the vectors. Send chunks in original order so the model can reconstruct the document structure correctly.

Are images searchable with text queries?

Yes. Images are embedded with input_type document into the same space as text, so ordinary text queries can retrieve them. Sending an image as a query is not supported; use an image only as indexed content.

References

  1. Perplexity contextualized embeddings documentationdocs.perplexity.ai
  2. Perplexity Embed V2 Context 9B on OpenRouteropenrouter.ai
  3. Perplexity Embed V2 Context 0.6B model listingwww.respan.ai