Skip to main content
POST
/
partner
/
orgs
/
{orgId}
/
secrets
/
{secretId}
/
budget
Set or update a spend budget
curl --request POST \
  --url https://api.onecli.sh/v1/partner/orgs/{orgId}/secrets/{secretId}/budget \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "limitCents": 500
}
'
{
  "secretId": "<string>",
  "organizationId": "<string>",
  "limitCents": 500,
  "spentCents": 320
}

Authorizations

Authorization
string
header
required

API key obtained from the dashboard or GET /user/api-key

Path Parameters

orgId
string
required
secretId
string
required

Body

application/json
limitCents
integer
required

Spend ceiling in US cents (e.g. 500 = $5.00).

Required range: 1 <= x <= 100000000
Example:

500

period
enum<string>
required

monthly resets on the 1st of each month (UTC); total is a one-time lifetime cap.

Available options:
monthly,
total

Response

Budget saved

secretId
string

The partner LLM key this budget caps.

organizationId
string
limitCents
integer

Spend ceiling in US cents (e.g. 500 = $5.00).

Example:

500

period
enum<string>
Available options:
monthly,
total
spentCents
integer

Spend so far this period, in US cents. Updates within a few seconds of usage.

Example:

320