v5

latestOpenAPI 3.1.02026-08-025631,1012.8 MB
Organization Billing

Get Spending Caps

Get current spending cap configuration.

Returns spending cap settings including budget limits, alert thresholds, and current spending status.

Requirements:

  • Read permission

Example:

response = await client.get("/v1/organizations/billing/spending-caps")
print(f"Monthly budget: ${response['monthly_spending_budget_usd']}")
print(f"Hard cap enabled: {response['hard_cap_enabled']}")
print(f"Current spending: ${response['current_spending_usd']}")
get/v1/organizations/billing/spending-caps

Response

Successful Response

monthly_spending_budgetinteger nullable

Soft spending limit in USD cents (null = unlimited)

monthly_spending_budget_usdnumber nullable

Soft spending limit in USD

spending_alert_thresholdsinteger[]

Percentage thresholds for spending alerts

spending_alerts_enabledboolean

Whether spending alerts are enabled

spending_alerts_sentinteger[]

Alert thresholds triggered in current billing cycle

hard_spending_capinteger nullable

Hard spending limit in USD cents (null = no hard cap)

hard_spending_cap_usdnumber nullable

Hard spending limit in USD

hard_cap_enabledboolean

Whether hard spending cap is enforced

current_spending_centsinteger required

Current spending in current billing cycle (cents)

current_spending_usdnumber required

Current spending in current billing cycle (USD)

budget_percentage_usednumber nullable

Percentage of budget used (null if no budget set)

Example response

{
  "monthly_spending_budget": 10000,
  "monthly_spending_budget_usd": 100,
  "spending_alert_thresholds": [
    50,
    75,
    90,
    100
  ],
  "spending_alerts_sent": [
    50,
    75
  ],
  "hard_spending_cap": 50000,
  "hard_spending_cap_usd": 500,
  "current_spending_cents": 23450,
  "current_spending_usd": 234.5,
  "budget_percentage_used": 46.9
}