# PennyRail Text Stats / Text Metrics

> PennyRail Text Stats / Text Metrics 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).

Computes statistical and linguistic metrics (character count, word count, sentence count, readability scores, etc.) for a given input text string.

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/p/nano/text.stats--text-metrics
- 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-text-stats-text-metrics-c7ac96d7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DmZCRVo3RrvU7cxHTsUlx

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-text-metrics-c7ac96d7 -d '<json body>'
```

Example prompt: Can you run text stats on this article draft and tell me the word count, sentence count, and readability score? Here's the text: 'Artificial intelligence is transforming industries at an unprecedented pace. Companies large and small are racing to adopt machine learning tools.'

## When to prefer this

Choose this endpoint when you need a fast, pay-per-call text metrics computation without setting up your own NLP library or hosting infrastructure. Ideal for lightweight pipelines that need word counts, character counts, or readability scores on-demand with micro-payment billing via USDC.

## Known failure modes

- Empty or missing 'input' field returns a validation error
- Extremely large text inputs may time out or be truncated
- Non-string or null input values cause schema validation failure
- Ambiguous or malformed JSON request body returns 400-level error
- Paid endpoint — insufficient funds or missing x402 payment header returns 402 Payment Required

## How this service works

Machine-readable settlement service

## Output

Returns a JSON object containing text metrics such as word count, character count, sentence count, readability scores (e.g. Flesch-Kincaid), and potentially other linguistic statistics derived from the input text string.

## 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-text-metrics-c7ac96d7/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)
