This topic describes the features, usage, and limits of the Flink AI service (built-in models) in Realtime Compute for Apache Flink.
Overview
Flink AI service (built-in models) is a managed AI model invocation capability of Realtime Compute for Apache Flink. You can call built-in models over the private network in Flink jobs without configuring an API-Key or PrivateLink, enabling streaming AI inference and embedding.
Core advantages
|
Feature |
Description |
|
Out-of-the-box |
No need to configure an API-Key, endpoint, or PrivateLink. |
|
Billed by token |
Token-based billing with clear, controllable costs. |
|
Multi-model support |
Multiple mainstream large models are built in, covering scenarios such as text generation, visual understanding, translation, and embedding. |
|
Global region coverage |
Available in multiple regions inside and outside the Chinese mainland, with automatic cross-region access. |
How it works
Enable and disable the service
Enable the service
Log on to the management console of Realtime Compute for Apache Flink. On the Flink AI Service page, click Activate.
-
The service must be enabled by a primary account or a RAM user that is granted the AliyunBSSOrderAccess and AliyunStreamFullAccess permissions.
-
Once enabled in a region, all workspaces in that region can use it.
-
This feature is pay-as-you-go. You are charged only for model invocations, not for enabling the feature. For details, see AI service billing (pay-as-you-go).
Disable the service
On the Flink AI Service page, click Disable Service and confirm the following:
-
After you disable the feature, all jobs in the region can no longer use the built-in model service.
-
Before you disable the feature, make sure that no jobs depend on the built-in models.
Service protection
To prevent unexpected business interruptions caused by accidental disabling of the service, you can enable service protection in the console.
After service protection is enabled, the system rejects all manual release requests initiated through the console, API, or CLI. This feature is supported only in the pay-as-you-go mode of Flink AI service and applies only to manual release operations. It does not take effect in the following scenarios in which the system automatically releases the service:
-
The service is disabled due to overdue payments on the account.
-
The service is forcibly released due to violations of cloud platform security rules.
Supported regions
International site
|
Flink AI service region |
Region ID |
Endpoint region |
Inference execution region |
|
China (Beijing) |
cn-beijing |
China (Beijing) |
Chinese mainland (dynamic scheduling) |
|
China (Zhangjiakou) |
cn-zhangjiakou |
||
|
China (Shanghai) |
cn-shanghai |
||
|
China (Hangzhou) |
cn-hangzhou |
||
|
China (Shenzhen) |
cn-shenzhen |
||
|
China (Chengdu) |
cn-chengdu |
||
|
Singapore |
ap-southeast-1 |
Singapore |
Regions outside the Chinese mainland (dynamic scheduling) |
|
China (Hong Kong) |
cn-hongkong |
||
|
Malaysia (Kuala Lumpur) |
ap-southeast-3 |
||
|
Indonesia (Jakarta) |
ap-southeast-5 |
||
|
Japan (Tokyo) |
ap-northeast-1 |
||
|
Korea (Seoul) |
ap-northeast-2 |
||
|
Thailand (Bangkok) |
ap-southeast-7 |
||
|
UAE (Dubai) |
me-east-1 |
||
|
Mexico |
na-south-1 |
||
|
US (Virginia) |
us-east-1 |
||
|
US (Silicon Valley) |
us-west-1 |
The region determines the physical location of data access and inference execution. Select a region based on your data compliance requirements.
-
Endpoint region: Determines the access point and data storage location.
-
Inference execution region: Where inference runs. Dynamically scheduled within a defined scope.
When you select a region outside the Chinese mainland, your business data is transferred across borders to the Singapore region and, as needed, dynamically scheduled to inference service nodes outside the Chinese mainland for computation. You must ensure that such cross-border data transfers comply with all applicable laws, regulations, and regulatory requirements, including but not limited to: the data being transferred does not contain any content that applicable laws restrict or prohibit from cross-border transfer; all necessary approvals or filing procedures have been completed; and all required notification obligations have been fulfilled and necessary consents have been obtained.
Built-in models
|
Model family |
Model |
Capabilities |
Supported regions |
|
Qwen |
qwen3.8-max |
Text generation, reasoning, visual understanding |
All |
|
qwen3.7-max |
Text generation, reasoning, visual understanding |
All |
|
|
qwen3.7-plus |
Text generation, reasoning, visual understanding |
All |
|
|
qwen3.6-plus |
Text generation, reasoning, visual understanding |
All |
|
|
qwen3.5-plus |
Text generation, reasoning, visual understanding |
All |
|
|
qwen3.7-flash |
Text generation, reasoning, visual understanding |
All |
|
|
qwen3.6-flash |
Text generation, reasoning, visual understanding |
All |
|
|
qwen3.5-flash |
Text generation, reasoning, visual understanding |
All |
|
|
qwen3.5-ocr |
OCR |
Chinese mainland |
|
|
qwen-vl-ocr |
OCR |
All |
|
|
qwen-mt-plus |
Translation |
All |
|
|
qwen-mt-flash |
Translation |
All |
|
|
DeepSeek |
deepseek-v4-flash-0731 |
Text generation, reasoning |
All |
|
deepseek-v4-pro |
Text generation, reasoning |
All |
|
|
GLM |
glm-5.2 |
Text generation, reasoning |
All |
|
Embedding |
qwen3.7-text-embedding |
Text embedding |
Chinese mainland |
|
text-embedding-v4 |
Text embedding |
All |
|
|
qwen3-vl-embedding |
Multimodal embedding |
Chinese mainland |
Usage
SQL
Specify the task and model parameters in the CREATE MODEL statement. You do not need to specify endpoint or api-key.
CREATE MODEL model_name
INPUT (column_name STRING)
OUTPUT (column_name {STRING | ARRAY<FLOAT>})
WITH (
'provider' = 'openai-compat | dashscope',
'task' = 'chat/completions | embeddings | multimodal-embedding',
'model' = '<model-name>'
);
For more details, see Model configuration.
Pyflink Dataframe
Specify task in set_model_provider and model in the function. Example:
pf.set_model_provider(pf.OpenAICompatProvider(task="chat/completions"))
questions = pf.from_dict({
"id": [1, 2],
"question": ["What is Flink?", "What is stream processing?"],
})
# default output column: output (STRING)
df = questions.llm.predict("question", model="qwen3.6-plus")
For more information, see AI/LLM functions.