# PennyRail Text Stats – Line Count

> PennyRail Text Stats – Line 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-14).

Counts the number of lines in a given text string and returns the line count as structured data.

## Facts

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

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-line-count-7ff8b4cd -d '<json body>'
```

Example prompt: Count how many lines are in this text: 'Hello world\nThis is line two\nAnd this is line three'

## When to prefer this

Choose this endpoint when you need a quick, cheap, pay-per-call line count for arbitrary text strings without managing your own parsing logic. It is especially useful in agent pipelines that process variable text blobs and need reliable line counts as a computational step without spinning up infrastructure.

## Known failure modes

- Missing 'input' field returns a validation error
- Empty string may return zero or an error depending on service behavior
- Very large text inputs may time out or be rejected
- Network or payment settlement failure returns HTTP 402 or 5xx

## How this service works

Machine-readable settlement service

## Output

A JSON object containing the computed line count (and potentially related text statistics) for the provided input 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-line-count-7ff8b4cd/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)
