PUT
/
api
/
v0
/
instances
/
prepay
/
{id}
/
prepay instance
curl --request PUT \
  --url https://console.vast.ai/api/v0/instances/prepay/{id}/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": 500
}'
{
  "success": true,
  "timescale": 3.5,
  "discount_rate": 0.3
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
integer
required

ID of the instance to prepay for

Body

application/json
amount
number
required

Amount of credits to prepay

Example:

500

Response

Successfully applied prepayment

success
boolean
Example:

true

timescale
number

Number of months the prepayment will cover

Example:

3.5

discount_rate
number

Applied discount rate (0.0-0.4)

Example:

0.3