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 | Status | Description |
|---|---|---|
hy-image-v3.5-preview | Current | Hy-Image-3.5-preview, Chat/Messages protocol, multimodal input, multi-round editing, up to 4K output, requires @cloudbase/js-sdk >= 3.11.0 |
HY-Image-3.0-Plus-4090-Tob-v1.0 | Deprecated | Hunyuan text-to-image v3.0; see Legacy Models |
HY-Image-v3.0-I2I-ToB-v1.0.1 | Deprecated | Hunyuan image-to-image v3.0; see Legacy Models |
The legacy hunyuan-image models (HY-Image-3.0-Plus-4090-Tob-v1.0, HY-Image-v3.0-I2I-ToB-v1.0.1) are deprecated. Migrate to hy-image-v3.5-preview (the cloudbase provider); see Hy-Image-3.5-preview and the upgrade guide.
Supported Sizes
| Method | Description |
|---|---|
size | Width/height in [256, 8192], area up to 4096x4096 (4K) |
generate_max_pixels | 1048576 (1K), 2359296 (1.5K, default), 4194304 (2K) |
| Neither | The model decides based on prompt semantics; defaults to the 1.5K tier |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Fixed to hy-image-v3.5-preview |
messages | Array<object> | Yes | Conversation content; text and reference images are mixed as content blocks |
size | string | No | Image size; when set, output is forced to this size |
seed | integer | No | Generation seed in [0, 2^63-1] |
footnote | string | No | Bottom-right watermark, up to 16 characters |
For the full parameter reference and multi-round editing, see Hy-Image-3.5-preview.
Access Methods
Image generation supports the following access methods:
- Text-to-Image — generate from text prompts
- Image-to-Image — reference images and multi-round editing
- Custom Watermark — the
footnoteparameter - JS SDK — Node.js server-side calls
- Mini Program — Direct generation inside a WeChat Mini Program
- 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
- Direct calls from a Mini Program require base library 3.17.4 or later. Browsers on the web are not supported yet — call through a Cloud Function instead
- Generated image URLs expire after 12 hours. Upload to Cloud Storage for permanent access
- Reference images: up to 20MB each and at most 20 images
- It is recommended to set the Cloud Function timeout to 900 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?
- Write more detailed and specific prompts, including style, color tone, composition, etc.
- Pass reference images via
image_url, or refine results with multi-round editing - Fix
seedto compare prompts consistently
Why does generation take so long?
Image generation itself takes relatively long, typically 10-30 seconds, and even longer for 4K. Make sure your Cloud Function timeout is set long enough.
What if the generated image URL has expired?
Image URLs are valid for 12 hours. Upload the generated image to Cloud Storage immediately in your Cloud Function to obtain a permanent fileID. See the "Save to Cloud Storage" section in JS SDK for details.