---
title: "Openai Embeddings"
method: POST
path: "/v1/embeddings"
tags: ["Embeddings"]
---

# Openai Embeddings

`POST /v1/embeddings`

## Headers

- `x-deepinfra-source` string, nullable
- `user-agent` string, nullable
- `xi-api-key` string, nullable
- `x-api-key` string, nullable

## Request body

- OpenAIEmbeddingsIn
  - `service_tier` 'default' | 'priority' | 'flex'
  - `fail_fast` boolean — If true, the request is rejected immediately with HTTP 429 when the model has no spare capacity, instead of waiting in the queue. Opt-in; the default (false) keeps standard queueing behavior.
  - `model` string, required — model name
  - `input` union, required — text or multimodal content to embed. Each item is either a string, or a list of content parts ({"type":"text"} / {"type":"image_url"}) for multimodal embedding models such as nvidia/llama-nemotron-embed-vl-1b-v2.
    - string
    - union[]
      - union
        - string
        - union[]
          - union
            - ChatCompletionContentPartText
              - …
            - ChatCompletionContentPartImage
              - …
  - `input_type` 'query' | 'passage' | 'document', nullable — Role hint for asymmetric retrieval models: 'query' embeds a search query, 'passage'/'document' embeds a document. Controls the query:/passage: prefix on VL embedding models; ignored by symmetric models.
  - `encoding_format` 'float' | 'base64' — format used when encoding
  - `dimensions` integer, nullable — The number of dimensions in the embedding. If not provided, the model's default will be used.If provided bigger than model's default, the embedding will be padded with zeros.

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/deepinfra/apis/deepinfra-api.md) · [All operations](https://skmtc.net/deepinfra/apis/deepinfra-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deepinfra/deepinfra-api/versions/51b817b3f80f/schema)
