All Products
Search
Document Center

E-MapReduce:AI Function

Last Updated:Apr 15, 2026

AI Function uses a pay-as-you-go model, billing you for the exact number of tokens the built-in model consumes in your StarRocks instance. In each billing cycle, the system automatically generates a detailed bill and deducts the corresponding fees, ensuring transparent, pay-for-what-you-use pricing.

Billing

Note

Each user receives a free quota of 1 million tokens for the first month. Usage exceeding this quota is billed at the standard rate.

Feature

Description

Billing rules

Fees are based on the token usage of the built-in model in your StarRocks instance. Billing rules vary by built-in model.

Model invocation fee: token usage within one hour × unit price for the region, model, and token type (input/output)

Billing cycle

Fees are calculated hourly on the hour (UTC+8). A new billing cycle begins after the settlement. At the end of each billing cycle, the system generates a bill and deducts the corresponding fees from your account. Billing data may be delayed. For details, see Understand Alibaba Cloud Bills.

Pricing

Important

Prices are subject to change. For the latest pricing, please refer to the product purchase page.

AI Function currently uses the qwen-plus model for inference. Input and output tokens are billed separately.

Region

Token range

Input price (USD/1k tokens)

Output price (USD/1k tokens)

  • China (Beijing)

  • China (Shanghai)

  • China (Hangzhou)

  • China (Shenzhen)

  • China (Qingdao)

  • China (Zhangjiakou)

  • China (Ulanqab)

0<T≤128K

0.000138

0.000344

128K<T≤256K

0.000414

0.003442

256K<T≤1M

0.000827

0.008257

  • Singapore

  • China (Hong Kong)

  • Germany (Frankfurt)

  • US (Virginia)

  • US (Silicon Valley)

  • Japan (Tokyo)

  • Indonesia (Jakarta)

  • Mexico (Queretaro)

0<T≤256K

0.000480

0.001440

256K<T≤1M

0.001440

0.004320

Billing examples

The following examples show how AI Function fees are calculated.

Billing conditions

Cost (USD)

  • Region: US (Virginia)

  • Function call: ai_query()

  • Input tokens: 750

  • Output tokens: 20

Cost = Input Cost + Output Cost

= 0.000480 × 750/1000 + 0.001440 × 20/1000

= 0.000360 + 0.000029

= USD 0.000389