{"openapi":"3.1.0","info":{"title":"x402 Toolbox (x402)","version":"1.0.0","description":"Ten pay-per-call tools for AI agents, no API key: chain head and gas on five EVM chains, NFT owner, holdings, balances and metadata, Chainlink crypto prices, any web page as markdown, weather anywhere, and ECB exchange rates. USDC on Base via x402, from $0.001 a call.","x-guidance":"GET /block ($0.001): Latest block and its age on five EVM chains. GET /gas ($0.001): Gas tiers and transfer cost in USD on five EVM chains, cheapest first. GET /nft/tokens ($0.002): Token ids an address holds in one ERC-721 collection. GET /nft/metadata ($0.002): Resolved metadata JSON, image and attributes for any ERC-721 or ERC-1155 token. GET /nft/owner ($0.001): Current owner of an ERC-721 token. GET /nft/balance ($0.001): ERC-1155 balances of an address for up to 50 token ids. GET /price ($0.001): Live Chainlink oracle prices for up to 20 crypto assets in USD. GET /read ($0.001): Fetch a public web page and return clean markdown or plain text with its title and metadata. GET /weather ($0.001): Current weather and a 3-day forecast for a place name or latitude and longitude. GET /fx ($0.001): Latest or historic ECB reference exchange rates with optional amount conversion. Pay in USDC on Base via x402."},"servers":[{"url":"https://x402-toolbox.vercel.app"}],"paths":{"/block":{"get":{"operationId":"getChainHead","summary":"Latest block and its age on five EVM chains","description":"Latest block on Base, Ethereum, Arbitrum, Optimism and Polygon in one call: number, hash, timestamp, age in seconds, transaction count, gas used and limit, base fee. Read live with RPC failover; per-chain status. Not charged for bad input or when every chain fails. No API key.","tags":["Chain Head: Block Height"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"parameters":[{"name":"chains","in":"query","required":false,"schema":{"type":"string","description":"Comma list, any of: base,ethereum,arbitrum,optimism,polygon. Default: all five."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"},"example":{"fetchedAt":"2026-11-20T23:39:15.745Z","chainsOk":1,"chainsFailed":0,"chains":[{"chain":"base","chainId":8453,"status":"ok","number":"60137911","hash":"0x38bdfce10b68f89e05043c4ac3a101913d4ed1777aafce5e01f059be2a1f9def","timestamp":"2026-11-20T23:39:17.000Z","ageSeconds":0,"txCount":21,"gasUsed":"2661978","gasLimit":"40000000","baseFeePerGas":"5000000"}]}}}},"400":{"description":"bad input (not charged)"},"402":{"description":"Payment Required"},"502":{"description":"every requested chain unavailable (not charged)"}}}},"/gas":{"get":{"operationId":"getGasPrices","summary":"Gas tiers and transfer cost in USD on five EVM chains, cheapest first","description":"Gas oracle for Base, Ethereum, Arbitrum, Optimism and Polygon: next base fee, slow, standard and fast priority-fee tiers (median of the last 10 blocks), max fee per gas, and the cost of a 21000-gas transfer in native coin and USD via Chainlink. Sorted cheapest first. Not charged for bad input or when every chain fails. No API key.","tags":["Gas Price Oracle"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"parameters":[{"name":"chains","in":"query","required":false,"schema":{"type":"string","description":"Comma list, any of: base,ethereum,arbitrum,optimism,polygon. Default: all five."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"},"example":{"fetchedAt":"2026-11-20T23:39:15.821Z","chainsOk":1,"chainsFailed":0,"chains":[{"chain":"base","chainId":8453,"status":"ok","nativeSymbol":"ETH","nextBaseFeeWei":"5000000","nextBaseFeeGwei":0.005,"gasPriceWei":"6000000","gasPriceGwei":0.006,"tiers":{"slow":{"tipWei":"125000","tipGwei":0.000125,"maxFeePerGasWei":"10125000","maxFeePerGasGwei":0.010125},"standard":{"tipWei":"1000000","tipGwei":0.001,"maxFeePerGasWei":"11000000","maxFeePerGasGwei":0.011},"fast":{"tipWei":"1202500","tipGwei":0.0012025,"maxFeePerGasWei":"11202500","maxFeePerGasGwei":0.0112025}},"transferCost":{"symbol":"ETH","wei":"126000000000","formatted":"0.000000126","gas":21000},"note":"OP-stack chain: the L1 data fee (posting the transaction to Ethereum) is charged on top of this execution cost.","nativeUsd":1623.82852773,"transferCostUsd":0.0002046}]}}}},"400":{"description":"bad input (not charged)"},"402":{"description":"Payment Required"},"502":{"description":"every requested chain unavailable (not charged)"}}}},"/nft/tokens":{"get":{"operationId":"getNftHoldings","summary":"Token ids an address holds in one ERC-721 collection","description":"Lists the token ids an address holds in one ERC-721 collection (up to 200), with balance, collection name and symbol, read live on Base, Ethereum, Arbitrum, Optimism or Polygon. Needs an ERC721Enumerable contract. Not charged for bad input, a non-enumerable contract, a non-ERC-721 address or a chain outage. No API key.","tags":["NFT Holdings (ERC-721)"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{}}]},"parameters":[{"name":"owner","in":"query","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet address to list holdings for"}},{"name":"contract","in":"query","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-721 collection contract address"}},{"name":"chain","in":"query","required":false,"schema":{"type":"string","description":"One chain, any of: base,ethereum,arbitrum,optimism,polygon. Default: ethereum."}},{"name":"limit","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{1,3}$","description":"Max token ids to return, 1-200 (default 100)"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"},"example":{"owner":"0x46EFbAedc92067E6d60E84ED6395099723252496","contract":"0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D","chain":"ethereum","balance":"1","tokenIds":["1"],"truncated":false,"name":"BoredApeYachtClub","symbol":"BAYC"}}}},"400":{"description":"bad input (not charged)"},"402":{"description":"Payment Required"},"422":{"description":"contract is not ERC-721 or not enumerable (not charged)"},"502":{"description":"chain unavailable (not charged)"}}}},"/nft/metadata":{"get":{"operationId":"getNftMetadata","summary":"Resolved metadata JSON, image and attributes for any ERC-721 or ERC-1155 token","description":"Resolves an NFT to its metadata in one call: reads tokenURI or uri on-chain, fetches ipfs, arweave, data and http URIs (SSRF-safe), and returns name, description, image gateway URL, attributes, owner and collection name. ERC-721 and ERC-1155. Not charged for bad input, a missing token, an unreachable metadata URL or a chain outage. No API key.","tags":["NFT Metadata Resolver"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{}}]},"parameters":[{"name":"contract","in":"query","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"NFT contract address"}},{"name":"tokenId","in":"query","required":true,"schema":{"type":"string","pattern":"^(\\d+|0x[0-9a-fA-F]+)$","description":"Token id, decimal or 0x hex"}},{"name":"chain","in":"query","required":false,"schema":{"type":"string","description":"One chain, any of: base,ethereum,arbitrum,optimism,polygon. Default: ethereum."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"},"example":{"contract":"0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D","tokenId":"1","chain":"ethereum","standard":"erc721","collectionName":"BoredApeYachtClub","symbol":"BAYC","owner":"0x46EFbAedc92067E6d60E84ED6395099723252496","tokenUri":"ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/1","metadataUrl":"https://ipfs.io/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/1","metadata":{"name":null,"description":null,"image":"ipfs://QmPbxeGcXhYQQNgsC6a36dDyYUcHgMLnGKnF8pVFmGsvqi","imageUrl":"https://ipfs.io/ipfs/QmPbxeGcXhYQQNgsC6a36dDyYUcHgMLnGKnF8pVFmGsvqi","animationUrl":null,"externalUrl":null,"attributes":[{"trait_type":"Mouth","value":"Grin"},{"trait_type":"Fur","value":"Robot"}]},"raw":{"image":"ipfs://QmPbxeGcXhYQQNgsC6a36dDyYUcHgMLnGKnF8pVFmGsvqi","attributes":[{"trait_type":"Mouth","value":"Grin"},{"trait_type":"Fur","value":"Robot"}]},"rawTruncated":false}}}},"400":{"description":"bad input (not charged)"},"402":{"description":"Payment Required"},"404":{"description":"token has no tokenURI or uri (not charged)"},"422":{"description":"metadata URL refused by the SSRF guard (not charged)"},"502":{"description":"chain or metadata host unavailable (not charged)"}}}},"/nft/owner":{"get":{"operationId":"getNftOwner","summary":"Current owner of an ERC-721 token","description":"Current owner of one ERC-721 token, checksummed, with collection name, symbol and tokenURI, read live on Base, Ethereum, Arbitrum, Optimism or Polygon. Not charged for bad input, a token that does not exist or a contract that is not ERC-721, or a chain outage. No API key.","tags":["NFT Owner Lookup"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"parameters":[{"name":"contract","in":"query","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-721 contract address"}},{"name":"tokenId","in":"query","required":true,"schema":{"type":"string","pattern":"^(\\d+|0x[0-9a-fA-F]+)$","description":"Token id, decimal or 0x hex"}},{"name":"chain","in":"query","required":false,"schema":{"type":"string","description":"One chain, any of: base,ethereum,arbitrum,optimism,polygon. Default: ethereum."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"},"example":{"contract":"0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D","tokenId":"1","chain":"ethereum","owner":"0x46EFbAedc92067E6d60E84ED6395099723252496","collectionName":"BoredApeYachtClub","symbol":"BAYC","tokenUri":"ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/1"}}}},"400":{"description":"bad input (not charged)"},"402":{"description":"Payment Required"},"404":{"description":"token does not exist or contract is not ERC-721 (not charged)"},"502":{"description":"chain unavailable (not charged)"}}}},"/nft/balance":{"get":{"operationId":"getErc1155Balance","summary":"ERC-1155 balances of an address for up to 50 token ids","description":"ERC-1155 balances of one address for 1-50 token ids of a single contract, read in one batched call on Base, Ethereum, Arbitrum, Optimism or Polygon. Returns per-id balance and the total. Not charged for bad input, a contract that is not ERC-1155, or a chain outage. No API key.","tags":["ERC-1155 Balance"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"parameters":[{"name":"owner","in":"query","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet address to read"}},{"name":"contract","in":"query","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-1155 contract address"}},{"name":"ids","in":"query","required":true,"schema":{"type":"string","description":"Comma list of 1-50 token ids, decimal or 0x hex"}},{"name":"chain","in":"query","required":false,"schema":{"type":"string","description":"One chain, any of: base,ethereum,arbitrum,optimism,polygon. Default: ethereum."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"},"example":{"owner":"0x1d10a37327ec3a0a64925aCeD29bFB5623df54f5","contract":"0x81A22628CB0a69e6391612D9Fa21B9A18Cf5C16C","chain":"ethereum","balances":[{"id":"4","balance":"250"},{"id":"5","balance":"250"}],"total":"500"}}}},"400":{"description":"bad input (not charged)"},"402":{"description":"Payment Required"},"422":{"description":"contract is not ERC-1155 (not charged)"},"502":{"description":"chain unavailable (not charged)"}}}},"/price":{"get":{"operationId":"getCryptoPrices","summary":"Live Chainlink oracle prices for up to 20 crypto assets in USD","description":"Live USD prices for BTC, ETH, LINK, SOL, USDC and ~20 more, read straight from Chainlink aggregator contracts on Ethereum: price, decimals, round id, last update time and age in seconds. Not charged for bad input, an unsupported symbol, or when every feed read fails. No API key.","tags":["Chainlink Crypto Prices"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"parameters":[{"name":"symbols","in":"query","required":true,"schema":{"type":"string","description":"Comma list of 1-20 symbols, e.g. BTC,ETH,LINK. Supported: BTC,ETH,LINK,USDC,USDT,DAI,SOL,BNB,MATIC,POL,AVAX,UNI,AAVE,ARB,MKR,SNX,CRV,COMP,stETH"}},{"name":"quote","in":"query","required":false,"schema":{"type":"string","description":"Quote currency. Only USD is supported (default)."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"},"example":{"quote":"USD","source":"chainlink","chain":"ethereum","fetchedAt":"2026-11-20T23:39:23.139Z","prices":[{"status":"ok","symbol":"LINK","price":8.54503,"priceRaw":"854503000","decimals":8,"updatedAt":"2026-11-20T23:28:35.000Z","ageSeconds":648,"roundId":"129127208515966897268","feed":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","description":"LINK / USD"}]}}}},"400":{"description":"bad input or unsupported symbol (not charged)"},"402":{"description":"Payment Required"},"502":{"description":"every feed read failed (not charged)"}}}},"/read":{"get":{"operationId":"readWebPage","summary":"Fetch a public web page and return clean markdown or plain text with its title and metadata","description":"Fetch a public http(s) page and return clean markdown or plain text plus title, description, canonical, language, og:image, word and link counts. Honours robots.txt. Social networks, Amazon and Google are refused. Not charged on bad input, 404, blocked URL, robots disallow, unsupported content type or upstream failure. No API key.","tags":["Web Page to Markdown"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","pattern":"^https?://\\S+$","description":"Public http(s) page URL"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(markdown|text)$","description":"markdown (default) or text"}},{"name":"maxChars","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9]{1,6}$","description":"Cut the content at this many characters (default 20000, max 100000)"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"},"example":{"url":"https://example.com","finalUrl":"https://example.com/","status":200,"title":"Example Domain","description":null,"canonical":null,"lang":"en","image":null,"content":"This domain is for use in documentation examples without needing permission. This is not a service; avoid relying on it for testing and monitoring purposes.","contentChars":156,"truncated":false,"wordCount":25,"links":0,"fetchedAt":"2026-11-20T23:36:23.442Z"}}}},"400":{"description":"bad input (not charged)"},"402":{"description":"Payment Required"},"404":{"description":"page not found at the source (not charged)"},"422":{"description":"URL blocked, robots.txt disallows it, or content type not supported (not charged)"},"502":{"description":"the page could not be fetched (not charged)"}}}},"/weather":{"get":{"operationId":"getWeather","summary":"Current weather and a 3-day forecast for a place name or latitude and longitude","description":"Current conditions (temperature, humidity, wind, cloud, pressure, rain next hour) and a 3-day daily forecast for a place name or lat/lon anywhere. Metric or imperial units. Data from MET Norway, geocoding from OpenStreetMap. Not charged on bad input, unknown place or upstream failure. No API key.","tags":["Weather Now and 3-Day Forecast"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"parameters":[{"name":"place","in":"query","required":false,"schema":{"type":"string","pattern":"^.{2,120}$","description":"Place name, e.g. \"Cincinnati, OH\" (use this or lat and lon)"}},{"name":"lat","in":"query","required":false,"schema":{"type":"string","pattern":"^-?[0-9]{1,2}(\\.[0-9]+)?$","description":"Latitude -90 to 90"}},{"name":"lon","in":"query","required":false,"schema":{"type":"string","pattern":"^-?[0-9]{1,3}(\\.[0-9]+)?$","description":"Longitude -180 to 180"}},{"name":"units","in":"query","required":false,"schema":{"type":"string","pattern":"^(metric|imperial)$","description":"metric (default) or imperial"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"},"example":{"location":{"lat":39.1013,"lon":-84.5127,"name":"Cincinnati, Hamilton County, Ohio, United States","elevation":150},"current":{"time":"2026-11-20T23:00:00Z","temperature":55.4,"humidity":70.4,"windSpeed":5.4,"windDirection":111.2,"cloudCover":0,"pressure":1025.2,"precipitationNextHour":0,"symbol":"clearsky_night"},"daily":[{"date":"2026-11-20","tempMin":55.4,"tempMax":55.4,"precipitation":0,"symbol":"clearsky_night"},{"date":"2026-11-21","tempMin":40.5,"tempMax":64.8,"precipitation":0,"symbol":"clearsky_night"},{"date":"2026-11-22","tempMin":42.6,"tempMax":66.2,"precipitation":0,"symbol":"partlycloudy_night"}],"units":{"temperature":"F","windSpeed":"mph","precipitation":"in","pressure":"hPa","humidity":"%","cloudCover":"%","windDirection":"degrees","elevation":"m"},"updatedAt":"2026-11-20T23:21:42Z","attribution":"Weather data from MET Norway (CC BY 4.0); place names from OpenStreetMap Nominatim (ODbL)"}}}},"400":{"description":"bad input (not charged)"},"402":{"description":"Payment Required"},"404":{"description":"place not found (not charged)"},"502":{"description":"weather or geocoding upstream failed (not charged)"}}}},"/fx":{"get":{"operationId":"getExchangeRates","summary":"Latest or historic ECB reference exchange rates with optional amount conversion","description":"European Central Bank reference rates: latest or any date since 1999-01-04, any base, optional symbols list and amount to convert. About 30 currencies, published once per working day. Returns the publication date actually used. Not charged on bad input, no data for the date, or upstream failure. No API key.","tags":["ECB Exchange Rates"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"parameters":[{"name":"base","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z]{3}$","description":"Base currency code (default USD)"}},{"name":"symbols","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z]{3}(,[A-Za-z]{3})*$","description":"Comma list of target codes, e.g. EUR,JPY (default all)"}},{"name":"amount","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Amount of the base currency to convert"}},{"name":"date","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$","description":"YYYY-MM-DD, 1999-01-04 or later (default latest)"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"},"example":{"base":"USD","date":"2026-11-20","requestedDate":null,"rates":{"EUR":0.90992,"JPY":158.64},"amount":100,"converted":{"EUR":90.992,"JPY":15864},"source":"European Central Bank reference rates via Frankfurter","note":"ECB publishes once per working day around 16:00 CET"}}}},"400":{"description":"bad input or unsupported currency (not charged)"},"402":{"description":"Payment Required"},"404":{"description":"no rates for that date (not charged)"},"502":{"description":"rate source failed (not charged)"}}}},"/":{"get":{"security":[],"summary":"Docs page","responses":{"200":{"description":"OK"}}}},"/health":{"get":{"security":[],"summary":"Health check","responses":{"200":{"description":"OK"}}}},"/llms.txt":{"get":{"security":[],"summary":"LLM summary","responses":{"200":{"description":"OK"}}}}}}