v1

latestOpenAPI 3.0.3Apache 2.02026-07-17124145.8 KB
Text Embeddings Inference

Get Embeddings. Returns a 424 status code if the model is not an embedding model.

post/embed

Request body

normalizeboolean
prompt_namestring nullable

The name of the prompt that should be used by for encoding. If not set, no prompt will be applied.

Must be a key in the sentence-transformers configuration prompts dictionary.

For example if prompt_name is "query" and the prompts is {"query": "query: ", ...}, then the sentence "What is the capital of France?" will be encoded as "query: What is the capital of France?" because the prompt text will be prepended before any text to encode.

truncateboolean nullable
truncation_direction'Left' | 'Right'

Example request

{
  "prompt_name": "null"
}

Response

Embeddings

number[] required

Example response

[
  [
    0,
    1,
    2
  ]
]