Skip to content

Embeddings

Embedding models convert text into a fixed-length numerical vector. The cosine similarity between two vectors measures how semantically close the underlying texts are, which is used for search, clustering, recommendation, and anomaly detection.

Google's multimodal (text + image + audio + video + PDF) embedding models use a different input shape; see Google Embeddings for those. This page covers the OpenAI-compatible embedding models that accept text input only.

ModelContextOutput sizePrice ($/1M tokens)
openai/text-embedding-3-large8,192up to 3072 (variable)0.13
openai/text-embedding-3-small8,192up to 1536 (variable)0.02
openai/text-embedding-ada-0028,1921536 (fixed)0.10
voyageai/voyage-4-large32,000256/512/1024/20480.12
voyageai/voyage-432,000256/512/1024/20480.06
voyageai/voyage-4-lite32,000256/512/1024/20480.02
voyageai/voyage-code-432,000256/512/1024/20480.12
voyageai/voyage-code-332,000256/512/1024/20480.18
voyageai/voyage-finance-232,0001024 (fixed)0.12
voyageai/voyage-law-216,0001024 (fixed)0.12
voyageai/voyage-context-432,000256/512/1024/20480.18
perplexity/pplx-embed-v1-0.6b32,0001024 (fixed)0.004
perplexity/pplx-embed-v1-4b32,0002560 (fixed)0.03
perplexity/pplx-embed-context-v1-0.6b32,0001024 (fixed)0.008
perplexity/pplx-embed-context-v1-4b32,0002560 (fixed)0.05
llmtr/embeddinggemma-300m2,048768 (fixed)0.10
liquid/lfm-2.5-embedding-350m-free5121024 (fixed)Free

Every row in the table takes text input only. The catalog also holds embedding rows that use a different input shape — Google's multimodal models and voyageai/voyage-multimodal-3.5 — which this page does not cover; the listing command below returns those as well.

perplexity/pplx-embed-context-* and voyageai/voyage-context-4 expect a nested array input: the outer list holds documents and each inner list holds that document's chunks. Every other row takes a flat input. The endpoint is the same in both cases: /v1/embeddings.

liquid/lfm-2.5-embedding-350m-free is a free option that converts short text into fixed 1024-dimensional vectors. It has a 512-token limit per text. Successful requests may be retained and used to train Liquid models, so do not send sensitive, personal, or customer data to this model.

To list every embedding model in the catalog:

Terminal window
curl -s "$LLMTR_BASE_URL/v1/models" \
| jq -r '.data[] | select(.supported_operations[] == "EMBEDDINGS").id'
Terminal window
curl "$LLMTR_BASE_URL/v1/embeddings" \
-H "Authorization: Bearer llmtr-your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/text-embedding-ada-002",
"input": "Invoices are issued on the first business day of each month."
}'

input can be a single string or an array of strings (batch):

{
"model": "openai/text-embedding-ada-002",
"input": ["first text", "second text", "third text"]
}
FieldRequiredDescription
modelYesThe embedding model's identifier.
inputYesA single string or an array of strings.
dimensionsNoOnly meaningful on rows with a variable output size: openai/text-embedding-3-large (any value up to 3072), openai/text-embedding-3-small (any value up to 1536), and most Voyage rows (one of the values in the table above). voyage-finance-2 and voyage-law-2 in the Voyage family are fixed-size; an unsupported value on those rows returns 400 invalid_request listing the accepted values. openai/text-embedding-ada-002 does not support the field at all and returns 400 provider_error.
{
"object": "list",
"data": [
{ "object": "embedding", "index": 0, "embedding": [0.0023, -0.0091, "..."] }
],
"model": "openai/text-embedding-ada-002",
"usage": { "prompt_tokens": 9, "total_tokens": 9 }
}

Each item in data carries the vector for the text at the same position in input; match order using index.

Cost is based on input tokens only — embedding models have no output-token concept. usage.prompt_tokens carries the billed token count.

The platform margin is never added to model prices; the margin only applies to credit top-ups. See Billing for details.

openai/text-embedding-3-large is OpenAI's most capable embedding model: an 8,192-token context window and up to 3072 output dimensions. openai/text-embedding-3-small shares the same context window and produces up to 1536 output dimensions at a lower price. The dimensions parameter can shrink either model's output, trading some accuracy for lower storage cost.

openai/text-embedding-ada-002 is OpenAI's older-generation embedding model, sharing the same 8,192-token context window but producing a fixed 1536-dimensional vector. It does not support shrinking the output size via the dimensions parameter — that capability only exists on OpenAI's newer embedding models, text-embedding-3-large and text-embedding-3-small.

The Voyage family supports a variable output size from 256 to 2048 via the dimensions parameter, plus quantization options, which suits integrations that need to reduce vector database storage cost. voyageai/voyage-context-4 vectorizes a document's chunks together with each other's context.

StatusMeaning
400 invalid_requestinput or model is missing/invalid — the request was rejected by the gateway's own schema validation.
404 model_not_foundThe model id is not in the catalog.
400 unsupported_operationThe model does not support embeddings. You may have sent an embeddings request to a chat model.
429 rate_limit_errorThe API key's request limit was exceeded.
400/502 provider_errorThe provider itself rejected or failed to complete the request. For example, sending dimensions to a fixed-size model comes back as 400; a provider-side error or outage comes back as 502.
503 model_unavailableThe model is temporarily unavailable. Nothing in your request needs to change; retry later.

See Errors for the error format.