# Delx Hex Canonicalize

> Delx Hex Canonicalize is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-15).

Validates and canonicalizes even-length hex strings, normalizing 0x prefix presence and confirming validity — stateless, local, no live chain RPC.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/hex-canonicalize
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-hex-canonicalize-52ca6e59
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6oW_JylqmlNU_KBVjJTJJ

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 delx-hex-canonicalize-52ca6e59 -d '<json body>'
```

Example prompt: Canonicalize this hex string '0xabcdef1234' for me — make sure it's valid and even-length, and keep the 0x prefix.

## When to prefer this

Use this endpoint when you need lightweight, stateless, local hex validation and normalization without any live RPC call or chain state — ideal for input hygiene in EVM pipelines, ABI encoding prep, or any step where you want to confirm and standardize hex format cheaply before committing to an on-chain operation.

## Known failure modes

- Odd-length hex strings return valid=false with an error explanation
- Non-hex characters in the input trigger a validation failure
- Malformed input (non-string type) may return a 400 error
- Empty string input results in valid=false

## How this service works

Canonicalize and validate even-length hex strings with optional 0x prefix — call when normalizing even-length hex for chain tooling. Use for chain input hygiene without live RPC—adjacent to OneSource-class small chain reads, but static/local only so rights and margin stay clear. Returns deterministic machine-readable JSON for $0.003 USDC via x402 on Base. Execution is first-party, local-only, stateless, and memory-only with no paid upstream, no input retention, and no claim of live chain tip, w…

## Output

Returns a deterministic JSON object indicating whether the hex string is valid (even-length, proper hex characters), the canonicalized hex string with or without 0x prefix per the caller's preference, and any normalization details.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "hex": {
   "type": "string",
   "description": "Hex string with or without 0x; must be even-length for valid=true."
  },
  "prefer_0x": {
   "type": "boolean",
   "description": "When true, canonicalize with a 0x prefix."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "valid": true,
  "schema": "delx/util-hex-canonicalize/v1",
  "canonical": "0xabcd",
  "byte_length": 2,
  "input_length": 6
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-hex-canonicalize-52ca6e59/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
