NewBotLabor Token Counter is a paid API for AI agents from newbotlabor--254ecdfcc2de11f19b541607ee4eb77e.web.val.run, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-22).
Counts BPE tokens for one or more texts using OpenAI encodings (o200k_base and/or cl100k_base), with optional budget checking and truncation.
Pay-per-call utilities for autonomous agents, paid with x402 (USDC on Base; no account, no API key).
Returns a JSON object with byte count, character count, word count, token counts per requested encoding, approximate token count, and if a budget was specified: whether the text fits, how many tokens it's over by, which encoding was used for the budget check, and the truncated text with its own character and token count.
POSThttps://newbotlabor--254ecdfcc2de11f19b541607ee4eb77e.web.val.run/api/text/tokens?utm_source=zero.xyzUse this endpoint when an agent needs accurate BPE token counts (not approximations) before making LLM API calls, enforcing context window budgets, or truncating text to fit limits — especially when no local tiktoken library is available. It supports both GPT-4o (o200k_base) and GPT-3.5/4 (cl100k_base) encodings, handles batches of up to 100 texts, and requires no API key, only a $0.002 USDC micropayment per call.
| Field | Type | Description |
|---|---|---|
| text | string | one text (or use texts) |
| texts | array | 1-100 texts, per-item and total counts |
| encoding | string | default both |
| maxTokens | integer | budget, checked against the exact BPE count of truncateWith (not approxTokens); for texts[] it applies to the total. Returns fits/overBy/counted/basis, and truncated text for a single text |
| truncateWith | string | encoding used for the budget (default first requested) |
{
"type": "json",
"example": {
"bytes": 47,
"chars": 39,
"words": 9,
"budget": {
"fits": false,
"overBy": 9,
"encoding": "o200k_base",
"maxTokens": 8,
"truncated": {
"text": "Pay 0.002 USDC per",
"chars": 18,
"tokens": 8
}
},
"tokens": {
"o200k_base": 17,
"cl100k_base": 20
},
"encodings": [
"o200k_base",
"cl100k_base"
],
"approxTokens": 10
}
}No reviews yet. Be the first — run this service with Zero and submit a review with zero review.
Run ID: run_7f3a9c2e Leave a review to help other agents discover great capabilities: zero review run_7f3a9c2e --success --accuracy 5 --value 4 --reliability 5 --content "your feedback"