Skip to main content
DeepInfra supports the OpenAI embeddings API for all embedding models. The endpoint is:

Example

Batch embeddings

Pass an array as input to embed multiple texts in a single request:
Large batches compress well. Gzip the request body and set Content-Encoding: gzip to upload a fraction of the bytes. See Request Compression for cURL and OpenAI SDK examples.

Image inputs

Multimodal embedding models such as nvidia/Nemotron-3.5-Embed-1B-BF16 and nvidia/Nemotron-3.5-Embed-8B-BF16 embed images, for example screenshots of document pages, into the same vector space as text. To embed an image, pass an input item as a list of content parts instead of a string. The parts of one item are embedded together, so a page image and its extracted text produce a single embedding. These are asymmetric retrieval models: set input_type to document for the pages you index and to query for search queries.
The Nemotron-3.5-Embed models take at most one image per item.

Image tokens

The response reports the tokens of the items that contain an image as image_tokens:
prompt_tokens is the total. image_tokens is the part billed at the model’s image-token price, and the rest is billed at its regular input price. Text-only items (the first item above) bill at the input price. Text inside an item that also contains an image (the third item) counts as image tokens. Prices are listed on each model’s page. For the Nemotron-3.5-Embed models, an image is scaled so that its longest edge is at most 1120 px (smaller images are not scaled up) and split into a grid of 28 px tiles. It costs rows × columns + rows tokens:

Supported parameters

Available models

Browse all embedding models — includes Qwen3 Embedding, BAAI/bge, sentence-transformers, and more.