Get / Update Settings
Get and update auto top-up billing settings. A human must enable auto top-up before agents can use the topup endpoint.
Billing settings control whether AI agents can autonomously top up credits. A human must enable auto top-up and configure the threshold and amount before agents can call the topup endpoint.
The auto top-up system is designed with a human-in-the-loop safety model. An organization admin enables it once with a threshold and amount, and from that point agents can autonomously maintain the credit balance without further human intervention.
GET
/v1/billing/settingsResponse
Response fields
auto_topup_enabledbooleanWhether agents are allowed to autonomously top up credits.
auto_topup_thresholdintegerBalance threshold (credits) below which agents can top up.
auto_topup_amountintegerNumber of credits added per automatic top-up.
Response
{
"auto_topup_enabled": false,
"auto_topup_threshold": 5000,
"auto_topup_amount": 50000
}Errors
Error responses
401unauthorizedMissing or invalid API key.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.
PATCH
/v1/billing/settingsResponse
Response fields
auto_topup_enabledbooleanUpdated auto top-up enabled flag.
auto_topup_thresholdintegerUpdated balance threshold in credits.
auto_topup_amountintegerUpdated credits amount per top-up.
Response
{
"auto_topup_enabled": true,
"auto_topup_threshold": 5000,
"auto_topup_amount": 50000
}Errors
Error responses
400bad_requestauto_topup_amount exceeds the maximum allowed value.
401unauthorizedMissing or invalid API key.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.