Tokenize helper
Estimate token usage before sending a request.
Endpoint
POST /api/v1/tokenize
Provide the same high-level inputs you would send to chat endpoints.
curl -X POST "https://api.kushrouter.com/api/v1/tokenize" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-mini-2025-08-07",
"messages": [
{ "role": "user", "content": "Draft a customer onboarding email." }
]
}'Example response
{ "success": true, "model": "gpt-5-mini-2025-08-07", "tokens": 56 }Notes
- Works with OpenAI and Anthropic style messages.
- Subject to rate limit; may return HTTP 429.