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 reaching the spend limit: When spending reaches a configured daily or monthly limit greater than 0, subsequent API requests for that project are rejected. Consumption statistics and limit enforcement may be delayed, and charges incurred during the delay must still be paid.
  • Amount: integer milli-cent (100,000 units = 1 USD). null means no budget configured for that period (unlimited); 0 means a zero budget.

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; when spending reaches a configured budget greater than 0, subsequent API requests for the project are rejected. Consumption statistics and limit enforcement may be delayed, and charges incurred during the delay must still be paid. Null means not configured (unlimited); 0 means a zero budget.

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

Monthly consume limit (milli-cent). Accumulates and resets at Asia/Shanghai month boundaries; when spending reaches a configured budget greater than 0, subsequent API requests for the project are rejected. Consumption statistics and limit enforcement may be delayed, and charges incurred during the delay must still be paid. Null means not configured (unlimited); 0 means a zero budget.

Required range: x >= 0