Skip to main content
Embeddings turn text into fixed-length float vectors you can use for similarity search, clustering, and retrieval. The endpoint is OpenAI-shaped — point an OpenAI SDK at it and it works unchanged. The current embedding model is bge-m3 — multilingual, 1024-dim, 8K context.
encoding_format is optional and defaults to "float", matching OpenAI. Pass "base64" if you want the compact wire format. The one thing to avoid is sending an explicit null — pass a string or omit the field entirely.

Example

Batch inputs

Pass an array of strings to embed several at once. The response data[] order matches the input order.
Python

Response

With encoding_format: "base64", each embedding field is a base64-encoded byte string of little-endian float32 values instead of a JSON array of numbers. Decode with your language’s base64 + struct/buffer helpers.

Billing

Embeddings bill per input token only. On GET /v1/models the model’s pricing.prompt is the per-token input rate and pricing.completion is "0" — an embedding call returns a vector, not generated tokens, so there is nothing to charge on the way out. See billing for how that becomes a charge.

See also