# Delx Commerce Hex Prefix Normalizer

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

Validates and normalizes a hexadecimal string, ensuring it has the correct prefix (0x or no prefix) and reports its length and validity.

## Facts

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

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-commerce-hex-prefix-normalizer-42e191d0 -d '<json body>'
```

Example prompt: Can you normalize this hex string '0abc' so it has a 0x prefix and tell me if it's valid?

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call utility to normalize or validate hex string prefixes without setting up an account or managing API keys — especially useful in automated agent pipelines dealing with blockchain addresses, calldata, or cryptographic hashes that require consistent 0x prefix formatting.

## Known failure modes

- Invalid or non-hex characters in input string causing valid=false
- Malformed JSON request body returns 400 error
- Payment failure via x402 protocol returns 402 Payment Required
- Empty or missing hex field may return validation error

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object containing the normalized hex string, a validity boolean, the prefer_0x flag used, the even-length character count, and the schema identifier 'delx/util-hex-prefix/v1'.

## 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-commerce-hex-prefix-normalizer-42e191d0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
