# Agent Format – Hex Encode/Decode

> Agent Format – Hex Encode/Decode is a paid API for AI agents from agent-format.annushka1190.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Converts text or binary data to hexadecimal encoding or decodes hex strings back to their original form, paid per-request via USDC x402.

## Facts

- Endpoint: POST https://agent-format.annushka1190.workers.dev/v1/hex
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-format-hex-encode-decode-06c33373
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Pg1iWo3EetODJQuxsmuqC

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 agent-format-hex-encode-decode-06c33373 -d '<json body>'
```

Example prompt: Can you hex-encode the string 'Hello World' for me? I need the raw hexadecimal representation to embed it in a protocol message.

## When to prefer this

Choose this endpoint when you need a simple, stateless, pay-per-use hex encode or decode operation without setting up API keys or accounts. Ideal for AI agents that occasionally need data format conversion in automated workflows and want to pay per call in USDC via x402 rather than maintain a subscription.

## Known failure modes

- Invalid or malformed JSON body returns an error response
- Non-hex characters in decode input cause decoding failure
- Empty input string may return an error or empty result
- Payment failure via x402 prevents request from being processed
- Odd-length hex string passed to decode may be rejected

## How this service works

Encoding utilities for AI agents: base64 encode/decode, hex encode/decode, URL slugify, JWT header/payload decode (no signature verify), and case conversion. Pay-per-request USDC via x402. No API keys, no accounts.

## Output

A JSON object with an 'ok' field (true on success) and the resulting hex-encoded or hex-decoded string value. No authentication tokens or API keys are returned.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "body": {
     "type": "object"
    },
    "type": {
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "const": "json"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-format-hex-encode-decode-06c33373/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-format.annushka1190.workers.dev](https://www.zero.xyz/host/agent-format.annushka1190.workers.dev/llms.txt)
