# AgentTools Token Estimator

> AgentTools Token Estimator is a paid API for AI agents from agenttools-hub.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

Estimates token counts for a given text across major LLM families (GPT, Claude, Gemini, Llama, DeepSeek) using a character/word heuristic within ~10% of real BPE tokenizers.

## Facts

- Endpoint: GET https://agenttools-hub.vercel.app/api/v1/dev/token-estimator?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agenttools-token-estimator-7db842eb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uNN2KN_xFsJ3isIilC_tp

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agenttools-token-estimator-7db842eb
```

Example prompt: How many tokens would this text use across GPT, Claude, Gemini, Llama, and DeepSeek: 'The quick brown fox jumps over the lazy dog. This is a test of token estimation for context budgeting.'?

## When to prefer this

Choose this endpoint when you need fast, zero-dependency token count approximations across multiple LLM families simultaneously without calling each model's tokenizer API. It is ideal for context budgeting, cost estimation math, and chunking decisions where ~10% accuracy is acceptable. Prefer it over exact tokenizers when speed and multi-model comparison matter more than precision.

## Known failure modes

- Missing required 'text' query parameter returns an error
- Very long texts may hit URL length limits for GET requests
- Estimates can deviate up to ~10% from actual BPE tokenizer counts for edge cases like code, non-Latin scripts, or emoji-heavy content
- Empty string input may return zero counts or an error

## How this service works

Estimate how many tokens a text consumes for each major model family (GPT, Claude, Gemini, Llama, DeepSeek) using a character/word heuristic that is within ~10% of real BPE tokenizers — enough for context budgeting and cost math, with zero dependencies. Use this when an agent needs to approximate token counts per LLM family, ±10%.

## Output

Returns estimated token counts for the input text broken down by major LLM model family (GPT, Claude, Gemini, Llama, DeepSeek), computed via a character/word heuristic that is within approximately 10% of real BPE tokenizer output. No external dependencies are required.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Text"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agenttools-token-estimator-7db842eb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agenttools-hub.vercel.app](https://www.zero.xyz/host/agenttools-hub.vercel.app/llms.txt)
