Tokens
Count tokens
Estimate text tokens locally without a provider call. Requires model, accepts optional messages and system. Counts plain content strings and type:text blocks only. Images, tool definitions, non-text blocks and message framing overhead are not counted; this is not a provider billing estimate. Tokenizer selection uses the configured provider model name unless explicitly overridden.
post/v1/count_tokens
Request
- Base URL: https://edgee.io
- URL: https://edgee.io/v1/count_tokens
- Auth: one of:
- HTTP bearer
- API key in header x-api-key
Request body
Example request
{
"model": "openai/gpt-5.2"
}Response
Token count estimated successfully
Example response
{
"input_tokens": 42
}Changes
No recorded changes to this operation across all 1 revision of this API.