# CAIP-2 Chain ID Parser

> CAIP-2 Chain ID Parser is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Parses a CAIP-2 chain identifier string into its constituent namespace and reference components as deterministic JSON

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/caip2-parse
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/caip-2-chain-id-parser-38b731b8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MCmJ_xyCDZILNhAbNl3An

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 caip-2-chain-id-parser-38b731b8 -d '<json body>'
```

Example prompt: Parse the CAIP-2 chain identifier 'eip155:1' into its namespace and reference parts so I can normalize it across my multi-chain agent config.

## When to prefer this

Use this endpoint when you need a lightweight, deterministic, zero-dependency way to decompose CAIP-2 chain identifiers into namespace and reference — especially in agent pipelines normalizing multi-chain configs or wallet data. Prefer it over custom string-splitting logic when you want a consistent, paid-gated microservice contract with predictable JSON output. Not suitable if you need live chain data, RPC calls, or chain validation against a registry.

## Known failure modes

- Malformed CAIP-2 string (missing colon separator) returns an error or unexpected output
- Empty string input may return null or error fields
- Non-CAIP-2 strings (e.g. plain chain names) may not parse correctly
- Payment failure via x402 prevents the call from completing

## How this service works

Parse CAIP-2 chain identifiers into namespace and reference parts. Call when normalizing multi-chain IDs from agent configs or wallets. Returns namespace, reference, and raw caip2 as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.

## Output

Returns a deterministic JSON object containing the namespace (e.g. 'eip155'), the reference (e.g. '1'), and the original raw caip2 string as provided. No external calls are made — the result is computed locally from string parsing logic.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "caip2": {
   "type": "string",
   "description": "Input field: caip2."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "caip2": "eip155:8453",
  "schema": "delx/util-caip2-parse/v1",
  "namespace": "eip155",
  "reference": "8453"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/caip-2-chain-id-parser-38b731b8/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)
