Quartermaster

Tools / x402 tools

x402 Payment Simulator $0.003 / call

Pre-flight a payment: cost per rail, and can your wallet afford it.

GET /v1/x402/simulate

Decodes an x402 endpoint's payment challenge, reports the price on every rail it offers (Base and Solana) and which is cheapest, and — when you pass a payer address — checks that the wallet holds enough USDC on Base to pay. The one call an agent makes before it spends.

Parameters

url requiredThe x402 endpoint to pre-flight
addressPayer wallet (0x…) to check Base affordability

Example

macOS / Linux
curl -s "https://quartermaster.surewhynot.app/v1/x402/simulate?url=https://quartermaster.surewhynot.app/v1/extract"
Windows (cmd or PowerShell)
curl.exe -s "https://quartermaster.surewhynot.app/v1/x402/simulate?url=https://quartermaster.surewhynot.app/v1/extract"

Unpaid, these return 402 Payment Required with the payment details in the header (add -i to see them). curl.exe ships with Windows 10+ and works in cmd and both PowerShell versions. To actually pay, use an x402 client (see Connect) or call it as the MCP tool. Cost: $0.003 per call.

FAQ

How is this different from x402 Inspect?
Inspect lints an endpoint's challenge for correctness. Simulate answers the buyer's question instead: what will this cost me, on which rail, and can I afford it right now.
Does it check my Solana balance too?
Cost is reported for every rail the endpoint offers. Affordability is verified on Base (EVM), where balance reads are reliable from the edge; Solana balances aren't asserted.
Do I need ETH to pay?
No. The Base exact scheme is gasless for the payer — the facilitator relays the USDC transfer — so the affordability check looks at USDC only.
How do I pay for this endpoint?
Call it with no payment and you receive HTTP 402 with machine-readable payment requirements. Attach a USDC payment on Base with any x402 client (for example @x402/fetch) and retry — the whole loop is two requests. This call costs $0.003 in USDC.
Do I need an account or API key?
No. There are no accounts, logins, or API keys anywhere in Quartermaster. Payment is per call over the x402 protocol; your wallet is your identity.
Can I call this as an MCP tool instead?
Yes. Quartermaster is also an MCP server at /mcp, so any MCP client (Claude Code, Claude.ai, Cursor) can mount this tool. See /connect for setup.

← All tools · Connect to an agent · OpenAPI