Skip to main content
GET
Get project spend limit
This endpoint requires an Admin Key with the org:read scope.

Budget semantics

  • Periods: daily_consume_limit accumulates over the Asia/Shanghai calendar day and monthly_consume_limit over the Asia/Shanghai calendar month, resetting at each period boundary.
  • Behavior after exceeding the budget: budgets drive spend management and usage-ratio display in the console project page — exceeding the budget does not block API calls, and usage beyond the budget is still billed (matching the console note “you are still charged for usage beyond your budget”). Consumption statistics lag by about 10 minutes. The organization-level overdraft_limit (billing brake, a hard stop) is a separate mechanism.
  • Amount: integer milli-cent (100,000 units = 1 USD). null means no budget configured for that period (unlimited); 0 means a zero budget (all usage is shown as over-budget, display only, never blocking).

Authorizations

Authorization
string
header
required

Send the Admin API secret as a Bearer token in the Authorization header (Bearer sk-admin-***). Create Admin Keys under Console → Organization → Admin API Keys.

Path Parameters

pid
string
required

Project ID.

Response

Spend limit. Null means unlimited.

daily_consume_limit
integer<uint64> | null
required

Daily consume limit (milli-cent). Accumulates and resets at Asia/Shanghai day boundaries; exceeding the budget does not block API calls and usage beyond it is still billed (spend management and usage-ratio display, not a hard stop). Null means not configured (unlimited); 0 means a zero budget (over-budget display only).

Required range: x >= 0
monthly_consume_limit
integer<uint64> | null
required

Monthly consume limit (milli-cent). Accumulates and resets at Asia/Shanghai month boundaries; exceeding the budget does not block API calls and usage beyond it is still billed (spend management and usage-ratio display, not a hard stop). Null means not configured (unlimited); 0 means a zero budget (over-budget display only).

Required range: x >= 0