# Delx Commerce — Bytes Hex Encode

> Delx Commerce — Bytes Hex Encode is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-02).

Encodes UTF-8 text into its hexadecimal byte representation, returning the hex string, byte length, and encoding metadata.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/bytes-hex-encode?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-bytes-hex-encode-56e5f0d5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qbRXuRf8s3lZPk46KvEeZ

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-bytes-hex-encode-56e5f0d5 -d '<json body>'
```

Example prompt: Can you hex-encode the text 'hello world' for me and tell me how many bytes it is?

## When to prefer this

Choose this endpoint when you need a pay-per-call, no-signup hex encoding service paid in USDC via the x402 protocol — ideal for AI agents that need verifiable, metered utility operations without API key management. Prefer this over self-implemented encoding when you want a canonical, schema-versioned result with validity confirmation and byte length metadata attached.

## Known failure modes

- Empty or missing 'text' field returns an error or invalid result
- Extremely long input strings may be truncated (truncated: true in response)
- Non-UTF-8 byte sequences in the input string may cause encoding errors
- Network or payment failures (x402 protocol) may prevent the call from completing

## How this service works

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

## Output

A JSON object containing: 'hex' (the 0x-prefixed hexadecimal encoding of the input text), 'mode' (encoding mode, e.g. 'text_to_hex'), 'valid' (boolean indicating successful encoding), 'schema' (schema identifier string), 'truncated' (boolean indicating if input was truncated), and 'byte_length' (integer count of encoded bytes).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "UTF-8 text to encode, chunk, index, or analyze (caller-supplied only)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "hex": "0x64656c78",
  "mode": "text_to_hex",
  "valid": true,
  "schema": "delx/util-bytes-hex-encode/v1",
  "truncated": false,
  "byte_length": 4
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-bytes-hex-encode-56e5f0d5/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)
