# Cortex Cloud Token Balances API

> Cortex Cloud Token Balances API is a paid API for AI agents from api.cortexcloud.org, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-13).

Fetches ERC-20 token balances for a wallet address on a specified blockchain chain using the Alchemy Token API, paid via x402 USDC on Base.

## Facts

- Endpoint: GET https://api.cortexcloud.org/v1/data/token-balances
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cortex-cloud-token-balances-api-06de84cb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jnqldmvUK6dih-59m-9Gx

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 cortex-cloud-token-balances-api-06de84cb
```

Example prompt: What ERC-20 tokens does the wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 hold on Ethereum — show me up to 50 tokens?

## When to prefer this

Choose this endpoint when you need on-chain ERC-20 token balance data for a wallet without managing Alchemy API keys directly. Ideal for agents that need to check crypto portfolio holdings, verify token ownership, or enrich wallet profiles. The x402 micropayment model ($0.004/call) makes it cost-effective for per-query usage without subscription overhead. Prefer this over raw RPC calls when you want normalized token balance output across chains.

## Known failure modes

- Invalid wallet address format (not a valid 0x hex address) returns a validation error
- Invalid or unsupported chain name returns an error or empty results
- Malformed token contract address in the tokens filter array causes a validation error
- Wallet has no ERC-20 token holdings returns an empty list
- Alchemy upstream service outage or rate limit may cause 5xx or timeout errors
- Payment failure via x402 (insufficient USDC balance) blocks the request

## How this service works

One pay-per-call API for AI agents: optimization, AI, research, on-chain data, and automation — all settled in USDC on Base via x402. Discover via MCP and Bazaar, estimate free, pay per call. No API keys, no signup.

## Output

Returns a list of ERC-20 token holdings for the specified wallet address on the given chain, including token contract addresses and their respective balances. Results are capped at the requested max_tokens count (default 50, max 200).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chain": {
   "type": "string",
   "default": "ethereum"
  },
  "tokens": {
   "type": "array",
   "items": {
    "type": "string",
    "pattern": "^0x[0-9a-fA-F]{40}$"
   }
  },
  "address": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$"
  },
  "max_tokens": {
   "type": "integer",
   "default": 50,
   "maximum": 200,
   "minimum": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "format": "application/json",
 "example": {}
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cortex-cloud-token-balances-api-06de84cb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.cortexcloud.org](https://www.zero.xyz/host/api.cortexcloud.org/llms.txt)
