hy-image-v3) through TokenHub: generate images synchronously from text prompts, with support for custom dimensions, generation seeds, automatic prompt rewriting, and image watermark footnotes.Model Name | model Parameter Value | Supported Capability | Prompt Limit | Size Range | Brief Description |
Hy-Image-3.0 | hy-image-v3 | Text-to-image/reference-based image generation (synchronous) | 8192 characters | Width and height [512, 2048], area ≤ 1024×1024 | Supports automatic prompt rewriting, 37 preset sizes, and custom watermark footnotes. |
size is not passed and the prompt specifies a size or aspect ratio, the model selects the closest match from 37 preset combinations. If neither is specified, the model predicts automatically. For details, see Appendix: Preset Size List.POST https://tokenhub-intl.tencentcloudmaas.com/v1/wand/hunyuan-image/v3-generationParameter Name | Required | Type | Description |
model | Yes | string | Model ID. Value: hy-image-v3 |
prompt | Yes | string | Text used for image generation. The string length cannot exceed 8192 characters. |
images | No | array[string] | Reference images, 0 to 3. Supports image URL or Base64. Format png/jpeg/jpg; size no more than 10 MB. |
size | No | string | Generated size, format ${width}x${height}.Constraints: 1. Both width and height must be within the range of [512, 2048] pixels. 2. The product of width and height (image area) must not exceed 1024×1024 pixels. If not specified, the model selects/predicts from 37 preset combinations. For details, see Appendix: Preset Size List. |
seed | No | integer | Generation seed. Range [1, 4294967295]. Takes effect only when the number of generated images is 1. If not specified or set to 0, a random seed is used by default. |
footnote | No | string | Custom watermark content, limited to 16 characters (regardless of Chinese or English), generated in the lower right corner of the image. |
revise | No | boolean | Whether to rewrite the prompt. |
curl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/hunyuan-image/v3-generation' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-H 'Content-Type: application/json' \\-d '{"model": "hy-image-v3","prompt": "An orange kitten on the windowsill looks toward the camera","size": "1024x1024"}'
Parameter Name | Type | Description |
id | string | id of this request. |
created | integer | Unix timestamp. |
data | list | Array of returned image generation content. |
data[n].url | string | The generated image URL is a temporary address valid for 12 hours. Download and save it promptly. |
data[n].revised_prompt | string | The revised prompt, returned when revise is enabled. |
request_id | string | Unique request identifier used for troubleshooting. |
tokenhub_usage | object | Usage consumption. |
tokenhub_usage.total_tokens | integer | Number of tokens consumed by this task, used for billing/reconciliation. |
{"id": "4-WandImage-a786becfdc80433b8cff4aa344c8fd3d","created": 1785125529,"data": [{"url": "https://aigc-image.cos.myqcloud.com/xxx/result.png","revised_prompt": "An orange kitten sits on a sunlit windowsill, turns to look at the camera, with detailed fur and a blurred background"}],"request_id": "3aec3299-06ad-4654-8b45-c57b823a15d2","tokenhub_usage": {"total_tokens": 1024}}
curl -o generated_image.png 'https://aigc-image.cos.myqcloud.com/xxx/result.png'
HTTP Status Code | Description | Handling Recommendation |
400 | The request format is incorrect. | Check the field types/values in the request body (such as size constraints, prompt length, and model name). |
401 | Authentication failed. | Check whether the API_KEY is valid and whether Authorization uses the Bearer format. |
422 | Input or output moderation failed (content security interception). | Input or output triggers content security moderation. Adjust the prompt or business policy. |
429 | The number of concurrent requests exceeds the limit. | The concurrency limit is reached. Retry with backoff and control the call concurrency. |
500 | Internal error. | A server exception occurs. Retry the request. If the failure persists, contact technical support and provide the request_id. |
size is not passed, the model selects/predicts from the following 37 combinations. When size is passed, the constraints must be met (width and height ∈ [512, 2048], product ≤ 1024×1024). The format is "width x height":2048 x 512 | 1984 x 512 | 1920 x 512 |
1856 x 512 | 1792 x 512 | 1728 x 512 |
1664 x 512 | 1600 x 512 | 1536 x 512 |
1472 x 576 | 1408 x 640 | 1344 x 704 |
1280 x 768 | 1216 x 832 | 1152 x 896 |
1088 x 960 | 1024 x 1024 | 960 x 1088 |
896 x 1152 | 832 x 1216 | 768 x 1280 |
704 x 1344 | 640 x 1408 | 576 x 1472 |
512 x 1536 | 512 x 1600 | 512 x 1664 |
512 x 1728 | 512 x 1792 | 512 x 1856 |
512 x 1920 | 512 x 1984 | 512 x 2048 |
768 x 1024 | 720 x 1280 | 1024 x 768 |
1280 x 720 | - | - |
size is ${width}x${height} (for example, 1024x1024). Both width and height must be within the range of [512, 2048], and the area must not exceed 1024×1024. We recommend using the combinations in Appendix: Preset Size List directly. If size is not passed, you can describe the aspect ratio in the prompt (for example, "landscape 16:9"), and the model will automatically select the closest preset size.data[n].url promptly after generation and save it to your own storage. Do not rely on this link for a long time.Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan