Tencent
Hunyuan Image 3.0
hunyuan-image-3.0/text-to-image
Tencent Hunyuan image model that supports long Chinese and English prompts and text rendering within images, and can generate images from text or edit reference images by instruction, making it suitable for e-commerce visuals, advertising creative, and poster layout
Try hunyuan-image-3.0/text-to-image
Input
Output
Pricing
hunyuan-image-3.0/text-to-image $0.1498 $0.11984 per image
Overview
Text-to-image route of Tencent Hunyuan Image 3.0, generating still images from Chinese or English text descriptions. It supports prompts up to 8000 characters and negative prompts to exclude unwanted elements, and offers five fixed roughly 1MP aspect ratio presets, guidance scale, inference steps, and random seed control. Each request can generate 1 to 4 images (PNG or JPEG), suited to developers and design teams that need reliable output of visual concepts, e-commerce displays, advertising creatives, game art, and social media images.
Key Highlights
- Fine-grained parameter control — aspect ratio, prompt guidance scale, inference steps, and random seed can all be adjusted independently; a fixed seed makes it easy to iterate repeatedly on the same composition direction.
- Up to 4 images per request — each request supports batch generation of 1 to 4 images, billed by the actual number of images, ideal for quickly comparing multiple visual options.
- Long Chinese/English prompts and negative exclusion — supports Chinese/English prompts up to 8000 characters to describe details and in-image text, and negative prompts up to 2000 characters to exclude unwanted elements such as blur or distortion.
- Optional automatic prompt expansion — off by default to preserve intent; when enabled, the model first expands a short description before generating, lowering the barrier to writing long prompts.
Capabilities
- Text-to-image and negative exclusion: enter a Chinese or English prompt to generate a still image; optionally fill in a negative prompt (up to 2000 characters) to remove unwanted visual elements.
- Five aspect ratios and dual output formats: provides five roughly 1MP aspect ratio presets — square 1:1 (default), portrait 4:3, portrait 16:9, landscape 4:3, and landscape 16:9 — with output in PNG (default) or JPEG.
- Batch generation and cost control: 1 to 4 images per request (default 1), billed linearly by the number of images generated, suited to trying a single image first and then increasing the count.
- Guidance scale and inference step adjustment: prompt guidance scale ranges from 1 to 20 (default 7.5), with higher values following the description more closely; inference steps range from 1 to 50 (default 28), with more steps yielding fuller detail but longer processing time.
- Random seed and automatic expansion: specifying an integer seed reproduces similar results, while leaving it blank randomizes each time; automatic expansion (enable_prompt_expansion) is off by default and can be enabled as needed.
Use Cases
- Advertising and marketing asset generation — enter product selling points and lighting atmosphere, choose landscape 16:9 or 4:3, and batch-generate candidate images for online ad placements and landing page hero images.
- E-commerce product display concept images — describe product texture, display background, and lighting in Chinese, and output square or portrait images for detail pages and social media seeding.
- Game and concept art exploration — enter longer character or scene setting prompts and use a fixed seed to generate 1 to 4 options for early-stage style and composition selection.
- Social media and content images — generate in portrait aspect ratios and use negative prompts to filter out cluttered elements, directly usable for covers and feed images.
- Visual drafts with Chinese/English text elements — specify poster titles, signage, or label wording in the prompt to generate image references with text layout.
Limitations and Selection Advice
This route only supports generating still images from plain text; if you need to edit an existing image based on instructions, switch to the hunyuan-image-3.0/instruct-edit route in the same series. The prompt limit is 8000 characters and the negative prompt limit is 2000 characters; each request generates 1 to 4 images billed per image. Only five fixed aspect ratio presets at roughly 1MP are supported; custom pixel dimensions are not. Guidance scale is limited to 1 to 20 and inference steps to 1 to 50; a fixed seed only reproduces similar results and does not guarantee pixel-for-pixel consistency.
What's new
View changelog →- New model New model launch: Hunyuan Image 3.0 (text-to-image, instruct-edit)
Frequently asked questions
View all FAQs →-
How many images can this model generate at once?
Up to 4 images per request, set with num_images; the default is 1 image, billed per image. When you want to compare multiple options, setting it to 4 is simpler than making several requests; if you just want to check whether the direction is right, first use 1 image to validate the prompt, then generate in batches.
-
How do I choose the canvas size and aspect ratio?
Use image_size to choose a preset: square_hd (1:1), portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9; the default is square_hd. For vertical portraits, choose portrait_4_3 to better fit the composition; for horizontal scenes or banners, choose landscape_16_9. All sizes are at roughly the 1MP level; once the ratio is decided, then adjust the composition content.
-
How should I write prompts to get stable results?
Write in the order of "subject + attributes + action + scene + lighting + composition + style", in either Chinese or English, with a maximum length of 8000 characters. This model follows prompts fairly strictly, so spelling out all the elements is more effective than leaving room for imagination; when you need text in the image, write the characters to appear directly into the prompt and specify their position. Rendering accuracy is high for Chinese and English, but not guaranteed for other languages.
-
What should guidance_scale be set to?
For text-to-image, the default is 7.5 with a range of 1–20; for image editing, the default is 3.5 with a range of 2–20. If you want the image to follow the prompt more closely or adhere more strictly to the editing instructions, raise it, but too high a value sacrifices naturalness or loses detail from the original image; if you want to leave more room for interpretation, lower it. It is recommended to first fix one value and run the same prompt, and once you confirm it is stable, fine-tune it, to avoid changing multiple parameters at the same time.
Create a generation task
https://api.hiapi.sh/v1/tasks Headers
AuthorizationstringRequiredAccount API key. Required on every request. Example: Bearer YOUR_HIAPI_API_KEY. Get your API key
Content-TypestringOptionalThe request body is always parsed as JSON; when sent, only application/json (optionally with charset) is accepted — any other value returns 415. Example: application/json.
Idempotency-KeystringOptionalIdempotency key, up to 255 bytes. Retries with the same key from the same account create the task only once; replays return the original taskId.
On network timeouts or client retries, the same key creates the task only once — no double charges (scope: the API key's account). Use a business-unique identifier as the key (e.g. "order-42"); replays return the original taskId, and keys expire 24 hours after the first request. See the Unified Async API overview for the full scenario matrix.
Body
modelstringRequiredCurrent fixed value: hunyuan-image-3.0/text-to-image
routestringOptionalCurrent fixed value: default
inputobjectRequired
Business parameters for hunyuan-image-3.0/text-to-image and route default — see the parameter table below.
seedintegerOptionalRandom seed, integer. A fixed seed reproduces similar results; if left blank, it is random each time.
promptstringRequiredmaxLength 8000Prompt, required string, up to 8000 characters, describes the image you want to generate, supports Chinese and English.
image_sizestringOptionalDefault: "square_hd"Output aspect ratio preset, string, around the 1MP level, default square_hd (square 1:1); options are square_hd, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9.
square_hdportrait_4_3portrait_16_9landscape_4_3landscape_16_9num_imagesintegerOptionalDefault: 1min 1max 4Number of images to generate at once, integer, range 1–4, billed per image, default 1.
output_formatstringOptionalDefault: "png"File format of the output image, options are png or jpeg, default png.
pngjpegguidance_scalenumberOptionalDefault: 7.5min 1max 20Prompt guidance strength, numeric, range 1–20; higher values adhere more closely to the prompt, while too low a value deviates from the description; default 7.5.
negative_promptstringOptionalDefault: ""maxLength 2000Negative prompt, string, up to 2000 characters, specifies elements you do not want to appear (such as blur, low quality); default empty string.
num_inference_stepsintegerOptionalDefault: 28min 1max 50Number of inference steps, integer, range 1–50; more steps give more detail and take longer; default 28.
enable_prompt_expansionbooleanOptionalDefault: falseWhether to automatically expand the prompt, boolean; when enabled, the model expands the prompt before generating; default false.
callbackobjectOptional
Terminal-state notification config. When omitted, no callback is delivered — poll the task yourself. See the callback note below.
Provide callback.url when creating a task and HiAPI POSTs to your service once the task reaches a terminal state — no polling needed. The callback payload mirrors the task detail structure; signature verification, delivery retries and idempotency are documented on the Unified Async API overview page.
urlstringRequiredRequired when callback is present. A POST is sent to this URL once the task reaches a terminal state; must be a valid http(s) URL.
whenstringOptionalDefault: "final"Only final is supported today — notified on both success and fail.
finalstoragestringOptionalDefault: "temp"Artifact storage tier: temp (default, retained about 7 days) or persistent (long-term, billed by size). Insufficient balance or exceeding the storage cap silently downgrades to temp; the effective tier is shown in the task detail response.
temppersistentRequest examples
# Submit an async task; returns a taskId immediately (no waiting for generation)
curl -X POST "https://api.hiapi.sh/v1/tasks" \
-H "Authorization: Bearer $HIAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "hunyuan-image-3.0/text-to-image",
"input": {
"prompt": "…",
"image_size": "square_hd",
"num_images": 1,
"output_format": "png",
"guidance_scale": 7.5,
"negative_prompt": "",
"num_inference_steps": 28,
"enable_prompt_expansion": false
}
}' const res = await fetch("https://api.hiapi.sh/v1/tasks", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HIAPI_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "hunyuan-image-3.0/text-to-image",
input: {
"prompt": "…",
"image_size": "square_hd",
"num_images": 1,
"output_format": "png",
"guidance_scale": 7.5,
"negative_prompt": "",
"num_inference_steps": 28,
"enable_prompt_expansion": false
}
}),
});
const task = await res.json();
// { code: 200, message: "success", data: { taskId } } import os, requests
res = requests.post(
"https://api.hiapi.sh/v1/tasks",
headers={"Authorization": f"Bearer {os.environ['HIAPI_API_KEY']}"},
json={
"model": "hunyuan-image-3.0/text-to-image",
"input": {
"prompt": "…",
"image_size": "square_hd",
"num_images": 1,
"output_format": "png",
"guidance_scale": 7.5,
"negative_prompt": "",
"num_inference_steps": 28,
"enable_prompt_expansion": False
}
},
)
print(res.json()) # { code, message, data: { taskId } } 200 OK
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-01HZTQ8BX2N3GM3YFK4Z9D7VQR"
}
} 400 Bad Request
{
"code": 400,
"message": "invalid request",
"data": null,
"error_code": "INVALID_REQUEST"
} Get task detail
https://api.hiapi.sh/v1/tasks/:id Response fields
taskIdstringRequiredTask ID, always prefixed with tk-hiapi-.
modelstringRequiredResolved full model name. Tasks submitted with the route parameter return base@route (e.g. gpt-image-2/text-to-image@ext); otherwise identical to the name passed at creation.
routestringOptionalPresent only when the task was submitted with an explicit route parameter; echoes the submitted value.
statusstringRequiredTask status.
queued Queued, not started yet.
handling Being processed.
archiving Processing finished, artifacts being prepared.
success Terminal: completed, artifacts available (output returned).
fail Terminal: failed (error returned).
After submission, check status: success and fail are terminal, everything else is non-terminal. Poll every 1–3 seconds until terminal. On success, download artifacts from output[].url and transfer them before expireAt; pass storage: "persistent" at creation time when long-term retention is needed.
creatednumberRequiredTask creation time (Unix seconds).
completednumberRequiredUnix seconds when the task reached a terminal state; fixed to 0 while not terminal.
outputarrayOptional
Present only when status == success. Artifact list — always an array; a single task may return multiple types at once (e.g. video + first_frame).
Array [ object ]
Array items
urlstringRequiredArtifact URL, directly downloadable.
typestringRequiredCurrent possible values: video, image, audio, first_frame, last_frame, thumbnail; more may be added later.
expireAtnumberRequiredUnix seconds until which the artifact remains accessible; download or transfer before it expires.
errorobjectOptional
Present only when status == fail.
codestringRequiredBusiness error code.
messagestringRequiredError description.
Response examples
Success
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-01HZTQ8BX2N3GM3YFK4Z9D7VQR",
"model": "happyhorse-1-0",
"status": "success",
"created": 1777282033,
"completed": 1777282099,
"output": [
{
"url": "https://cdn.hiapi.ai/tasks/.../video.mp4",
"type": "video",
"expireAt": 1777886899
}
]
}
} Processing (non-terminal)
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-...",
"model": "happyhorse-1-0",
"status": "archiving",
"created": 1777282033,
"completed": 0
}
} Failed
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-...",
"model": "happyhorse-1-0",
"status": "fail",
"created": 1777282033,
"completed": 1777282099,
"error": {
"code": "TASK_FAILED",
"message": "task failed"
}
}
} Articles
View all articles →Related Models
View all models →Same Type
-
Qwen Image 2.1 Alibaba $0.020 /image -
Krea 2 Medium Turbo Krea $0.021 /image -
Ideogram V4.5 Ideogram $0.011 /image -
Midjourney Midjourney $0.064 per call -
BRIA Product Shot Bria $0.058 /image -
Qwen Image 2.0 Alibaba $0.042 /image -
FIBO 2.0 Bria $0.057 /image -
MAI Image 2.7 Microsoft $0.015 /image -
FLUX.2 Black Forest Labs $0.035 /image -
FLUX.2 Klein 4B Black Forest Labs $0.0004 /image -
Google Virtual Try-On Google $0.107 /image -
FIBO 1.5 Bria $0.058 /image