All Products
Search
Document Center

E-MapReduce:AI function pricing

Last Updated:Sep 10, 2026

AI Function is a built-in SQL AI inference capability in EMR Serverless StarRocks that lets you call qwen-series LLMs directly from SQL. This topic describes its billing rules, per-region per-model token pricing, and fee calculation examples. For available AI functions, invocation syntax, and related configuration items, see AI center.

Billing

Note

Each user receives a free quota of 1 million tokens for the first month. Any usage that exceeds this free quota is billed at standard rates.

Feature

Description

Billing rules

Charges are based on the token usage of built-in models. Billing rules vary by model:

  • qwen-plus/qwen3.5-plus/qwen3.6-plus/qwen3.7-max/qwen3.7-plus/qwen3.6-flash/qwen3.8-max/qwen3.7-flash/glm-5.2/deepseek-v4-pro/kimi-k3: Charges are based on both input tokens and output tokens. Input tokens that hit the context cache are charged at the cache hit price.

  • qwen-mt-plus: A translation model. Charges are based on both input tokens and output tokens.

  • qwen3-vl-embedding/tongyi-embedding-vision-plus/text-embedding-v4: Embedding models. Charges are based on input tokens only (no output token fees).

The fee for model calls is calculated as: token usage within 1 hour × Unit price for the corresponding region, model, and input/output

Context cache

For models that support the context cache, input tokens that hit the cache are charged at the cache hit price, which is 20% of the input price in the same region. For cache support and prices of each model, see the price tables below.

Billing cycle

Fees are settled hourly (UTC+8). At the end of each billing cycle, the system generates a bill and deducts the fees from your account. Billing data may lag behind actual usage. For details, see Understand Alibaba Cloud bills.

Pricing

Important

For the latest pricing, see the product purchase page.

Currently, AI Function supports inference with the following built-in models. Each model is billed separately for input and output tokens.

qwen-plus

Region

Token range

Input price ($/1k tokens)

Output price ($/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

qwen3.5-plus

Region

Token range

Input price ($/1k tokens)

Output price ($/1k tokens)

  • China (Beijing)

  • China (Shanghai)

  • China (Hangzhou)

  • China (Shenzhen)

0<T≤128K

0.000138

0.000826

128K<T≤256K

0.000344

0.002064

256K<T≤1M

0.000688

0.004128

  • China (Hong Kong)

  • Singapore

  • Germany (Frankfurt)

  • US (Virginia)

  • US (Silicon Valley)

  • Japan (Tokyo)

  • Indonesia (Jakarta)

  • Mexico (Queretaro)

0<T≤256K

0.000480

0.002880

256K<T≤1M

0.000600

0.003600

qwen3.6-plus

Region

Token range

Input price ($/1k tokens)

Output price ($/1k tokens)

  • China (Beijing)

  • China (Shanghai)

  • China (Hangzhou)

  • China (Shenzhen)

0<T≤256K

0.000331

0.001981

256K<T≤1M

0.001321

0.007927

  • China (Hong Kong)

  • Singapore

  • Germany (Frankfurt)

  • US (Virginia)

  • US (Silicon Valley)

  • Japan (Tokyo)

  • Indonesia (Jakarta)

  • Mexico (Queretaro)

0<T≤256K

0.000600

0.003600

256K<T≤1M

0.002400

0.007200

qwen3.7-max

qwen3.7-plus

qwen3.6-flash

qwen3.8-max

qwen3.7-flash

glm-5.2

deepseek-v4-pro

kimi-k3

qwen-mt-plus

Embedding models

Model

Billing type

Region

Input price ($/1K tokens)

qwen3-vl-embedding

image_embedding

China mainland regions

0.0003096

text-embedding-v4

context_embedding

China mainland regions

0.000086

text-embedding-v4

context_embedding

International regions

0.000084

tongyi-embedding-vision-plus

image_embedding

International regions

0.000108

Billing examples

The following examples show how AI Function fees are calculated.

Billing conditions

Fee (USD)

  • Region: US (Virginia)

  • Function called: ai_complete() (using the qwen-plus model)

  • Input tokens: 750

  • Output tokens: 20

Fee = Input fee + Output fee

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

= 0.000360 + 0.000029

= 0.000389 (USD)