Vast.ai API
Instances

prepay instance

1min
PUT
https://console.vast.ai/api/v0/instances/prepay/{id}/
Production server

Deposit credits into a reserved instance to receive usage discounts. The discount rate is calculated based on how many months of usage the prepaid amount covers. Maximum discount is typically 40%.

CLI Usage: vastai prepay instance Example: vastai prepay instance 1234 500.0

Authentication
BearerAuth
Path Parameters
id
*
Body Parameters
body
*
amount
*
Responses
200
Successfully applied prepayment
success
timescale
discount_rate
400
Invalid instance ID
success
msg
411
Insufficient credit balance
success
msg
429
Rate limit exceeded
detail




Updated 14 Feb 2025
Did this page help you?