# Agent402 CAIP-2 Chain ID Parser

> Agent402 CAIP-2 Chain ID Parser is a paid API for AI agents from agent402.co.uk, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Parses and validates CAIP-2 chain identifiers (e.g. eip155:8453, solana:mainnet) into their namespace, reference, and human-readable label components

## Facts

- Endpoint: GET https://agent402.co.uk/v1/chain/caip2
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-caip-2-chain-id-parser-769ba3bc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6bOx5Y8_s2-TP4M1itorr

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 agent402-caip-2-chain-id-parser-769ba3bc
```

Example prompt: Can you parse the CAIP-2 chain ID eip155:8453 and tell me what chain it refers to and whether it's valid?

## When to prefer this

Use this endpoint whenever an agent needs to programmatically parse, validate, or label a CAIP-2 chain identifier during multi-chain workflows — especially when routing transactions, displaying chain names to users, or validating chain IDs submitted by users. Prefer this over manual string splitting when authoritative namespace/reference extraction and validity confirmation are required.

## Known failure modes

- Missing or malformed 'id' query parameter returns an error
- Unrecognized CAIP-2 chain returns valid:false or an error
- Incorrect format (e.g. missing colon separator) may yield invalid parse result
- Network timeout on rare occasions

## How this service works

Don't burn tokens on deterministic work. Go/no-go jobs first: payout preflight, text firewall (PII/secrets), budget check — then rails, calendars, finmath. x402 USDC on Base. UK + global. agent402.co.uk — not agent402.tools. $0.001–$0.002 USDC on Base. No API keys.

## Output

Returns a JSON object with fields: label (human-readable chain name, e.g. 'Base'), valid (boolean indicating if the CAIP-2 ID is recognized and well-formed), namespace (e.g. 'eip155'), and reference (e.g. '8453').

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "id"
     ],
     "properties": {
      "id": {
       "type": "string",
       "description": "CAIP-2 chain id"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "label": "Base",
  "valid": true,
  "namespace": "eip155",
  "reference": "8453"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-caip-2-chain-id-parser-769ba3bc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.co.uk](https://www.zero.xyz/host/agent402.co.uk/llms.txt)
