Skip to content

Embeddings

POST /v1/embeddings

{
"model": "text-embedding-3-small",
"input": "Parel provides one API for many model types."
}
response = client.embeddings.create(
model="text-embedding-3-small",
input="Parel provides one API for many model types.",
)
vector = response.data[0].embedding
FieldTypeRequiredDescription
modelstringyesEmbedding model ID
inputstring or arrayyesText to embed
encoding_formatstringnofloat or base64 when supported
  1. Embed the query.
  2. Search your vector database.
  3. Optionally rerank candidate documents.
  4. Send the top context to chat completions.