Skip to main content

Get / Update Settings

Get and update auto top-up billing settings via /v1/billing/settings. A human enables auto top-up once; agents then maintain the credit balance autonomously.

The billing settings endpoints (GET and PATCH /v1/billing/settings) control whether AI agents can autonomously top up credits on your Talonic account. Auto top-up means an agent may call POST /v1/billing/topup to add a preconfigured number of credits whenever the balance falls below a threshold. A human must enable it and configure the threshold and amount before agents can use the top-up 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.

  • Read current settings with GET /v1/billing/settings.
  • Enable auto top-up and set threshold/amount with PATCH /v1/billing/settings.
  • Only users with write scope can modify settings — agents cannot enable auto top-up themselves.
GET/v1/billing/settings

cURL — Read billing settings

Response

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.
min_thresholdintegerLowest allowed auto_topup_threshold (1,000 credits).
min_amountintegerLowest allowed auto_topup_amount (1,000 credits).
max_amountintegerHighest allowed auto_topup_amount (500,000 credits).

Response

{
  "auto_topup_enabled": false,
  "auto_topup_threshold": 5000,
  "auto_topup_amount": 50000,
  "min_threshold": 1000,
  "min_amount": 1000,
  "max_amount": 500000
}

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/settings

Body parameters

auto_topup_enabledbooleanEnable or disable auto top-up for agents.
auto_topup_thresholdintegerBalance threshold (credits) below which agents can top up. Minimum 1,000. Default: 5000
auto_topup_amountintegerCredits added per top-up. Minimum 1,000, maximum 500,000. Default: 50000

cURL — Enable auto top-up

Response

The PATCH response returns the full merged settings object, including the platform limits, so a client can confirm the applied configuration in one round trip.

Response

{
  "auto_topup_enabled": true,
  "auto_topup_threshold": 5000,
  "auto_topup_amount": 50000,
  "min_threshold": 1000,
  "min_amount": 1000,
  "max_amount": 500000
}

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.