Container.Token

Tokenization

By giving a text input, generate a tokenized output of token IDs.

post/v1/tokenize

Request

Request body

modelstring nullable

Routes the request to a specific adapter.

promptstring required

Input text prompt to tokenize.

Example request

{
  "prompt": "What is generative AI?"
}

Response

Successfully tokenized the text.

tokensinteger[] required

A list of token IDs.

Changes

No recorded changes to this operation across all 1 revision of this API.