Skip to main content

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 NameStatusDescription
hy-image-v3.5-previewCurrentHy-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.0DeprecatedHunyuan text-to-image v3.0; see Legacy Models
HY-Image-v3.0-I2I-ToB-v1.0.1DeprecatedHunyuan image-to-image v3.0; see Legacy Models
Legacy Model Deprecation Notice

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​

MethodDescription
sizeWidth/height in [256, 8192], area up to 4096x4096 (4K)
generate_max_pixels1048576 (1K), 2359296 (1.5K, default), 4194304 (2K)
NeitherThe model decides based on prompt semantics; defaults to the 1.5K tier

Parameters​

ParameterTypeRequiredDescription
modelstringYesFixed to hy-image-v3.5-preview
messagesArray<object>YesConversation content; text and reference images are mixed as content blocks
sizestringNoImage size; when set, output is forced to this size
seedintegerNoGeneration seed in [0, 2^63-1]
footnotestringNoBottom-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 footnote parameter
  • 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 seed to 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.