Skip to main content

Endpoint

Drop-in compatible with the OpenAI Embeddings API. Point your existing OpenAI client at https://routerbase.com/v1 with your RouterBase API key.

Request Headers

Request Body

string
required
Embedding model ID, e.g. openai/text-embedding-3-large. See the live Models API for the full list.
string | array
required
Text to embed. A single string, or an array of strings to embed in one request.
integer
Truncate the output vector to this many dimensions (supported by text-embedding-3-*). Defaults to the model’s native size.
string
"float" (default) returns an array of numbers; "base64" returns a base64-encoded vector.

Response

array
One embedding object per input, in request order. index matches the position in the input array.
object
prompt_tokens and total_tokens for the request. Embeddings have no output tokens; billing is on input tokens only.

Billing

Charged per input token at the model’s input rate (no output tokens). See the pricing page or the Models API for current rates.