Comparison
Hunyuan-Image-3.0 Text-to-Image vs Instruct-Edit: Pricing, Parameters, and Two-Stage Workflow
Compare both Hunyuan-Image-3.0 endpoints on HiAPI side by side and chain them into a reliable generate-then-edit production pipeline.
- Model
- hunyuan-image-3.0
On this page
The Hunyuan Image 3.0 family on HiAPI ships as two specialized endpoints: hunyuan-image-3.0/text-to-image for generating scenes from scratch and hunyuan-image-3.0/instruct-edit for instruction-driven editing of 1 to 3 input images. Understanding where their schemas and defaults diverge prevents 422 validation errors and lowers iteration cost.
Side-by-Side Comparison
| Dimension | hunyuan-image-3.0/text-to-image | hunyuan-image-3.0/instruct-edit |
|---|---|---|
| Primary Role | Generate new images from text prompts | Edit, restyle, or combine 1–3 existing images via natural-language instructions |
| HiAPI Flat Price | $0.1498 / image (74,900 quota) | $0.1349 / image (67,450 quota) |
| Required Inputs | prompt | prompt, image_urls (1–3 image URLs) |
image_size Presets | 5 ~1MP presets (square_hd default, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9) | Same 5 ~1MP presets (square_hd default; upstream auto is not exposed on HiAPI) |
num_images | 1–4 (default 1) | 1–4 (default 1) |
guidance_scale | 1–20 (default 7.5) | 2–20 (default 3.5) |
enable_prompt_expansion | Boolean (default false) | Boolean (default true) |
negative_prompt | Supported (default "") | Not exposed — put exclusions directly in prompt |
num_inference_steps | 1–50 (default 28) | Not exposed |
output_format / seed | png (default) or jpeg; optional integer seed | png (default) or jpeg; optional integer seed |
When to Use Which Endpoint
- Start with
text-to-imagewhen you need an original hero visual, concept art, or product backdrop and want explicit control overnum_inference_stepsandnegative_prompt. - Switch to
instruct-editonce you have a base composition you want to keep—such as swapping a garment, changing material finishes, updating seasonal backgrounds, or applying a controlled style transfer without re-rolling the entire frame.
Two-Stage Generate-Then-Edit Workflow (Python)
A common production pattern is generating a clean lossless PNG master with hunyuan-image-3.0/text-to-image, then passing that output URL into hunyuan-image-3.0/instruct-edit for localized variants:
import os, time, requests
API_KEY = os.environ["HIAPI_API_KEY"]
HEADERS = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
BASE = "https://api.hiapi.ai/api/v1/tasks"
def run_task(model: str, payload: dict) -> list[str]:
r = requests.post(BASE, headers=HEADERS, json={"model": model, "input": payload}, timeout=30)
r.raise_for_status()
task_id = r.json()["data"]["id"]
while True:
poll = requests.get(f"{BASE}/{task_id}", headers=HEADERS, timeout=30).json()["data"]
if poll["status"] == "succeeded":
return [a["url"] for a in poll["artifacts"]]
if poll["status"] in ("failed", "cancelled"):
raise RuntimeError(poll)
time.sleep(2)
# Stage 1: Generate master asset ($0.1498)
master_urls = run_task("hunyuan-image-3.0/text-to-image", {
"prompt": "Minimalist studio photograph of a silver aluminum wireless speaker on a travertine plinth, soft diffused daylight, clean shadow, 85mm lens",
"image_size": "square_hd",
"num_inference_steps": 28,
"guidance_scale": 7.5,
"output_format": "png",
})
# Stage 2: Create localized colorway variant ($0.1349)
variant_urls = run_task("hunyuan-image-3.0/instruct-edit", {
"image_urls": [master_urls[0]],
"prompt": "Change the speaker body finish from silver aluminum to matte forest green anodized aluminum. Keep the travertine plinth, lighting direction, shadows, and framing unchanged.",
"image_size": "square_hd",
"guidance_scale": 3.5,
"enable_prompt_expansion": True,
"output_format": "png",
})
print("Variant:", variant_urls[0])
Key Migration Pitfalls to Avoid
- Do not pass
negative_promptornum_inference_stepstoinstruct-edit: HiAPI validates strictly against the route schema (additionalProperties: false) and rejects unknown keys. - Always pass an explicit
image_sizepreset: Do not send"auto"toinstruct-edit; choose one of the five supported ~1MP presets or omitimage_sizeto usesquare_hd. - Watch
guidance_scaledefaults: Instruct-Edit defaults to3.5(not7.5); overly high guidance on edits can over-sharpen untouched regions.
Related articles
View all articles →-
Comparison
eleven-v4-turbo Horizontal Comparison and Model Selection Guide: How to Choose a Speech Synthesis Integration
From capability boundaries and billing methods to migration costs, help teams make actionable TTS selection decisions
-
Comparison
gemini-3.8-flash-lite-tts Side-by-Side Comparison: A Practical Guide to TTS Model Selection and Migration
-
Comparison
How to Choose gemini-3.8-flash-tts: A Side-by-Side TTS Model Comparison and Integration Decision Guide