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.

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,768 1024 (128-1024, multiples of 8) 0.004
perplexity/pplx-embed-v1-4b 32,768 2560 (128-2560, multiples of 8) 0.03
perplexity/pplx-embed-context-v1-0.6b 32,768 1024 (128-1024, multiples of 8) 0.008
perplexity/pplx-embed-context-v1-4b 32,768 2560 (128-2560, multiples of 8) 0.05
greenpt/green-embedding 32,000 2560 (fixed) 0.246305
greenpt/qwen3-embedding-8b 32,000 4096 (fixed) 0.307881
greenpt/bge-multilingual-gemma2 8,000 3584 (fixed) 0.135468
tensorx/qwen3-embedding-8b-tensorx 40,960 4096 (fixed) 0.02
llmtr/embeddingmagibu-200m 8,192 768 (512/256/128) 0.01

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. The Perplexity Embed v2 rows take both shapes; see their section at the end of this page.

liquid/lfm-2.5-embedding-350m-free was retired on 14 November 2026; requests for it are rejected with model_retired (HTTP 410). Use openai/text-embedding-3-small instead. The vectors are not compatible, so re-embed your whole index; send dimensions: 1024 to keep the same 1024-dimensional size.

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"]
}
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. llmtr/embeddingmagibu-200m accepts only 768, 512, 256 or 128; any other value returns 400 invalid_request listing the accepted values. The Perplexity v1 rows accept multiples of 8 from 128 up to the size in the table. The values the Perplexity Embed v2 rows accept are in their section.
prompt_name No llmtr/embeddingmagibu-200m only: says what kind of text you are sending (document, query, STS and others). Without it, document is used. Details are in the EmbeddingMagibu section at the end of this page.
input_type Yes on Perplexity Embed v2 query for search queries, document for everything you index. Required on the Perplexity Embed v2 rows; without it the request returns 400 invalid_request. Optional on the Cohere and Voyage rows.
num_chunks No Perplexity Embed v2 image requests only: splits each image into 1, 2, 4, 8, 16 or 32 regions and returns one vector per region.
{
"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.

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.
429 rate_limit_error (details.reason: "free_quota_exhausted") The account's daily allowance on a free model is used up; all of the account's keys count together, and the key's request limit has nothing to do with it. It renews at 00:00 Turkey time; wait for the Retry-After time in the response.
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.
503 model_busy The model cannot take a new request right now. Nothing in your request needs to change; wait for the Retry-After time in the response and send the same request again.

See Errors for the error format.

400 Bad Request: "embeddinggemma" does not support chat

Section titled “400 Bad Request: "embeddinggemma" does not support chat”

The error means EmbeddingGemma was sent to the chat endpoint; it is an embedding model, not a chat model, so the request returns 400 unsupported_operation. On LLMTR, llmtr/embeddinggemma-300m was retired on 14 October 2026; send llmtr/embeddingmagibu-200m, distilled from EmbeddingGemma for Turkish text, to POST /v1/embeddings instead. It accepts up to 8,192 tokens per text; it is free until 20 October 2026, 23:59 Turkey time, and then costs $0.01 per 1M input tokens.

400 Bad Request: embeddinggemma Does Not Support Chat

llmtr/embeddingmagibu-200m is an embedding model trained for Turkish text and hosted in Turkey. It returns normalized 768-dimensional vectors; because every vector has length 1, the dot product of two vectors equals their cosine similarity. The model is published as alibayram/embeddingmagibu-200m under the MIT licence.

The model does better when it knows what the text is. Say so with the prompt_name field:

prompt_name When
document Documents and chunks you add to an index. Used when the field is omitted.
query A user's search query.
STS Comparing how similar two texts are, on both sides.

Task names such as QuestionAnswering, FactChecking, Classification, Clustering and CodeRetrieval are accepted as well. An invalid value returns 400 invalid_request with the full list of accepted values. The input_type field is not read by this model; use prompt_name.

For search, embed documents with document and queries with query. Build an index with one model, the same prompt_name scheme and the same dimensions value; do not mix it with vectors created by another model.

Terminal window
curl "$LLMTR_BASE_URL/v1/embeddings" \
-H "Authorization: Bearer llmtr-your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "llmtr/embeddingmagibu-200m",
"input": ["Faturalar her ayın ilk iş günü kesilir.", "Ödeme sayfası kredi kartı kabul eder."],
"prompt_name": "document"
}'

