Skip to main content
POST
This model is routable only on /v1/embeddings. A /responses or /chat/completions call with an embedding model returns 400. Send input as a string, or as an array of strings to embed a batch in one request. The response model field reads all-MiniLM-L6-v2, the upstream capitalization of the id you send.
Sentence-Transformers’ all-MiniLM-L6-v2 is the default workhorse of semantic search. It maps a sentence or short paragraph to a 384-dimensional vector, trained with contrastive learning on more than a billion sentence pairs, so cosine distance between two vectors tracks how close the two texts are in meaning. At 22.7M parameters it embeds fast and cheap enough to index a whole corpus and re-embed it whenever your content changes, which is what retrieval-augmented generation, deduplication, clustering, and recommendation pipelines actually need. Inputs are truncated at 256 tokens, so embed chunks rather than whole documents.
Embeddings are priced on input tokens only. There are no output tokens to bill, so a call costs $0.50 per 1M tokens embedded. References: Model cardLicenseTermsPrivacy

Authorizations

x-api-key
string
header
required

Headers

x-project-id
string

Optional project identifier. Scopes the request to a specific project when provided.

Body

application/json
model
string
default:all-minilm-l6-v2
required

Model identifier (fixed for this playground).

Allowed value: "all-minilm-l6-v2"
Example:

"all-minilm-l6-v2"

input
required

Text to embed. A single string, or an array of strings for one vector per element. Inputs are truncated at 256 tokens.

Required string length: 1 - 131072

Response

Success

An OpenAI-compatible embedding list. Vectors are truncated in this example; each has 384 dimensions.