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

Changes