How it works
- Agent sends a GET request to discover payment requirements
- Agent signs a USDC payment and sends it via the x402 protocol
- Agent receives an API key and endpoint URL
- Agent uses the endpoint for settlements, just like any other plan
- Agent can top up credits anytime by repeating step 2
Credit model
API
Discover payment requirements
402 with payment requirements:
Purchase credits
X-PAYMENT header contains the signed USDC transfer, encoded as base64 JSON. Pay more than the minimum to get more credits (amount / 0.001 USDC = credits).
Success response (200):
X-PAYMENT header: Returns 402 (same as GET).
Duplicate transaction: Returns 409 if the same transaction hash has already been processed.
Check balance (SIWE)
- Have a
domainmatchingx402.renvoy.ai - Include an
expirationTime(messages without expiry are rejected) - Be signed by the wallet that purchased credits
200):
Configure allowed networks (SIWE)
null to allow all supported networks (Base, Base Sepolia, Solana, Solana Devnet).
You can also toggle settlement history logging:
200):
Settlement history (SIWE)
limit (1-100, default 50), cursor (opaque, from previous response), direction (before or after).
Response (200):
Using your endpoint
Once provisioned, use your endpoint exactly like any other plan:429 with: