# Vextorium Token Counter

> Vextorium Token Counter is a paid API for AI agents from api.vextorium.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-11).

Counts tokens in text using OpenAI tokenizers (o200k_base for GPT-4o/4.1/5, cl100k_base for GPT-4/3.5) and provides approximate token counts for Claude, Llama 3, and Gemini, plus characters-per-token ratio.

## Facts

- Endpoint: POST https://api.vextorium.com/contar-tokens-pago?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/vextorium-token-counter-344dfb3f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_R1iK7epslqPt6BDdTq5r0

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 vextorium-token-counter-344dfb3f -d '<json body>'
```

Example prompt: How many tokens is this text using the o200k_base tokenizer (GPT-4o), and give me estimates for Claude, Gemini, and Llama 3 too: 'The quick brown fox jumps over the lazy dog. This is a sample sentence to test tokenization across different language models.'

## When to prefer this

Choose this endpoint when you need precise OpenAI token counts (o200k or cl100k) combined with cross-model estimates for Claude, Gemini, and Llama 3 in a single call. Ideal for LLM cost budgeting, context window management, and multi-model planning without setting up tiktoken locally. Prefer this over building your own tokenizer when running in an agent or serverless environment without Python dependencies.

## Known failure modes

- Missing 'texto' field in body returns a validation error
- Invalid 'modelo' enum value returns a schema error
- Empty string input may return zero counts
- Network timeout for very large text inputs
- Payment failure if USDC balance is insufficient for x402 micropayment

## How this service works

Count the tokens of a text with OpenAI tokenizers (o200k for GPT-4o/4.1/5, cl100k for GPT-4/3.5) plus estimates for Claude, Llama and Gemini, with characters per token. Budget LLM calls and split contexts.

## Output

Returns exact token count for the requested OpenAI tokenizer, approximate token counts for Claude, Gemini, and Llama 3, word count, character count, characters-per-token ratio, and the token count for the alternate OpenAI encoding (cl100k_base), along with a note clarifying that non-OpenAI counts are estimates.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "texto"
     ],
     "properties": {
      "texto": {
       "type": "string"
      },
      "modelo": {
       "enum": [
        "o200k_base",
        "cl100k_base"
       ],
       "type": "string"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": [
      "object",
      "null"
     ],
     "properties": {
      "nota": {
       "type": [
        "string",
        "null"
       ]
      },
      "tokens": {
       "type": [
        "number",
        "null"
       ]
      },
      "palabras": {
       "type": [
        "number",
        "null"
       ]
      },
      "caracteres": {
       "type": [
        "number",
        "null"
       ]
      },
      "codificacion": {
       "type": [
        "string",
        "null"
       ]
      },
      "estimaciones": {
       "type": [
        "object",
        "null"
       ],
       "properties": {
        "claude_aprox": {
         "type": [
          "number",
          "null"
         ]
        },
        "gemini_aprox": {
         "type": [
          "number",
          "null"
         ]
        },
        "llama3_aprox": {
         "type": [
          "number",
          "null"
         ]
        }
       }
      },
      "caracteres_por_token": {
       "type": [
        "number",
        "null"
       ]
      },
      "tokens_otra_codificacion": {
       "type": [
        "object",
        "null"
       ],
       "properties": {
        "cl100k_base": {
         "type": [
          "number",
          "null"
         ]
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "nota": "Recuento exacto para las codificaciones de OpenAI; el resto son estimaciones (cada modelo tokeniza distinto).",
  "tokens": 53,
  "palabras": 40,
  "caracteres": 282,
  "codificacion": "o200k_base",
  "estimaciones": {
   "claude_aprox": 58,
   "gemini_aprox": 50,
   "llama3_aprox": 54
  },
  "caracteres_por_token": 5.32,
  "tokens_otra_codificacion": {
   "cl100k_base": 56
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/vextorium-token-counter-344dfb3f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.vextorium.com](https://www.zero.xyz/host/api.vextorium.com/llms.txt)
