LiteLLM Integration
Tokenize text (LiteLLM - Cohere format)
Tokenizes text using Cohere-compatible format via LiteLLM.
AuthorizationBearer <token>
Bearer token authentication. Use your MPilot virtual-key JWT or admin JWT.
Virtual keys (prefixed with sk-bf-) can also be passed here.
In: header
modelstring
Model whose tokenizer should be used
textstring
Text to tokenize (1-65536 characters)
Length
1 <= length <= 65536Response Body
curl -X POST "https://loading/{AI_GATEWAY_URL}/litellm/cohere/v1/tokenize" \ -H "Content-Type: application/json" \ -d '{ "model": "command-r-plus", "text": "string" }'{
"tokens": [
0
],
"token_strings": [
"string"
],
"meta": {
"api_version": {
"version": "string"
}
}
}{
"type": "string",
"message": "string",
"code": "string"
}{
"type": "string",
"message": "string",
"code": "string"
}