Skip to main content

Switching from OpenAI

Change the base URL and the model id. Nothing else.

Which model

Start with embeddinggemma-300m. It is the cheaper of the two by 5×, and 768 dimensions is enough for most retrieval — smaller vectors are also cheaper to store and faster to search. Reach for qwen3-embedding-8b when recall quality matters more than cost, when your corpus is multilingual, or when documents are long enough that a 2,048-token window would force you to chunk them.
Embedding and chat models are not interchangeable. Passing a chat model here returns 400 naming the mistake rather than a vector you cannot use.

Billing

Input tokens only. A vector has no completion side, so usage carries prompt_tokens, total_tokens and cost — and cost is the exact USD charged for that call.

Batching

Pass an array to input and you get one vector per element, in the same order. One request with 100 documents costs the same as 100 requests with one document each and is considerably faster — batch as large as your payload allows, up to 25 MB. Responses are not streamed: a vector arrives whole.