v1

latestOpenAPI 3.1.0Apache 2.02026-07-264001921002.3 KB
LiteLLM Integration

Tokenize text (LiteLLM - Cohere format)

Tokenizes text using Cohere-compatible format via LiteLLM.

post/litellm/cohere/v1/tokenize

Request body

modelstring required

Model whose tokenizer should be used

textstring required

Text to tokenize (1-65536 characters)

Example request

{
  "model": "command-r-plus"
}

Response

Successful response

tokensinteger[]

Token IDs

token_stringsstring[]

Token strings