# PennyRail Token Count (Proven)

> PennyRail Token Count (Proven) is a paid API for AI agents from pennyrail.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Counts the number of tokens in a given text input using a verified, settlement-ready method accessible via micropayment

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/p/nano/text.token-count--proven-token-count
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pennyrail-token-count-proven-1f79663b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_afdXcgvUeYsbfP3HeXeFZ

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 pennyrail-token-count-proven-1f79663b -d '<json body>'
```

Example prompt: Can you count how many tokens are in this text: 'The quick brown fox jumps over the lazy dog, and the lazy dog didn't seem to mind at all.'

## When to prefer this

Choose this endpoint when you need a trustworthy, settlement-backed token count — particularly in contexts where verifiability or micropayment-gated auditability matters, such as billing verification, LLM pre-flight checks, or agentic pipelines where token usage needs to be independently confirmed rather than estimated client-side.

## Known failure modes

- Missing or malformed 'input' object returns a validation error
- Empty text input may return a zero count or an error
- Payment failure or insufficient USDC balance blocks the request
- Malformed JSON body results in a 400-level error
- Oversized input beyond service limits may be rejected

## How this service works

Machine-readable settlement service

## Output

Returns an object containing the verified token count for the submitted text input, indicating how many tokens the text resolves to under the tokenization scheme used by the service.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pennyrail-token-count-proven-1f79663b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pennyrail.vercel.app](https://www.zero.xyz/host/pennyrail.vercel.app/llms.txt)
