toll402 (Python)
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.
LangChain
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.
Metadata
Release files for toll402 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| toll402-0.2.0.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| toll402-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.8 kB
Release files / toll402-0.2.0.tar.gz
| Download URL | toll402-0.2.0.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b74aa6fdbdde3ca70a4ab724c7025368340774b063393c415b5abf4ad692e97d
|
|
BLAKE2b-256 checksum How to use checksums |
0d5dab2ff38b3020f9b342144763e6014f6b666037fdf9ea2dac1ea549d32a98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / toll402-0.2.0-py3-none-any.whl
| Download URL | toll402-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
56079e7cc20b2816290590c63133ccbd7a1d17faab1bb13ba714290b316f1224
|
|
BLAKE2b-256 checksum How to use checksums |
d9ecb06daea064260faecaf47006717818b30034daa807d3fda85272fcb513b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|