Set monthly budget limits and alerts for model inference at the account, workspace, or API Key level, with optional auto-stop when the budget is exhausted.
Overview
Budget management allows you to set monthly budget limits and alerts for model inference, and optionally automatically restrict pay-as-you-go API calls when the budget is exhausted, providing flexible cost control at the account, workspace, or API Key level.
Log in to the Bailian console. In the left-side navigation pane, choose Cost and Usage > Budget Management to go to the Budget Management page.
You can set budgets independently at the account, workspace, and API Key levels. For details, see Budget dimensions.
Budget scope and statistics cycle
- Budget scope: Only includes pay-as-you-go API charges for Alibaba Cloud-provided models. Charges for third-party direct-supply models, model training, preset throughput (PTU), and model units (DTU) are not counted toward the budget. To identify how a model is supplied, check the "Alibaba Cloud-provided" or "Third-party direct-supply" badge on its card in the Model Marketplace.
- Budget accumulation: The budget accumulates actual paid amounts. Savings plan deductions, coupon deductions, and other amounts that do not result in actual payment are not counted toward the budget.
- Statistics cycle: Each calendar month, for example, September 1 00:00 to September 30 24:00.
Budget dimensions
You can set budgets independently at the following three dimensions:
Dimension | Scope | Description |
|---|---|---|
Account | All workspaces and API Keys under the primary account | Sets an account-level total budget, aggregating pay-as-you-go charges for Alibaba Cloud-provided models under the account. |
Workspace | A single workspace | Sets an independent budget for the specified workspace, counting only pay-as-you-go charges for Alibaba Cloud-provided models within that workspace. |
API Key | A single API Key | Sets an independent budget for the specified API Key, counting only pay-as-you-go charges generated by that Key for Alibaba Cloud-provided models. |
Set budget and alerts
On the Budget Management page, click Edit for a record in the table, or click the Set Budget button above the table. In the Set Budget and Alerts panel, configure the following options:
- Budget Target: Shows the dimension information, such as the primary account (all workspaces) and account ID.
- Monthly Budget Management: Enable to set a budget amount.
- Current Budget: When editing, shows the existing budget amount; shows "Not set" for first-time setup.
- New Budget: Enter the monthly budget limit (in CNY).
- Stop Service When Budget Reached: When enabled, the system automatically restricts pay-as-you-go calls for that dimension when costs reach the budget limit.
- Alert Threshold: Set a percentage of the budget (such as 80%). A notification is sent when costs reach this percentage. If the current month's cumulative cost percentage already meets or exceeds the threshold when you set or adjust it, no alert is sent for that threshold in the current month. The threshold is re-evaluated in the next calendar month. The threshold automatically calculates the alert amount based on the budget—for example, with a budget of ¥10,000 and a threshold of 80%, it displays "Send notification when consumption reaches 80% (¥8,000.00) of the budget". Click Set Notification Method to configure notification channels. Budget alert notifications support only basic reception (in-site messages, SMS, and email) and bot reception; voice reception is not supported.
Behavior when budget is reached
Budget alerts
When costs reach your configured alert threshold (such as 80% of the budget), as well as when the budget is exhausted (100%), the system sends a notification.
Stop service when budget is reached
If Stop Service When Budget Reached is enabled, the system automatically restricts pay-as-you-go calls for that dimension when costs reach the budget limit. Calls will return a 429 error. Example error message:
The budget configured in Budget Management has been exhausted. You will be unable to make further API calls until the budget limit is increased or reset.For detailed information about this error, see Error codes.
- Charges for third-party direct-supply models are not counted toward the budget. When the accumulated charges for Alibaba Cloud-provided models reach the budget limit, direct API calls to third-party direct-supply models are also restricted. For details, see the FAQ.
- PTU overflow and calls generated through applications do not yet support automatic stopping.
- If the service has been stopped after reaching the budget threshold, and free quota is subsequently granted, the stop state will not automatically recover. You must manually adjust the budget threshold to resume calls.
- Service stop has a certain delay, and charges incurred during the delay will still be collected normally.
FAQ
Does budget management include model training charges?
Does budget management include model training charges?
Are third-party direct-supply model charges counted toward the budget?
Are third-party direct-supply model charges counted toward the budget?
Are savings plan and coupon deductions counted toward the budget?
Are savings plan and coupon deductions counted toward the budget?
How do I resume calls after the budget is reached?
How do I resume calls after the budget is reached?
- Increasing the budget limit on the Budget Management page.
- Turning off the "Stop Service When Budget Reached" toggle.
- If the service did not automatically recover after free quota was granted, manually adjust the budget threshold.
Why are charges still incurred after reaching the budget limit?
Why are charges still incurred after reaching the budget limit?