Skip to main content
POST
Create Embeddings
See Embeddings for parameters, encoding formats, and similarity metrics.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request body for creating embeddings

input
required

Input to embed. pplx-embed-v2 models accept a string, an array of strings, pre-chunked documents (an array of string arrays), or image objects. pplx-embed-v1 models accept only a string or array of strings; a request contains only text or only images. Maximum 512 texts or documents per request. Each text or document must not exceed 32K tokens. All text in a single request must not exceed 120,000 tokens combined. Empty strings are not allowed.

Minimum string length: 1
model
enum<string>
required

The embedding model to use. Start with pplx-embed-v2-context-0.6b. v1 models will be phased out during 2027.

Available options:
pplx-embed-v2-context-0.6b,
pplx-embed-v2-context-9b,
pplx-embed-v1-0.6b,
pplx-embed-v1-4b
input_type
enum<string>

Required for pplx-embed-v2 models. Use query for search queries and document for content you index. Pre-chunked documents and images require document.

Available options:
query,
document
num_chunks
enum<integer>
default:1

pplx-embed-v2 image inputs only. Splits each image into this many horizontal regions and returns one embedding per region. Small images can return fewer regions.

Available options:
1,
2,
4,
8,
16,
32
dimensions
integer

Output dimensions. v2: 1024 for pplx-embed-v2-context-0.6b (not MRL-trained); 1024 or 2048 for pplx-embed-v2-context-9b (MRL). v1: multiples of 8 from 128 to 1024 for pplx-embed-v1-0.6b or 2560 for pplx-embed-v1-4b. Defaults to the model's full dimensions.

Required range: 128 <= x <= 2560
encoding_format
enum<string>
default:base64_int8

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

Available options:
base64_int8,
base64_binary

Response

Successful Response

Response body for embeddings request

object
string

The object type

Example:

"list"

data
(Embedding Object · object | Contextualized Embedding Object · object)[]

List of embedding objects. Pre-chunked documents and image inputs with num_chunks above 1 return one contextualized object per input, with chunk embeddings in data.

A single embedding result

model
string

The model used to generate embeddings

usage
Embeddings Usage · object

Token usage for the embeddings request