Skip to main content
POST
Omit the Authorization header for anonymous access. Per-tier quotas are on Rate Limits. This route shares those quotas with chat completions. Model ids are on Models.

Request parameters

Each model lists the extra fields it reads in supported_parameters on GET /openai/models.

Text input

Multimodal input

qwen/qwen3-vl-embedding-2b accepts one image_url part and one video_url part per input. It reads 8 frames sampled from the video. google/embeddinggemma-2 accepts image_url and video_url parts. Its own processor samples the video. video_fps and video_max_frames set its sampling. Image and video vectors share the text vector space. google/embeddinggemma-2 also accepts audio_url, input_audio, and document_url parts. The model reads at most the first 30 seconds of each audio part. A PDF’s pages pool into one vector. All parts in one input share one 8,192-token window. An input past the window is a 400 that names it. Nothing is truncated. Check capabilities.supported_input_types on GET /openai/models before using a modality. Not every embedding model accepts images or video.

Task prefixes and dimensions

google/embeddinggemma-2 is trained with a short prefix on text inputs. Set it with prompt_name. Unset, or none, adds no prefix, so the vectors match the same model run elsewhere with no prompt. A wrong prefix still returns a vector, at lower precision. An unknown name is a 400. dimensions takes 768, 512, 256, or 128. The shorter vector is re-normalized. Queries and documents must share one value.
200

Billing

A 200 debits your organization by usage.cost. The cost is usage.prompt_tokens multiplied by the model’s prompt price per 1M tokens, rounded to six decimals. usage.prompt_tokens counts every token the model read, media included. On google/embeddinggemma-2, an image or a PDF page reads 220 to 268 tokens and a video frame 78 to 133, by aspect ratio. For example, 1,000 images at 268 tokens each are 268,000 tokens, which is about $0.0048. A short text input on qwen/qwen3-vl-embedding-2b can show "cost": 0.0, as in the first example. Prices per model are on Models. A free-plan organization with a negative balance, or an organization with an overdue payment, gets a 402, as on chat completions. Calls without an API key count toward the same daily anonymous spend cap as chat.

Models

Available embedding models.

Supported Inputs

Content part types shared across chat and embeddings.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

OpenAI-compatible embeddings request.

The input field is intentionally polymorphic to match both OpenAI's API (string / list-of-strings / list-of-token-ids) and vLLM's multimodal extension (list of content parts). The router normalises everything to a list of items before handing it to the backend, so individual backends only see one shape.

model
string
required
input
required
encoding_format
enum<string>
default:float
Available options:
float,
base64
dimensions
integer | null
user
string | null
prompt_name
string | null
video_fps
number | null
Required range: x > 0
video_max_frames
integer | null
Required range: x > 0
document_pages
any[] | null
document_max_pages
integer | null
truncate_prompt_tokens
integer | null

Response

Successful Response

OpenAI-compatible embeddings response with audit extras (served_model_id and backend).

model
string
required
data
EmbeddingData · object[]
required
id
string
object
string
default:list
Allowed value: "list"
created
integer
served_model_id
string | null
backend
string | null
usage
EmbeddingUsage · object