Skip to main content
PATCH
Update AI credit controls

Authorizations

Authorization
string
header
required

Can be either an Organization API Key or Personal Access Token (PAT).

Include in the Authorization header as: Bearer YOUR_TOKEN

Body

application/json
downgradeCredits
number | null

Credit usage at which AI downgrades to a cheaper model. Omit to leave unchanged, null to turn off, or a non-negative number to set. Must be less than or equal to shutoffCredits.

Required range: x >= 0
Example:

800

shutoffCredits
number | null

Credit usage at which AI shuts off entirely. Omit to leave unchanged, null to turn off, or a non-negative number to set.

Required range: x >= 0
Example:

1200

userDefaultCredits
number | null

Default per-user AI credit limit for the billing period. This limit is what what every user without an individual limit gets. Omit to leave unchanged, null for unlimited by default, or a non-negative number to set.

Required range: x >= 0
Example:

100

Response

Thresholds updated. Returns the full current state.

accountCreditLimit
number
required

Monthly AI credit limit for the whole Omni account, which is shared across every organization associated with the account. 0 when no limit is configured.

Required range: x >= 0
Example:

2000

creditsUsed
number
required

This organizations's credit usage for the current billing period.

Required range: x >= 0
Example:

450

downgradeCredits
number | null
required

Downgrade threshold, or null if the downgrade control is off.

Required range: x >= 0
Example:

800

periodEnd
integer
required

End of the current billing period as a Unix ms timestamp (UTC calendar-month boundary).

Required range: x >= 0
periodStart
integer
required

Start of the current billing period as a Unix ms timestamp (UTC calendar-month boundary).

Required range: x >= 0
shutoffCredits
number | null
required

Shutoff threshold, or null if the shutoff control is off.

Required range: x >= 0
Example:

1200

userDefaultCredits
number | null
required

Default per-user AI credit limit, or null when users are unlimited by default.

Required range: x >= 0
Example:

100