do $0.02 per call
One endpoint for everything (OpenRouter-style): describe what you need and pass the input; Toll402 picks the best tool from the whole catalog (built-in, community-forged, external x402 services) and runs it. Tools priced above maxPriceUsd are returned as a match instead of executed.
For AI agents: call do
POST https://toll402.dev/v1/do
{
"need": "convert 100 US dollars to Mexican pesos",
"input": {
"base": "USD",
"quote": "MXN",
"amount": 100
}
}Answers 402 with x402 payment requirements; pay with any x402 client (@x402/fetch, x402 for Python, toll402-client, toll402-mcp) or send a prepaid-credits key as x-toll402-key (https://toll402.dev/credits). Paid per call via x402 (USDC on Base) or with a prepaid-credits key (x-toll402-key, card at /credits); charged only on success. Start at /llms.txt or connect the MCP server:
npx -y toll402-mcp · remote https://toll402.dev/mcp.Input schema
{
"type": "object",
"properties": {
"need": {
"type": "string",
"description": "What you need, in plain language",
"minLength": 3,
"maxLength": 500
},
"input": {
"type": "object",
"additionalProperties": true,
"description": "Input for the chosen tool (must match its schema)"
},
"maxPriceUsd": {
"type": "number",
"minimum": 0,
"maximum": 1,
"default": 0.01,
"description": "Do not execute tools priced above this; return the match instead"
},
"tool": {
"type": "string",
"description": "Force a specific tool id (skip routing)"
}
},
"required": [
"need",
"input"
],
"additionalProperties": false
}
Example output
{
"executed": true,
"tool": {
"name": "fx_rate",
"price": "$0.001"
},
"result": {
"converted": 1842
}
}
MCP
{"mcpServers":{"toll402":{"command":"npx","args":["-y","toll402-mcp"],"env":{"TOLL402_WALLET_KEY":"0x..."}}}}