# Hex Encode UTF-8 String

> Hex Encode UTF-8 String is a paid API for AI agents from x402render-u5vwpxpyua-uc.a.run.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Converts a UTF-8 text string into its hexadecimal representation

## Facts

- Endpoint: POST https://x402render-u5vwpxpyua-uc.a.run.app/hex-encode
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hex-encode-utf-8-string-a8ac2f02
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_n3qEzIK--zEadl8i2R7_4

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 hex-encode-utf-8-string-a8ac2f02 -d '<json body>'
```

Example prompt: Hex-encode the string 'Hello, World!' for me so I can use the hex bytes in my protocol implementation.

## When to prefer this

Use this endpoint when you need a simple, stateless hex encoding of a UTF-8 string via an API call, especially within an x402 payment-gated workflow or when you don't want to implement encoding locally. Prefer this over sibling endpoints when you specifically need hex (not Base64 or percent-encoding).

## Known failure modes

- Missing or empty 'text' field returns an error response
- Non-UTF-8 or malformed input may result in encoding errors
- Network timeout if Cloud Run instance is cold-starting
- Payment failure or insufficient USDC balance blocks the request

## How this service works

Hex-encode a UTF-8 string

## Output

Returns the hexadecimal encoding of the input UTF-8 string, where each character byte is represented as a two-character hex pair (e.g. 'Hi' becomes '4869').

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hex-encode-utf-8-string-a8ac2f02/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402render-u5vwpxpyua-uc.a.run.app](https://www.zero.xyz/host/x402render-u5vwpxpyua-uc.a.run.app/llms.txt)
