curl --request POST \
--url https://api.lighton.ai/api/v2/tokenize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "alfred-4.2"
}
'{
"total_tokens": 123,
"request_model": "<string>",
"model_used": "<string>",
"tokenizer_type": "<string>",
"id": "<string>",
"model": "<string>"
}Models
Create text tokens
deprecated
Deprecated — this endpoint will be removed in a future release.
This endpoint can be used to convert strings into tokens.
It is a simple proxy forwarding your requests to the desired model.
Any LightOn model is deployed on a vLLM-based image.
Supported Input:
prompt: Simple text string to tokenizemessages: Array of chat messages to tokenize (alternative to prompt)
POST
/
api
/
v2
/
tokenize
curl --request POST \
--url https://api.lighton.ai/api/v2/tokenize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "alfred-4.2"
}
'{
"total_tokens": 123,
"request_model": "<string>",
"model_used": "<string>",
"tokenizer_type": "<string>",
"id": "<string>",
"model": "<string>"
}Authorizations
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
200 - application/json
Response serializer for tokenize endpoint results.