# Delx Bytes Hex Encode

> Delx Bytes Hex Encode 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).

Encodes bounded UTF-8 text to its hexadecimal representation, or inspects the resulting hex byte length, entirely locally without any RPC calls.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/bytes-hex-encode
- 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-bytes-hex-encode-6ed4bd46
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_O04Q_jef1mtRckvReUhEU

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

Example prompt: Encode the UTF-8 string 'Hello, World!' to hex so I can use it as input for a smart contract call.

## When to prefer this

Choose this endpoint when you need a fast, stateless, deterministic hex encoding of a UTF-8 string with no external RPC dependencies, no data retention, and no side effects — ideal for preparing on-chain inputs, validating byte lengths before submission, or any workflow where local-only execution and privacy are required. Prefer this over RPC-based encoding utilities when live chain access is unnecessary and cost predictability matters.

## Known failure modes

- Input text exceeds bounded length limit — API returns an error indicating text is too long
- Non-UTF-8 or malformed byte sequences in input — API returns a validation or encoding error
- Empty string input — may return empty hex string or an error depending on validation rules
- Missing required 'text' field — API returns a 400-style error about missing input

## How this service works

Encode bounded UTF-8 text to hex or inspect hex byte length without RPC — call when encoding bounded UTF-8 to hex or inspecting hex length. 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…

## Output

Returns a deterministic JSON object containing the hex-encoded representation of the input UTF-8 text and/or the byte length of the resulting hex string. No external calls are made; output is computed locally and statelessly.

## 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-bytes-hex-encode-6ed4bd46/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)
