latestOpenAPI 3.1.02026-08-19134182238.2 KB

823dcdb67c40

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