v32

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-2114136159.9 KB

Create Contextualized Embeddings

Generate contextualized embeddings for document chunks. Chunks from the same document share context awareness, improving retrieval quality for document-based applications.

post/v1/contextualizedembeddings

Request body

model'pplx-embed-context-v1-0.6b' | 'pplx-embed-context-v1-4b' required

The contextualized embedding model to use

dimensionsinteger

Number of dimensions for output embeddings (Matryoshka). Range: 128-1024 for pplx-embed-context-v1-0.6b, 128-2560 for pplx-embed-context-v1-4b. Defaults to full dimensions (1024 or 2560).

encoding_format'base64_int8' | 'base64_binary'

Output encoding format for embeddings. base64_int8 returns base64-encoded signed int8 values. base64_binary returns base64-encoded packed binary (1 bit per dimension).

Response

Successful Response

objectstring

The object type

modelstring

The model used to generate embeddings

Example response

{
  "object": "list",
  "data": [
    {
      "object": "list",
      "data": [
        {
          "object": "embedding"
        }
      ]
    }
  ]
}