/api/v1/x402/top-up
Top up your Venice credit balance using a PAYMENT-SIGNATURE header (the legacy X-402-Payment and X-PAYMENT header names are also accepted). If the header is missing, the endpoint returns payment requirements.
This is the primary x402 payment endpoint. It currently returns Base and Solana USDC payment options in the accepts array. All inference endpoints (chat, image, audio, video) consume from the credit balance you establish here.
Request
- Base URL: https://api.venice.ai
- URL: https://api.venice.ai/api/v1/x402/top-up
- Auth: none required
Headers
Signed x402 v2 payment payload (base64-encoded PaymentPayload) used to top up the wallet balance on a supported rail such as Base or Solana. The canonical header is PAYMENT-SIGNATURE; the X-402-Payment and X-PAYMENT names are also accepted for backwards compatibility. If no payment header is present, the endpoint returns the 402 payment requirements.
Request body
Response
Top-up completed successfully.
Example response
{
"data": {
"walletAddress": "0xyour_wallet_address",
"amountCredited": 10,
"newBalance": 22.5,
"paymentId": "payment_01HZY8M4W4Y6QZ8B6Q4P0V3J2K"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.