v1

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

Tokenize inputs

post/tokenize

Request body

add_special_tokensboolean
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.

Example request

{
  "prompt_name": "null"
}

Response

Tokenized ids

Example response

[
  [
    {
      "id": 0,
      "special": false,
      "start": 0,
      "stop": 2,
      "text": "test"
    }
  ]
]