# PennyRail Text Truncate

> PennyRail Text Truncate 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 a string of text to a specified maximum length and returns the shortened result

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/f/text.truncate
- 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-624018d6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_V-ujHf8hyKgDKLslHzKNk

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-624018d6 -d '<json body>'
```

Example prompt: Truncate this product description to a maximum of 150 characters: 'Our handcrafted leather wallets are made from full-grain cowhide sourced from sustainable farms in Argentina, stitched by hand in our Brooklyn workshop.'

## When to prefer this

Choose this endpoint when you need a simple, pay-per-call text truncation operation without deploying your own string-processing logic — particularly useful in agent pipelines where text fields must conform to strict length constraints before being passed to downstream APIs or UI components. It is ideal for lightweight, one-off truncation tasks billed at $0.001 USDC via the x402 payment protocol.

## Known failure modes

- Missing 'input' object in request body returns a validation error
- Missing 'text' or 'max' sub-fields within the input object may cause a processing error or unexpected output
- Non-numeric 'max' value may result in an error or undefined behavior
- Empty text string may return an empty result or a no-op
- Service unavailable if the Vercel deployment is down or cold-starting

## How this service works

Machine-readable settlement service

## Output

Returns a JSON object with an 'operation' field (string indicating the operation performed, e.g. 'text.truncate') and a 'result' field containing the truncated text string clipped to the specified maximum length.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "operation",
  "result"
 ],
 "properties": {
  "result": {},
  "operation": {
   "type": "string"
  }
 },
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pennyrail-text-truncate-624018d6/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)
