v1

latestOpenAPI 3.1.02026-08-04134182237.9 KB
Inference

Count Tokens Endpoint

Count tokens in text for cost estimation.

post/api/tokens/count

Request body

promptstring required

Text to count

modelstring nullable

Model for tokenizer

Response

Successful Response

tokensinteger required
modelstring nullable