# Delx Hex Prefix

> Delx Hex Prefix is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-20).

Normalizes a hex string by optionally adding or removing the 0x prefix and checking that its length is even

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/hex-prefix?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-hex-prefix-e3256894
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VpL8hkBZuvmMk1RwjHd3x

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-prefix-e3256894 -d '<json body>'
```

Example prompt: Can you normalize this hex string '0a3f' and make sure it has the 0x prefix and is even-length?

## When to prefer this

Choose this endpoint when you need a cheap, fast, stateless micro-utility to normalize hex strings for agent preflight checks, EVM-compatible encoding, or any workflow that requires consistent 0x-prefixed or unprefixed, even-length hex before passing data to downstream systems. Prefer it over custom code when you want deterministic, auditable hex normalization without maintaining in-house utility logic.

## Known failure modes

- Input hex contains non-hexadecimal characters — returns error indicating invalid hex
- Empty hex string provided — may return error or empty normalized result
- Odd-length hex that cannot be auto-padded — returns validation failure indicator
- Malformed JSON request body — returns 400-level error
- Payment not received or x402 flow incomplete — returns 402 Payment Required

## How this service works

Normalize a hexadecimal string with optional prefix and even-length validation. Call when you need this bounded result before handing data to a downstream tool. Returns deterministic machine-readable JSON for $0.001 USDC via x402 on Base. Honest limit: execution uses only caller-supplied data in memory; it does not call a paid upstream, retain input, search the web, read a live RPC, or invoke a media generator. Results are advisory; the caller owns authorization, budgets, and production control…

## Output

Returns deterministic JSON containing the normalized hex string, whether the 0x prefix was added or removed based on the prefer_0x flag, and whether the hex had a valid even-length. The response is machine-readable and stateless.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "hex": {
   "type": "string",
   "description": "Input field: hex."
  },
  "prefer_0x": {
   "type": "boolean",
   "description": "Input field: prefer 0x."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "hex": "0x0abc",
  "valid": false,
  "schema": "delx/util-hex-prefix/v1",
  "prefer_0x": true,
  "even_length": 4
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-hex-prefix-e3256894/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)
