# OneSource ERC-1155 Token Balance Lookup

> OneSource ERC-1155 Token Balance Lookup is a paid API for AI agents from api.onesource.io, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-13).

Returns the ERC-1155 NFT token balance for a given wallet address, contract, and token ID on Ethereum mainnet or Sepolia testnet

## Facts

- Endpoint: GET https://api.onesource.io/api/chain/erc1155-balance
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onesource-erc-1155-token-balance-lookup-797a5965
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_haBGTs180t3wiCkhHBWDp

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 onesource-erc-1155-token-balance-lookup-797a5965
```

Example prompt: How many ERC-1155 tokens does wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 hold for token ID 1 on the contract 0xdAC17F958D2ee523a2206206994597C13D831ec7 on Ethereum mainnet?

## When to prefer this

Use this endpoint when you need to check the exact quantity of a specific ERC-1155 (multi-token standard) token held by a wallet — especially for NFT games, semi-fungible tokens, or multi-edition collectibles. Prefer this over ERC-721 balance endpoints when dealing with tokens that can have quantity > 1. Choose this when no API key is available and you can pay per call with USDC on Base.

## Known failure modes

- Invalid wallet address format returns an error (must be 0x-prefixed 40-char hex)
- Invalid contract address format returns an error
- Non-existent token ID may return balance of 0
- Network not found if unsupported network specified
- Payment failure (402) if USDC payment not provided or insufficient
- Rate limiting if too many unauthenticated requests made

## How this service works

ERC1155 token balance via balanceOf (eth_call) - how many copies of a token_id a wallet holds

## Output

A JSON object containing the queried account address, contract address, token ID, and the integer balance (as a string) representing how many of that ERC-1155 token the account holds.

## Example request

```json
{
 "account": "0x1234567890123456789012345678901234567890",
 "network": "sepolia",
 "contract": "0x0987654321098765432109876543210987654321",
 "token_id": "1"
}
```

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "address",
      "contract",
      "token_id"
     ],
     "properties": {
      "address": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$"
      },
      "network": {
       "enum": [
        "ethereum",
        "sepolia",
        "robinhood"
       ],
       "type": "string",
       "default": "ethereum"
      },
      "contract": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$"
      },
      "token_id": {
       "type": "string",
       "pattern": "^[0-9]+$"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "data",
      "meta"
     ],
     "properties": {
      "data": {
       "type": "object",
       "properties": {
        "account": {
         "type": "string"
        },
        "balance": {
         "type": "string"
        },
        "token_id": {
         "type": "string"
        },
        "contract_address": {
         "type": "string"
        }
       },
       "description": "Endpoint-specific response payload"
      },
      "meta": {
       "type": "object",
       "required": [
        "endpoint",
        "request_id"
       ],
       "properties": {
        "endpoint": {
         "type": "string"
        },
        "cost_usdc": {
         "type": "string"
        },
        "request_id": {
         "type": "string"
        },
        "payment_chain": {
         "type": "string"
        },
        "payment_token": {
         "type": "string"
        }
       }
      },
      "error": {
       "type": [
        "object",
        "null"
       ],
       "properties": {
        "code": {
         "type": "integer"
        },
        "message": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "account": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
   "balance": "42",
   "token_id": "1",
   "contract_address": "0xdac17f958d2ee523a2206206994597c13d831ec7"
  },
  "meta": {
   "endpoint": "/api/chain/erc1155-balance",
   "cost_usdc": "0.001",
   "request_id": "00000000abcdef01",
   "payment_chain": "base",
   "payment_token": "USDC"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onesource-erc-1155-token-balance-lookup-797a5965/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.onesource.io](https://www.zero.xyz/host/api.onesource.io/llms.txt)
