# SperaxOS ERC-8004 Batch Metadata Fetcher

> SperaxOS ERC-8004 Batch Metadata Fetcher is a paid API for AI agents from chat.sperax.io, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-18).

Batch-retrieves multiple metadata fields for an ERC-8004 on-chain agent by token ID across supported blockchains, paid per-request via x402 USDC micropayment.

## Facts

- Endpoint: POST https://chat.sperax.io/api/x402/tools/erc8004/batchGetMetadata?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/speraxos-erc-8004-batch-metadata-fetcher-d7e9f3eb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7ZB4kin222Mq17UT16PK2

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 speraxos-erc-8004-batch-metadata-fetcher-d7e9f3eb -d '<json body>'
```

Example prompt: Fetch the metadata keys 'name', 'description', and 'capabilities' for agent token ID 42 on BSC mainnet using SperaxOS.

## When to prefer this

Use this endpoint when you need to retrieve multiple metadata fields for a single ERC-8004 on-chain AI agent in one request, avoiding repeated single-key lookups. Ideal for agents operating within the SperaxOS / agentcash ecosystem that need to resolve on-chain agent identities, capabilities, or configuration without managing API keys — paying only $0.005 USDC per call via x402.

## Known failure modes

- Invalid or non-existent agentId returns empty or null metadata
- Unsupported chain value causes a validation error
- Empty keys array may return empty result or error
- Payment failure via x402 if wallet lacks sufficient USDC on Base
- Network timeout or RPC failure for the target blockchain
- Requesting keys not stored on-chain returns null or missing values

## How this service works

AI-powered DeFi intelligence APIs payable via the x402 HTTP payment protocol. No API key required — pay per request with USDC on Base. Identity-only (SIWX) endpoints are free for wallets with an agentcash identity.

## Output

Returns an object mapping the requested metadata keys to their on-chain values for the specified ERC-8004 agent token ID on the chosen blockchain. Typically a key-value structure with agent attributes such as name, description, capabilities, endpoint URLs, or other on-chain-stored properties.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "keys": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Array of metadata keys to retrieve"
  },
  "chain": {
   "type": "string",
   "default": "bsc-testnet",
   "description": "Blockchain to query. Options: bsc-testnet, bsc-mainnet, ethereum, sepolia"
  },
  "agentId": {
   "type": "number",
   "description": "The token ID of the agent"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/speraxos-erc-8004-batch-metadata-fetcher-d7e9f3eb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chat.sperax.io](https://www.zero.xyz/host/chat.sperax.io/llms.txt)
