Skip to main content
POST
/
compute
/
credits
/
topup
Top up credits
curl --request POST \
  --url https://compute.x402layer.cc/compute/credits/topup \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 50,
  "network": "base"
}
'
{
  "success": true,
  "deposited": 50,
  "new_balance": "150.00",
  "tx_hash": "<string>"
}

Headers

X-API-Key
string

Compute/Grid API key (billed to prepaid credits). Omit to pay per request via x402 X-Payment.

Example:

"x402c_..."

Body

application/json
amount
number
required

USD to deposit (minimum $1)

Required range: x >= 1
Example:

50

network
enum<string>
Available options:
base,
solana,
megaeth
Example:

"base"

Response

Deposited

success
boolean
deposited
number
Example:

50

new_balance
string
Example:

"150.00"

tx_hash
string