With the OpenAI SDK, send prompt_name through extra_body:

from openai import OpenAI
client = OpenAI(base_url="https://llmtr.com/v1", api_key="llmtr-your_key")
docs = client.embeddings.create(
model="llmtr/embeddingmagibu-200m",
input=["Faturalar her ayın ilk iş günü kesilir.", "Ödeme sayfası kredi kartı kabul eder."],
extra_body={"prompt_name": "document"},
)
query = client.embeddings.create(
model="llmtr/embeddingmagibu-200m",
input="Fatura ne zaman kesilir?",
extra_body={"prompt_name": "query"},
)
q = query.data[0].embedding
scores = [sum(a * b for a, b in zip(q, d.embedding)) for d in docs.data]

Limits:

  • Up to 8,192 tokens per text. A longer text is not truncated; the request is rejected with 400 provider_error, so split the text into chunks.
  • Up to 256 texts and 16,384 tokens in total per request. More than 256 texts returns 400 invalid_request; a request over the token limit returns 400 provider_error.

For bulk indexing, split documents into chunks of 256 to 512 tokens and send requests one after another rather than in parallel. At busy times a request may return HTTP 503 with the model_busy type. Wait for the Retry-After time in the response and send the same request again. For large requests, set your client read timeout to at least 300 seconds.

Free period: the model is free until 20 October 2026, 23:59 Turkey time. During this period each account has a daily allowance of 500,000 input tokens, renewed every day at 00:00 Turkey time. Once the day's usage has reached it, further requests return HTTP 429; wait for the Retry-After time in the response. From 21 October, 00:00 Turkey time, it costs $0.01 per 1 million input tokens.

Text, images and both together: Cohere Embed 5

Section titled “Text, images and both together: Cohere Embed 5”

The Cohere Embed 5 models place text, images and inputs that combine both in one vector space on the same /v1/embeddings endpoint. Because they accept images, they are not in the text-only table above.

Model Context Output size Price ($/1M tokens)
cohere/embed-v5.0-pro 128,000 256/512/768/1024/1536/2048 0.12
cohere/embed-v5.0-fast 128,000 256/512/768/1024/1536/2048 0.08

The price in the table is for text tokens. Images are sent as base64 data URIs and billed at $0.40 per 1M image tokens on both models. Send document in input_type for documents and query for queries; without the field the input is embedded as a document. At most 96 inputs are accepted per request. The two models share one vector space: you can index a collection with Pro and send queries with Fast.

For request shapes, mixed-input examples and output types see Cohere Embed 5 and Rerank 5.

OpenAI's Python and Node SDKs add base64 to a request when you do not send encoding_format, and decode the text that comes back as float32. The rows on this page return the right vector under that default:

  • base64 returns the float32 bytes of a float vector. On the Voyage and Cohere rows, when output_dtype is int8, uint8, binary or ubinary, base64 is not applied; the vector comes back as a list of integers and the SDK uses it as it is.
  • The Perplexity embedding rows return each vector as base64-encoded signed int8 text when encoding_format is not sent; read the bytes as int8. encoding_format: "float" returns the same values as a list of numbers, and encoding_format: "base64" as float32 bytes. Perplexity's own base64_int8 and base64_binary values are accepted too.
  • On the rows that take nested input (voyageai/voyage-context-4, perplexity/pplx-embed-context-v1-0.6b, perplexity/pplx-embed-context-v1-4b) the SDK does not decode the nested response; send encoding_format: "float" on these rows when you use the OpenAI SDK. The same holds on the Perplexity Embed v2 rows for chunk lists and for image requests with num_chunks above 1.

Text, chunked documents and images: Perplexity Embed v2

