POST https://api.voidai.app/v1/messages/count_tokens
Requires authentication. Send model and messages; optional context includes system, tools, tool_choice, and thinking. A max_tokens output limit is not required for this operation. A successful count does not establish that your account can run inference with the model.
input_tokens, a number. This endpoint is not billed. A native provider count is used when available; availability failures can fall back to a local estimate. Invalid provider request shapes can still return an error. Treat the result as an estimate when planning a later generation, not a guarantee of its final charge.
See Messages for access and usage checks, and billing for cache accounting.