Tools / Developer utilities
Random Numbers $0.001 / call
Cryptographically-secure random integers.
GET /v1/random
Returns one or more uniformly-distributed random integers in a range you choose, drawn from a CSPRNG (crypto.getRandomValues) with rejection sampling to avoid modulo bias. The thing an LLM cannot do for itself.
Parameters
min | Lower bound, inclusive (default 0) |
max | Upper bound, inclusive (default 100) |
count | How many, 1-1000 (default 1) |
Example
macOS / Linuxcurl -s "https://quartermaster.surewhynot.app/v1/random?min=1&max=6&count=2"
Windows (cmd or PowerShell)
curl.exe -s "https://quartermaster.surewhynot.app/v1/random?min=1&max=6&count=2"
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.001 per call.
FAQ
Why pay for randomness?
Language models are notoriously bad at generating unbiased random values. This gives you real CSPRNG entropy an agent can trust for sampling, shuffling, or tie-breaking.
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.001 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.