Catalog

Set the organization's spend budget

Set or replace the ceiling. Requires organization owner or admin.

When the budget is reached, new MCPJam-billed work — chat turns, eval runs, computer starts — is refused for the whole organization until the window resets or an owner or admin raises the cap. Work already in flight finishes, and running computers keep going until they hibernate.

capUsd is stored as whole credits (1 credit = 1 cent), so it is rounded to the cent; the response reports what was kept. Changing the cap mid-window does not reset the spend counter, and does not re-announce a threshold the organization was already told about.

put/organizations/{organizationId}/spend-budget

Request body

capUsdnumber required

The ceiling in USD, rounded to the cent.

alertPercentsinteger[]

Whole percents of the cap to notify at. Defaults to [80]. 100 is not accepted: reaching the cap always notifies, so listing it would show the same threshold twice.

Response

The stored spend budget.

capUsdnumber nullable required

The ceiling in USD. null means uncapped.

capCreditsinteger nullable required

The same ceiling as the ledger stores it.

alertPercentsinteger[] required

Whole percents of the cap that notify owners and admins. Reaching the cap always notifies, whether or not 100 is listed.

spentUsdnumber required

MCPJam-billed spend so far in this window, in USD.

spentCreditsinteger required

The same spend as the ledger counted it.

windowStartAtinteger required

Start of the current billing window (epoch ms). Team and enterprise organizations run on their own subscription cycle; everyone else on the UTC month.

windowEndsAtinteger required

When the window resets and the counter returns to zero (epoch ms).

alertedPercentsinteger[] required

Thresholds already announced this window. Each fires once per window.

capReachedAtinteger nullable required

When the cap was reached this window, or null.

updatedAtinteger nullable required

When the budget was last changed (epoch ms).

minCapUsdnumber required

The smallest budget the platform accepts.

maxCapUsdnumber required

The largest budget the platform accepts.

supportedboolean required

False for a personal organization, which cannot have a budget.

Changes