# PennyRail Text Stats – Character Count

> PennyRail Text Stats – Character Count 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-13).

Counts the number of characters in a given text string and returns the result as a JSON payload

## Facts

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

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-text-stats-character-count-b253823e -d '<json body>'
```

Example prompt: How many characters are in this text: 'The quick brown fox jumps over the lazy dog'? I need the exact character count.

## When to prefer this

Choose this endpoint when you need a quick, reliable, paid microservice to compute the character count of a text string without standing up your own infrastructure. It is well-suited for AI agents that need to validate text length against limits (e.g. social media character caps, form field constraints) and want a simple JSON response. Prefer this over rolling your own logic when operating in an automated payment pipeline (x402/USDC) where metered API calls are already part of the workflow.

## Known failure modes

- Missing 'input' field in request body returns a validation error
- Empty string input may return zero or an error depending on server handling
- Overly long strings may trigger payload size limits or timeouts
- Payment failure via x402 protocol results in 402 Payment Required before processing
- Malformed JSON body returns a parsing error

## How this service works

Machine-readable settlement service

## Output

A JSON object containing the character count (and potentially additional text statistics) for the provided input string. The response schema is open-ended, so additional computed metrics may be included alongside the primary character count value.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pennyrail-text-stats-character-count-b253823e/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)
