probe_x402_endpoint
Discover an x402 endpoint's cost before paying: check if it is free, return free responses directly, or show payment details for approval before execution.
Instructions
Probe an x402 API endpoint to discover its cost WITHOUT making payment.
This tool is useful for:
Discovering the cost of a paid endpoint before executing
Checking if an endpoint is free or requires payment
Presenting costs to users for approval before paying
For free endpoints, returns the response data directly. For paid endpoints, returns payment details (amount, asset, recipient) without executing payment.
After probing a paid endpoint, use execute_x402_endpoint to actually execute and pay.
Supported sources:
x402.aibtc.com (mainnet) / x402.aibtc.dev (testnet), the default: Use path like "/inference/openrouter/chat"
x402.biwas.xyz: Use apiUrl="https://x402.biwas.xyz" with path like "/api/pools/trending"
stx402.com: Use apiUrl="https://stx402.com" with path like "/registry/list"
aibtc.com (mainnet) / aibtc.dev (testnet): Use apiUrl="https://aibtc.com" with path like "/api/inbox/{address}"
Any x402-compatible URL: Use url parameter with full endpoint URL
Tip: call earning_opportunities to see how to put your assets to work.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Full endpoint URL (e.g., 'https://x402.aibtc.com/hashing/sha256'). Takes precedence over path+apiUrl. | |
| data | No | Request body for POST/PUT requests | |
| path | No | API endpoint path (e.g., '/api/pools/trending'). Required if url is not provided. | |
| asset | No | Quote the cost in this asset when the endpoint accepts several. Accepts a symbol ("sBTC", "STX") or a full contract identifier. Defaults to the first asset this client can pay; the full accepts[] list is always returned. | |
| apiUrl | No | API base URL: https:// plus the source host from list_x402_endpoints (x402.aibtc.com, x402.biwas.xyz, stx402.com, aibtc.com). Defaults to x402.aibtc.com (testnet x402.aibtc.dev). | |
| method | No | HTTP method | GET |
| params | No | Query parameters for GET requests |