# PennyRail Text Truncate / Shorten to Characters

> PennyRail Text Truncate / Shorten to Characters 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).

Truncates or shortens a text string to a specified character length

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/p/nano/text.truncate--shorten-to-characters
- 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-truncate-shorten-to-characters-6a2a3559
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rsHsRfII09haYuqEsHhsZ

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-truncate-shorten-to-characters-6a2a3559 -d '<json body>'
```

Example prompt: Can you shorten this product description to 150 characters: 'Our handcrafted artisan coffee blends are sourced from the finest small-batch farms across Ethiopia, Colombia, and Guatemala, roasted fresh weekly to bring out complex, vibrant flavors'?

## When to prefer this

Choose this endpoint when you need a simple, reliable, pay-per-call text truncation operation without setting up your own string-processing logic. It is well-suited for agents that occasionally need to clip text to fit UI constraints, character limits, or storage schemas, and want a lightweight, stateless microservice rather than a full NLP pipeline.

## Known failure modes

- Missing or empty input text returns a validation error
- Character limit not provided or non-numeric causes a bad request
- Input object schema mismatch returns a 400 error
- Payment not included or insufficient results in a 402 Payment Required response
- Very large input strings may cause timeout or oversized payload errors

## How this service works

Machine-readable settlement service

## Output

Returns the input text truncated to the specified character count, likely with the shortened string as the primary output field, possibly including metadata such as original length and whether truncation occurred.

## 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-text-truncate-shorten-to-characters-6a2a3559/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)
