x402 Random Number API
Payment-gated API powered by x402 protocol
Try it Live
Connect your wallet and generate a random number for 0.01 USDC
Connect your wallet using the button above to get started
API Endpoint
POST /api/random
Request Body Parameters
min- Minimum value (default: 1)max- Maximum value (default: 100)Example Request
curl -X POST https://x402-random.vercel.app/api/random \
-H "Content-Type: application/json" \
-d '{"min": 1, "max": 100}'
Example Response
{
"success": true,
"randomNumber": 42,
"range": { "min": 1, "max": 100 },
"timestamp": "2025-11-02T00:00:00.000Z"
}
💡 This API is protected by x402 middleware, which requires payment before granting access.