v4

latestOpenAPI 3.1.02026-08-0117737.6 KB
Credits

Buy a prepaid credit bundle (x402, USDC)

Pay once via x402 (USDC on Base) and receive a fresh API key preloaded with the bundle credits. Bundles: 1k = $5, 5k = $20, 25k = $80. Credits never expire. Optionally pass {"email": "..."} in the body to attach the key to an email — anonymous keys are fully functional too. Check the balance with GET /v1/credits/balance.

post/v1/credits/buy/{bundle}

Path parameters

bundle'1k' | '5k' | '25k' required
Example:1k

Bundle slug

Request body

emailstring email

Optional — attach the key to an email address

Response

Credit key minted (shown only once — save it)

api_keystring required

Full API key — shown only once

key_prefixstring
creditsinteger required
bundlestring required
price_paid_usdcnumber
price_per_call_usdcnumber
usage_hintstring
balance_endpointstring
messagestring

Example response

{
  "credits": 1000,
  "bundle": "1k",
  "price_paid_usdc": 5,
  "price_per_call_usdc": 0.005,
  "balance_endpoint": "GET /v1/credits/balance"
}