One-line client for Toll402 — 2,600+ pay-per-call tools for AI agents (web, PDF, provenance, business directory, ID validators, SEO/social/enrichment/ads/market-data provider APIs). Pay per call with USDC via x402 (no account) or with prepaid credits bought by card (API key). Charged only on success.
One-line access to Toll402: 2,600+ pay-per-call tools for AI agents (web, PDF, provenance, verified business directory, ID validators, and SEO/social/enrichment/ads/market-data provider APIs). Every call is paid: either from a wallet (USDC on Base via x402, no account) or from prepaid credits bought by card at https://toll402.dev/credits (API key tk_…, header x-toll402-key). Charged only on 2xx.
pip install toll402 # discovery + credits (API key) pip install "toll402[pay]" # + x402 payments (x402[requests,evm], eth-account) from toll402 import Toll402 t = Toll402(api_key=os.environ.get("TOLL402_API_KEY")) # prepaid credits (card) # or: Toll402(wallet_key=os.environ.get("WALLET_KEY")) # x402 (wallet) t.read("https://example.com") # page → Markdown ($0.002) t.do("convert 100 usd to mxn", {"base": "USD", "quote": "MXN", "amount": 100}) t.provenance("https://some-article") # human or synthetic? evidence + score t.lookup("HTTP 402", sources=["wikipedia", "wikidata"]) # trusted sources with citations t.business.search(city="Ciudad de México", category="dentist", minLevel="corroborated") t.call("hn_top", {"n": 5}) # any catalog tool by name t.last_payment # settlement of the last paid call (tx hash on Base) t.last_charge # {'usd', 'balance_usd'} of the last credits-paid call Errors raise Toll402Error with .status, .code (payment_required, invalid_input, tool_failed, …) and .price. Charged only on 2xx.
from toll402.langchain import toll402_tools tools = toll402_tools(t, max_price_usd=0.05) # StructuredTool list from the live catalog CrewAI from toll402.crewai import toll402_crewai_tools tools = toll402_crewai_tools(t, kinds=["builtin", "forged"]) Docs for machines: https://toll402.dev/llms.txt · MIT.
ai-agents api-key base credits crewai enrichment langchain seo tools usdc x402
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.




