Count Tokens
Updated: Nov 11, 2026
POST
Counts the input tokens of a request without generating a response. No task is created and no charge is incurred. The response does not include X-Vod-Task-Id.
See API Guide - Authentication.
See API Guide - Common Request Headers.
| Header | Required | Description |
|---|---|---|
anthropic-version | No | Anthropic API version. The official Anthropic SDK sends it automatically. |
application/json- body
model*stringModel ID, e.g. deepseek-v4-flash.
messages*array<>List of conversation messages; each item has role and content.
system?|array<>System prompt, passed separately from messages.
tools?array<>Tool definitions.
tool_choice?Tool choice strategy.
thinking?Thinking / reasoning configuration.
Successful response
application/json- response
input_tokens?integerNumber of input tokens in the request.
curl -X POST 'https://api.cysuo.com/v1/messages/count_tokens' \ -H 'Content-Type: application/json' \ -d '{ "model": "deepseek-v4-flash", "messages": [ { "role": "user", "content": "Hello, please introduce yourself." } ]}'Example Response200
{ "input_tokens": 0}