# Hex Encoding of UTF-8 Text

> Hex Encoding of UTF-8 Text is a paid API for AI agents from twin.unykorn.org, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

Encodes a UTF-8 text string into its hexadecimal representation

## Facts

- Endpoint: POST https://twin.unykorn.org/encode-hex?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hex-encoding-of-utf-8-text-b8273b55
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hs-12FA917wZKrTUH5Lxc

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-encoding-of-utf-8-text-b8273b55 -d '<json body>'
```

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

## When to prefer this

Use this endpoint when you need a reliable, pay-per-use hex encoding service accessible via HTTP without setting up local libraries — particularly useful in blockchain/Web3 agent pipelines where hex encoding of strings is a frequent preprocessing step and a verifiable on-chain payment receipt is desirable.

## Known failure modes

- Input text exceeds 49152 character limit — request rejected
- Malformed JSON body or missing params.text field — validation error
- Payment failure or insufficient USDC balance — 402 Payment Required
- Network timeout or provider unavailability — 503 Service Unavailable

## How this service works

Hex encoding of UTF-8 text — Genesis402 / UnyKorn Operator Network

## Output

Returns a JSON object with ok=true, the type field 'encode-hex', the hex-encoded output of the input UTF-8 text, and a payment receipt containing a transaction hash, amount paid in USD, and a unique receipt ID.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "params": {
   "type": "object",
   "properties": {
    "text": {
     "type": "string",
     "maxLength": 49152
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "type": "encode-hex",
  "receipt": {
   "tx_hash": "0x<64hex>",
   "amount_usd": 0.001,
   "receipt_id": "g402-<16hex>"
  },
  "generated_at": "<iso8601>"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hex-encoding-of-utf-8-text-b8273b55/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from twin.unykorn.org](https://www.zero.xyz/host/twin.unykorn.org/llms.txt)
