Skip to main content
PATCH
/
v1
/
ai
/
credit-controls
Update AI credit controls
curl --request PATCH \
  --url https://{instance}.omniapp.co/api/v1/ai/credit-controls \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "downgradeCredits": 800,
  "shutoffCredits": 1200
}
'
{
  "detail": "Bad Request: prompt: Required",
  "status": 400
}

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.

This value must be less than or equal to shutoffCredits. Omni checks this after your changes are applied on top of the current settings. This means that a single-field update can be rejected if it would violate that relationship.

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

Response

Thresholds updated. Returns the full current state.