# Grokzilla Token Count

> Grokzilla Token Count is a paid API for AI agents from grokzilla.shop, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-15).

Counts the number of tokens in a given text payload, billed per call via x402/USDC micropayment rails.

## Facts

- Endpoint: POST https://grokzilla.shop/api/skills/token-count
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/grokzilla-token-count-63ac5dd2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-a_1mWMoq8GQ1AENxaMOB

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 grokzilla-token-count-63ac5dd2 -d '<json body>'
```

Example prompt: Count the number of tokens in this text: 'The quick brown fox jumps over the lazy dog. Large language models tokenize text differently than word counts suggest.'

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-use token counting service without subscribing to a full LLM provider SDK, especially useful for agents operating autonomously with USDC micropayment capabilities via x402 rails.

## Known failure modes

- Missing required 'input' field returns a validation error
- Invalid or missing 'type' or 'method' properties cause schema rejection
- Payment failure via x402 (402 response) blocks processing
- Malformed JSON body results in parse error
- Empty text body may return zero count or an error depending on implementation

## How this service works

Agent-ready microservices with x402 + Stripe rails, volume primitives, tutorials, and applet UI.

## Output

Returns a JSON object with an 'ok' boolean indicating success and the request path, along with the computed token count for the submitted text input.

## 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": {
    "body": {
     "type": "object"
    },
    "path": {
     "type": "string"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string"
    },
    "bodyType": {
     "type": "string"
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "path": "/api/skills/token-count"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/grokzilla-token-count-63ac5dd2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from grokzilla.shop](https://www.zero.xyz/host/grokzilla.shop/llms.txt)
