Overview
CloudBase AI provides text-to-image and image-to-image capabilities based on the Hunyuan large model. You can generate high-quality images through text descriptions or reference images.
Supported Models
| Model Name | Description |
|---|---|
HY-Image-3.0-Plus-4090-Tob-v1.0 | Hunyuan text-to-image v3.0, supports custom sizes, prompt rewriting, and thinking mode |
HY-Image-v3.0-I2I-ToB-v1.0.1 | Hunyuan image-to-image v3.0, supports passing reference images for generation |
The legacy hunyuan-image model will be discontinued on July 15, 2026 at 00:00. Please switch to HY-Image-3.0-Plus-4090-Tob-v1.0 as soon as possible. See the upgrade guide for details.
Supported Sizes
| Size | Aspect Ratio | Description |
|---|---|---|
1024x1024 | 1:1 | Square (default) |
1280x720 | 16:9 | Horizontal widescreen |
720x1280 | 9:16 | Vertical portrait |
1280x1280 | 1:1 | Square (large) |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model name, use HY-Image-3.0-Plus-4090-Tob-v1.0 |
prompt | string | Yes | Image description text, max 500 characters |
size | string | No | Image size, defaults to 1024x1024, see table above for options |
revise | { value: boolean } | No | Whether to enable prompt rewriting. When enabled, the model will automatically optimize the prompt to improve image quality |
enable_thinking | { value: boolean } | No | Whether to enable thinking mode. When enabled, image quality is higher but generation takes longer (approximately 60 seconds more) |
Image-to-Image Parameters
The HY-Image-v3.0-I2I-ToB-v1.0.1 model supports the following additional reference image parameters on top of the text-to-image parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
image_urls | list<string> | No | Reference image URL list, alternative to image, image takes precedence, max 10MB each, supports jpg/jpeg/png formats, max 1 image, at least one of image_urls and images must be non-empty |
images | list<string> | No | Reference image base64 list, alternative to image_url, image takes precedence, max 10MB each, supports jpg/jpeg/png formats, max 1 image |
Access Methods
Image generation supports the following access methods:
- wx-server-sdk — Suitable for WeChat Mini Program Cloud Function scenarios
- Node SDK — Suitable for Cloud Functions, Cloud Run, and other Node.js server-side scenarios
Limitations
- Image generation only supports server-side invocation (Cloud Functions/Cloud Run). Mini Program and Web clients need to call through Cloud Functions
- Generated image URLs expire after 24 hours. Upload to Cloud Storage for permanent access
- Maximum prompt length is 500 characters
- It is recommended to set Cloud Function timeout to 900 seconds (enabling revise adds ~10 seconds, enabling thinking adds up to 60 seconds)
Pricing
- Mini Program Growth Plan users: Use the plan's complimentary image generation resources at no extra cost
- Resource-Point Plan users: Deducted from plan resource points
FAQ
How to improve image quality?
- Enable
reviseto let the model optimize your prompt - Enable
enable_thinkingfor deeper understanding by the model (takes longer) - Write more detailed and specific prompts, including style, color tone, composition, etc.
Why does generation take so long?
Image generation itself takes relatively long, typically 10-30 seconds. Enabling revise or enable_thinking adds additional time. Make sure your Cloud Function timeout is set long enough.
What if the generated image URL has expired?
Image URLs are valid for 24 hours. It is recommended to upload the generated image to Cloud Storage immediately in your Cloud Function to obtain a permanent fileID. See the "Save Image to Cloud Storage" section in each SDK documentation for details.