Skip to main content

Budget management

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.
    Enabling "Stop Service When Budget Reached" is not recommended for production environments. Once enabled, reaching the budget limit will automatically stop API calls, which may cause business interruptions.
  • 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.
Budget alert notifications have a daily limit for each notification channel. Each primary account UID can receive up to 5 in-site messages, 5 emails, 10 SMS messages, and 10 webhooks (bots) per day. Threshold alerts and budget-exhausted alerts share these limits; after a limit is reached, no further alerts are sent that day.

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.
Before enabling "Stop Service When Budget Reached", note the following limitations:
  • 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

No. Budget management only tracks pay-as-you-go API charges for Alibaba Cloud-provided models, excluding model training, preset throughput (PTU), and model unit (DTU) charges.
A third-party direct-supply model is provided directly by a third-party model provider, unlike an Alibaba Cloud-provided model, which Alibaba Cloud provides. In the Model Marketplace, a model with the "Third-party direct-supply" badge is a third-party direct-supply model. Its charges are not counted toward the budget: the budget only aggregates pay-as-you-go API charges for Alibaba Cloud-provided models, so it does not accumulate when only third-party direct-supply models are called. If "Stop Service When Budget Reached" is enabled, direct API calls to third-party direct-supply models are also restricted when the accumulated charges for Alibaba Cloud-provided models reach the budget limit.
No. The budget accumulates actual paid amounts. Savings plan deductions, coupon deductions, and other amounts that do not result in actual payment are not counted.
You can resume calls by:
  1. Increasing the budget limit on the Budget Management page.
  2. Turning off the "Stop Service When Budget Reached" toggle.
  3. If the service did not automatically recover after free quota was granted, manually adjust the budget threshold.
Service stop has a certain delay, and charges incurred during the delay will still be collected normally. We recommend monitoring alerts promptly when the alert threshold (such as 80%) is reached to avoid exceeding the budget.