Section titled “Text, chunked documents and images: Perplexity Embed v2”

The Perplexity Embed v2 models place search queries, documents, document chunks and images in one vector space on the same /v1/embeddings endpoint. Because they take images, they are not in the text-only table above.

Model Context Output size Price ($/1M tokens)
perplexity/pplx-embed-v2-context-0.6b 32,768 1024 (512) 0.02
perplexity/pplx-embed-v2-context-9b 32,768 2048 (1024) 0.12

The table price is for text tokens. Requests that carry images are billed per 1 million image tokens at $0.40 on 0.6B and $0.42 on 9B. An image's token count depends on its size and on the number of regions; the billed count is in the response's usage.prompt_tokens.

input_type is required. Send query for what a user types to search and document for everything you index; titles, summaries and FAQ entries are documents too, however short. Without the field the request returns 400 invalid_request. The same text gives different vectors as query and as document.

input takes one of these shapes:

input input_type Response
A string or an array of strings query or document One vector per text: data[i].embedding
An array of chunk lists, one list per document document One vector per chunk, embedded with the whole document as context: data[i].data[j].embedding
An array of image items document One vector per image: data[i].embedding
Image items with num_chunks above 1 document One vector per image region, top to bottom: data[i].data[j].embedding

Send chunks without overlap and in the order they appear in the document. A request holds either text or images; do not send both in one request.

Terminal window
curl "$LLMTR_BASE_URL/v1/embeddings" \
-H "Authorization: Bearer llmtr-your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "perplexity/pplx-embed-v2-context-0.6b",
"input_type": "document",
"input": [
["The first clause of the contract.", "The second clause refers to this rate."],
["The only chunk of another document."]
]
}'

Images go as {"type": "image", "image": "..."} items holding a base64 PNG, JPEG or WebP data URI. Image URLs, GIFs and animated images are not accepted. num_chunks (1, 2, 4, 8, 16 or 32) splits each image into regions from top to bottom, which can improve retrieval on text-heavy page screenshots. Small images may return fewer regions than requested. Search images with text queries sent with input_type: "query".

Terminal window
IMG_B64=$(base64 < page.png | tr -d '\n')
curl "$LLMTR_BASE_URL/v1/embeddings" \
-H "Authorization: Bearer llmtr-your_key" \
-H "Content-Type: application/json" \
-d @- <<EOF
{
"model": "perplexity/pplx-embed-v2-context-0.6b",
"input_type": "document",
"input": [{ "type": "image", "image": "data:image/png;base64,$IMG_B64" }],
"num_chunks": 4
}
EOF

For dimensions, perplexity/pplx-embed-v2-context-0.6b accepts 1024 or 512 and perplexity/pplx-embed-v2-context-9b accepts 2048 or 1024; any other value returns 400 invalid_request. The 9B model's 1024-dimensional output shares a space with the 0.6B model's 1024-dimensional output: you can index a collection with one model and send queries with the other.

Limits:

  • At most 32,768 tokens per text or document and 120,000 tokens per request. A request over either returns 400 provider_error; split the text or send a smaller request.
  • At most 512 texts or documents and 16,000 chunks in total per request.
  • At most 96 images and 20,000,000 characters of base64 data per request.
  • The shape rules and the limits other than tokens return 400 invalid_request with a message naming the field to fix.

Vectors are base64-encoded signed int8 text by default; see the section above for the encoding_format options. With the OpenAI SDK, send input_type and num_chunks through extra_body:

from openai import OpenAI
client = OpenAI(base_url="https://llmtr.com/v1", api_key="llmtr-your_key")
docs = client.embeddings.create(
model="perplexity/pplx-embed-v2-context-0.6b",
input=["Invoices are issued on the first business day of each month.", "The checkout page accepts credit cards."],
encoding_format="float",
extra_body={"input_type": "document"},
)
query = client.embeddings.create(
model="perplexity/pplx-embed-v2-context-0.6b",
input="When are invoices issued?",
encoding_format="float",
extra_body={"input_type": "query"},
)