Managed models
Managed models let you deploy AI models in the Hologres console with one click and call them through SQL, with no API key required.
Overview
Managed models upgrade Hologres AI Functions by removing the need for an external API key. Deploy models with one click from the Hologres console, then call them through SQL to perform text generation, translation, embedding, image understanding, speech-to-text, and video generation.
You invoke models as standard database functions, unifying data and AI in one SQL interface. Typical use cases:
-
Data enrichment and content generation: Batch-generate product descriptions, marketing copy, and social-media posts from existing data.
-
Retrieval-augmented generation (RAG): Build semantic search with embeddings to power Q&A systems and knowledge bases.
-
Multimodal retrieval: Combine text, image, and video embeddings to enable cross-modal search and recommendation.
-
Image generation: Generate product hero images, ad creatives, and design drafts at scale from text prompts or reference images.
-
Video generation: Automatically produce marketing shorts and product showcase videos from scripts or image assets.
-
Multimedia analysis: Extract structured information from unstructured data such as images, audio, and video.
-
Data cleansing and translation: Embed translation, summarization, classification, and entity extraction directly into ETL pipelines.
Limits
Instance version requirements
Managed models require a supported Hologres instance version.
Supported instance versions: Hologres V4.0.40 or later, V4.1.26 or later, V4.2.5 or later, or V5.0 or later.
Upgrade your instance from the Hologres console if needed.
Supported regions
Available regions:
-
China (Beijing)
-
China (Shanghai)
-
China (Hangzhou)
-
China (Shenzhen)
-
Singapore
Model resource billing
Purchase model resources
Purchase Hologres AI model resources from the AI model resource purchase page before using managed models.
When purchasing resources, note:
-
Pay-as-you-go: Billed based on actual usage with no upfront fees.
-
Region selection: Select the same region as your Hologres instance to avoid cross-region charges.
-
Billing dimensions: Billing units vary by model: token count, image count, video duration, or audio duration.
Pricing details
For per-model pricing, see Managed models billing.
Model management
Model catalog
Hologres managed models support text generation, translation, embedding, image generation/editing, speech-to-text, and video generation. The following table lists the model category, model_type, task type, input/output, notes, and API access for each model.
|
Model category |
model_type |
Task type |
Input/Output |
Notes |
API access |
|
Text generation |
qwen3.8-max |
chat/completions |
Text input, text output |
Supported parameters: temperature, top_p, and max_tokens |
Supported |
|
qwen3.7-max |
chat/completions |
Text input, text output |
Supported parameters: temperature, top_p, max_tokens |
Supported |
|
|
qwen3.7-plus |
chat/completions |
Text input, text output |
Supported parameters: temperature, top_p, max_tokens |
Not supported |
|
|
qwen3.6-plus |
chat/completions |
Text input, text output |
Supported parameters: temperature, top_p, max_tokens |
Not supported |
|
|
qwen3.6-flash |
chat/completions |
Text input, text output |
Supported parameters: temperature, top_p, max_tokens |
Not supported |
|
|
deepseek-v4-pro |
chat/completions |
Text input, text output |
Supported parameters: temperature, top_p, max_tokens |
Supported |
|
|
glm-5.2 |
chat/completions |
Text input, text output |
Supported parameters: temperature, top_p, max_tokens |
Supported |
|
|
deepseek-v4-flash |
chat/completions |
Text input, text output |
Supported parameters: temperature, top_p, max_tokens |
Supported |
|
|
Translation |
qwen3-vl-plus |
chat/completions |
Image/video input, text output |
Supported parameters: temperature, top_p, max_tokens |
Not supported |
|
qwen-mt-plus |
translation |
ai_translate |
Supported parameters: source_lang, terms, tm_list, domains |
Not supported |
|
|
Embedding |
text-embedding-v4 |
embedding |
ai_embed, text input, float[] output |
Embedding dimensions: 1,024 (default), 768, 512, 256, 128, 64 |
Not supported |
|
qwen3-vl-embedding |
embedding |
ai_embed, text/image/video input, float[] output |
Embedding dimensions: 2,560 (default), 2,048, 1,536, 1,024, 768, 512, 256 |
Not supported |
|
|
qwen3.7-text-embedding |
embedding |
ai_embed, text input |
Embedding dimensions: 2,560, 2,048, 1,536, 1,024 (default), 768, 512, and 256 |
Not supported |
|
|
Image generation/editing |
qwen-image-2.0-pro |
image-generation |
Supports image editing and text-to-image generation |
— |
Not supported |
|
wan2.7-image-pro |
image-generation |
Text-to-image (non-batch); supports 4K high-definition output |
— |
Not supported |
|
|
Speech-to-text |
fun-asr |
speech-to-text |
Speech recognition |
— |
Not supported |
|
Video generation |
wan2.7-t2v |
video-generation |
Text-to-video generation |
— |
Not supported |
|
wan2.7-i2v |
video-generation |
Multimodal (text, image, video, audio) to video |
— |
Not supported |
|
|
wan2.7-r2v |
video-generation |
Multimodal (text, image, video, audio) to video |
— |
Not supported |
|
|
wan2.7-videoedit |
video-generation |
Accepts multimodal input (text, image, video) and performs multiple video generation and editing tasks |
— |
Not supported |
|
|
happyhorse-1.0-t2v |
video-generation |
Text-to-video generation |
— |
Not supported |
|
|
happyhorse-1.0-i2v |
video-generation |
First-frame image-to-video generation |
— |
Not supported |
|
|
happyhorse-1.0-r2v |
video-generation |
Reference-based video generation |
— |
Not supported |
|
|
happyhorse-1.0-video-edit |
video-generation |
Video editing |
— |
Not supported |
|
|
happyhorse-1.1-t2v |
video-generation |
Text-to-video generation |
— |
Not supported |
|
|
happyhorse-1.1-i2v |
video-generation |
First-frame image-to-video generation |
— |
Not supported |
|
|
happyhorse-1.1-r2v |
video-generation |
Reference-based video generation |
— |
Not supported |
Deploy a model
After purchasing model resources, deploy managed models from the Hologres console:
-
Log on to the Hologres console and go to the details page of the target instance.
-
In the left-side navigation pane, choose AI Model to open the model management page.
-
Click Deploy Model.
-
Set the model provider to Hologres-managed model.
-
Select the model categories you need. You can deploy multiple models at once.
-
Configure parameters for each model (defaults usually work) and set the retry mechanism.
-
Click Confirm to complete the deployment.
-
After deployment, view deployed models and their status on the model list page.
Model usage
After a model is deployed, you can call it in either of the following ways:
-
Call the model through an AI Function: Run SQL statements to call an AI Function. This method suits scenarios in which you process data directly in the warehouse.
-
Call the model through the API: Call the AI Function API. This method suits scenarios in which you reuse a deployed model from an application or an AI agent outside Hologres. Only some models support this method. For more information, see the API access column in Model catalog.
Call managed models through AI Functions
After deployment, call models through SQL AI Functions. Hologres provides AI Functions for text generation, embedding, translation, image understanding, speech-to-text, and video generation. For the full list and usage details, see AI functions.
The system assigns a default model to each AI Function. To view the current mapping:
SELECT * FROM list_ai_function_infos();
Sample output:
function_name | model_name
----------------------+------------------
ai_embed | my_gte_embedding
ai_classify | my_qwen32b
ai_extract | my_qwen32b
To change the default model for an AI Function:
SELECT set_ai_function_info('<FUNCTION_NAME>', '<MODEL_NAME>');
Example:
SELECT set_ai_function_info('ai_embed', 'my_gte_embedding');
Call managed models through the API
In addition to calling AI Functions through SQL, you can invoke some managed models over an HTTP API. The API provides a public endpoint for AI Functions, so AI agents such as OpenClaw and Hermes can call your deployed models directly. You can then reuse your deployed models from applications outside Hologres.
Before you call a managed model through the API, note the following:
-
Create an API Key in the Hologres console before you make any calls. You can create multiple API Keys.
-
The API currently supports only the Anthropic protocol.
-
The endpoint uses the format
hologres-token-<REGION_ID>.hologres.aliyuncs.com. Replace<REGION_ID>with the ID of the region where your instance is located. -
To check whether a model supports API calls, see the API access column in Model catalog.
Example:
curl http://hologres-token-cn-hangzhou.hologres.aliyuncs.com:80/anthropic/v1/messages \
-H "x-api-key: <API_KEY>" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{"model":"glm-5.2","max_tokens":1024,"messages":[{"role":"user","content":"Hello"}]}'
Monitor token consumption
You can view detailed token consumption in the Hologres slow query log. The extended_cost field records the token usage of each call.
Sample query:
SELECT query, extended_cost, *
FROM hologres.hg_query_log
WHERE query LIKE '%ai_gen%'
AND query_start >= now() - interval '1 hour'
ORDER BY query_start DESC;
The following example shows the extended_cost value in the result:
{
"qe_model_usage": {
"TokenModelUsage": {
"qwen3.7-max": {
"tiers": {
"0-unlimited": {
"input_tokens": 703,
"output_tokens": 151,
"cache_creation_input_tokens": 0,
"explicit_cache_tokens": 0,
"implicit_cached_tokens": 0,
"total_cached_tokens": 0,
"total_tokens": 854
}
},
"total_tokens": 854
}
}
}
}
End-to-end workflow
1. Purchase model resources
Purchase Hologres AI model resources from the AI model resource purchase page. Billing is pay-as-you-go based on actual usage.
2. Deploy the models
After purchasing resources, open the instance details page in the Hologres console, go to the AI Model tab, select Hologres-managed model as the provider, and deploy the models you need.
This example deploys the following models for the AI Function calls in step 3:
-
qwen3.7-plus: Text generation model for inference tasks.
-
text-embedding-v4: Embedding model for vector representations.
3. Call AI Functions
After deployment, call models through SQL AI Functions. For the full list and usage details, see AI functions.
Example 1: Text inference (with qwen3.7-plus)
-- Use a managed model for text generation
SELECT ai_gen('qwen3.7-plus', 'Generate an engaging description for the following product: wireless noise-cancelling headphones');
Example 2: Embedding (with text-embedding-v4)
-- Use a managed model to generate embeddings
SELECT ai_embed('text-embedding-v4', 'Hologres is a real-time data warehouse product');
Security and compliance
-
Data privacy: Alibaba Cloud is committed to protecting your data privacy. Your conversation data is retained only for the minimum period required to deliver the service and is never used to train models. Data transmitted while you build applications or train large models is encrypted with AES-256 (Advanced Encryption Standard) to keep it secure.
-
AI-generated content is for reference only: The output of this service is generated by artificial intelligence models. Alibaba Cloud cannot fully guarantee that the content is secure, reliable, compliant, complete, or accurate, and the content does not represent the position or views of Alibaba Cloud. Evaluate the output carefully against your own circumstances, and do not perform critical operations based on generated content without verifying it first. Alibaba Cloud is not liable for any loss arising from decisions or actions that you take based on the generated content.