Skip to main content
PUT
Update auto-recharge

Authorizations

Authorization
string
header
required

Use a Runcrate API key with the rc_live_* prefix as the bearer token. Create one at https://www.runcrate.ai/dashboard/api-keys.

Body

application/json
enabled
boolean
required
Example:

true

threshold_usd
number

Top up when the balance falls below this, in USD.

Required range: 20 <= x <= 5000
Example:

25

target_usd
number

Top up to this balance, in USD. Above threshold_usd, and at most the key's daily top-up cap.

Required range: 50 <= x <= 10000
Example:

100

mode
enum<string>

keep_hours: a top-up starts when about keep_hours / 4 hours of the running instances' cost are left and adds about keep_hours hours, never under threshold_usd and target_usd, within monthly_cap_usd. Left out: the saved mode stays.

Available options:
fixed,
keep_hours
Example:

"keep_hours"

keep_hours
integer
default:24

With keep_hours: how many hours of usage each top-up adds.

Required range: 4 <= x <= 168
Example:

24

monthly_cap_usd
number

Required with keep_hours: the most auto-recharge charges in a calendar month (UTC), in USD.

Required range: 50 <= x <= 500000
Example:

3000

Response

The saved settings.

data
object
required