---
title: "Create embeddings"
method: POST
path: "/v1/embeddings"
tags: ["inference"]
---

# Create embeddings

`POST /v1/embeddings`

Creates a model response for the given text.

## Query parameters

- `ai_project_id` string, nullable — current project ID

## Request body

- EmbeddingRequest
  - `model` string, required — ID of the model to use.
  - `input` union, required — Input text to embed, encoded as a string or array of tokens.
    - string
    - integer[]
    - string[]
    - array[]
      - integer[]
  - `encoding_format` string, nullable — The format to return the embeddings in. Can be either float or base64.
  - `user` string, nullable — A unique identifier representing your end-user.
  - `service_tier` 'auto' | 'default' | 'over-limit' | 'flex' | 'no-limit' — Represents the service tier for requests. Attributes: Auto: Automatically choose the best available tier for the request (Default or OverLimit). Analyze response to determine which tier was used. Default: Return 429 errors on hitting the rate limit, do not exceed to the OverLimit tier. OverLimit: Indicate that the request was over the user limit. This tier cannot be set by user in the request, but us used in a response for tier=Auto. Flex: Do not consume rate-limit credits, but run with lower priority. May still result in 429 errors in case of if there is no resources to process.
  - `dimensions` integer, nullable — The dimensions to use for the request.

## Response `200`

OK

- EmbeddingResponse
  - `object` string, required — always 'list'.
  - `model` string, required — The model used for the embedding.
  - `usage` Usage, required
    - `completion_tokens` integer, required — Number of tokens in the generated completion.
    - `prompt_tokens` integer, required — Number of tokens in the prompt.
    - `total_tokens` integer, required — Total number of tokens used in the request (prompt + completion).
    - `prompt_tokens_details` PromptTokensDetails
      - `cached_tokens` integer, nullable
    - `completion_tokens_details` CompletionTokensDetails
      - `reasoning_tokens` integer, nullable
  - `data` Embedding[], required — List of Embedding objects
    - `object` string, required — Always 'embedding'.
    - `embedding` union, required — The embedding vector.
      - number[]
      - string
    - `index` integer, required — index of embedding
  - `service_tier` 'auto' | 'default' | 'over-limit' | 'flex' | 'no-limit', required — Represents the service tier for requests. Attributes: Auto: Automatically choose the best available tier for the request (Default or OverLimit). Analyze response to determine which tier was used. Default: Return 429 errors on hitting the rate limit, do not exceed to the OverLimit tier. OverLimit: Indicate that the request was over the user limit. This tier cannot be set by user in the request, but us used in a response for tier=Auto. Flex: Do not consume rate-limit credits, but run with lower priority. May still result in 429 errors in case of if there is no resources to process.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/nebius/apis/nebius-openai-compatible-inference-api.md) · [All operations](https://skmtc.net/nebius/apis/nebius-openai-compatible-inference-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nebius/nebius-openai-compatible-inference-api/versions/0fb323abba3c/schema)
