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.
Models
Section titled “Models”| Model | Context | Output size | Price ($/1M tokens) |
|---|---|---|---|
openai/text-embedding-3-large | 8,192 | up to 3072 (variable) | 0.13 |
openai/text-embedding-3-small | 8,192 | up to 1536 (variable) | 0.02 |
openai/text-embedding-ada-002 | 8,192 | 1536 (fixed) | 0.10 |
voyageai/voyage-4-large | 32,000 | 256/512/1024/2048 | 0.12 |
voyageai/voyage-4 | 32,000 | 256/512/1024/2048 | 0.06 |
voyageai/voyage-4-lite | 32,000 | 256/512/1024/2048 | 0.02 |
voyageai/voyage-code-4 | 32,000 | 256/512/1024/2048 | 0.12 |
voyageai/voyage-code-3 | 32,000 | 256/512/1024/2048 | 0.18 |
voyageai/voyage-finance-2 | 32,000 | 1024 (fixed) | 0.12 |
voyageai/voyage-law-2 | 16,000 | 1024 (fixed) | 0.12 |
voyageai/voyage-context-4 | 32,000 | 256/512/1024/2048 | 0.18 |
perplexity/pplx-embed-v1-0.6b | 32,000 | 1024 (fixed) | 0.004 |
perplexity/pplx-embed-v1-4b | 32,000 | 2560 (fixed) | 0.03 |
perplexity/pplx-embed-context-v1-0.6b | 32,000 | 1024 (fixed) | 0.008 |
perplexity/pplx-embed-context-v1-4b | 32,000 | 2560 (fixed) | 0.05 |
llmtr/embeddinggemma-300m | 2,048 | 768 (fixed) | 0.10 |
liquid/lfm-2.5-embedding-350m-free | 512 | 1024 (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:
curl -s "$LLMTR_BASE_URL/v1/models" \ | jq -r '.data[] | select(.supported_operations[] == "EMBEDDINGS").id'Request
Section titled “Request”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"]}| Field | Required | Description |
|---|---|---|
model | Yes | The embedding model's identifier. |
input | Yes | A single string or an array of strings. |
dimensions | No | Only 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. |
Response
Section titled “Response”{ "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.
Billing
Section titled “Billing”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.
Choosing a model
Section titled “Choosing a model”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.
Errors
Section titled “Errors”| Status | Meaning |
|---|---|
400 invalid_request | input or model is missing/invalid — the request was rejected by the gateway's own schema validation. |
404 model_not_found | The model id is not in the catalog. |
400 unsupported_operation | The model does not support embeddings. You may have sent an embeddings request to a chat model. |
429 rate_limit_error | The API key's request limit was exceeded. |
400/502 provider_error | The 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_unavailable | The model is temporarily unavailable. Nothing in your request needs to change; retry later. |
See Errors for the error format.