Skip to content

Embeddings

POST https://aiapiv2.pekpik.com/v1/embeddings

Terminal window
curl https://aiapiv2.pekpik.com/v1/embeddings \
-H "Authorization: Bearer $PEKPIK_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-3-small",
"input": "The quick brown fox"
}'
resp = client.embeddings.create(
model="text-embedding-3-small",
input=["first text", "second text"],
)
vectors = [d.embedding for d in resp.data]
FieldDescription
modele.g. text-embedding-3-small, text-embedding-3-large.
inputA string or array of strings.
dimensionsOptional output dimensionality (where the model supports it).

Embedding models bill on input tokens only.