Skip to main content

Credits

Check balance

Response:

Top up credits

The topup flow uses the x402 payment protocol and requires two requests:

Step 1: Request payment details

This returns a 402 response with payment requirements:

Step 2: Sign and submit payment

Sign a USDC TransferWithAuthorization (EIP-3009 / EIP-712) using the details from Step 1, encode the payment as base64, and resend the request with an X-PAYMENT header:
Response:
The dria topup CLI command handles this entire flow automatically. Use the API directly only if you need custom integration.