# PennyRail Hex Encoder (Text to Hex)

> PennyRail Hex Encoder (Text to Hex) 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-15).

Encodes a plain text string into its hexadecimal representation

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/p/nano/encoding.hex-encode--text-to-hex
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pennyrail-hex-encoder-text-to-hex-bf5453a9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8GDvmP_vQQ9bMAmx_wDcw

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-hex-encoder-text-to-hex-bf5453a9 -d '<json body>'
```

Example prompt: Can you hex-encode the text 'Hello, World!' for me? I need the hexadecimal representation of that string.

## When to prefer this

Choose this endpoint when you need a simple, reliable, pay-per-call text-to-hex encoding service without setting up local utilities. It is ideal for AI agents operating in environments without native encoding libraries, or when you need a consistent API-based encoding step in an automated pipeline. At $0.001 USDC per call it is cost-effective for occasional encoding needs.

## Known failure modes

- Missing or empty 'input' field returns a validation error
- Non-string input may be rejected or produce unexpected output
- Very long strings may hit payload size limits
- Service unavailability returns HTTP 402 or 5xx if payment or server issues occur
- Malformed JSON request body returns a 400-level error

## How this service works

Machine-readable settlement service

## Output

Returns a JSON object containing the hexadecimal-encoded version of the input text string, where each character is represented by its corresponding two-digit hex byte sequence.

## 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-hex-encoder-text-to-hex-bf5453a9/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)
