# PennyRail HTML Entity Encoder

> PennyRail HTML Entity Encoder 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).

Encodes a text string into HTML entities, escaping special characters for safe embedding in HTML documents

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/p/nano/text.html-entities--html-entity-encode
- 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-html-entity-encoder-f1c5f40e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eOQ2qszBfTIENdb18dxgG

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-html-entity-encoder-f1c5f40e -d '<json body>'
```

Example prompt: Can you HTML-entity-encode this string for me so it's safe to drop into an HTML page: '<script>alert("hello & world")</script>'?

## When to prefer this

Use this endpoint when you need a quick, pay-per-use HTML entity encoding operation without setting up a local library, or when running in an environment where text processing libraries are unavailable. Ideal for agents that occasionally need to sanitize strings for HTML output without bundling a full encoding dependency.

## Known failure modes

- Missing or empty 'input' object returns a validation error
- Non-string text values in input may cause encoding errors or unexpected output
- Network or payment failure may result in HTTP 402 or 5xx response
- Overly large input strings may be rejected or truncated

## How this service works

Machine-readable settlement service

## Output

Returns an object containing the HTML-entity-encoded version of the input text, with special characters such as <, >, &, ", and ' replaced by their corresponding HTML entity codes (e.g., &lt;, &gt;, &amp;, &quot;, &#39;).

## 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-html-entity-encoder-f1c5f40e/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)
