tencent/hunyuan-image/2.1
Hunyuan Image 2.1 is Tencent's advanced text-to-image AI model. Create photorealistic images, illustrations, and concept art from natural language descriptions with exceptional detail and prompt adherence.
Example output — click Run to generate your own
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
https://api.sandbase.ai/v1/runtencent/hunyuan-image/2.1Input Schema
8 parameters · 1 required · 7 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Required | The text prompt to generate an image from. |
seed | integer | Optional | Random seed for reproducible results. If None, a random seed is used. |
use_refiner | boolean | Optional | Enable the refiner model for improved image quality. · Default: false |
aspect_ratio | string | Optional | The aspect ratio of the generated image. · Options: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 21:916:93:24:35:41:14:53:42:39:16 |
use_reprompt | boolean | Optional | Enable prompt enhancement for potentially better results. · Default: true |
output_format | string | Optional | The format of the generated image. · Options: jpeg, png · Default: "png" jpegpng |
guidance_scale | number | Optional | Controls how much the model adheres to the prompt. Higher values mean stricter adherence. · Min: 1 · Max: 20 · Default: 3.5 |
num_inference_steps | integer | Optional | Number of denoising steps. · Min: 1 · Max: 50 · Default: 28 |
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "tencent/hunyuan-image/2.1",
"prompt": "A cute, cartoon-style anthropomorphic penguin plush toy, standing in a painting studio, wearing a red knitted scarf and beret.",
"use_refiner": false,
"use_reprompt": true,
"output_format": "png",
"guidance_scale": 3.5,
"num_inference_steps": 28
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"API README
Hunyuan Image
Hunyuan Image occupies a clearly bounded position in a image production pipeline under the route tencent/hunyuan-image/2.1. It is best evaluated as a named workflow endpoint rather than as a generic substitute for neighboring versions: planners can assign the route to a specific brief, record the chosen revision, and keep approval history tied to one predictable integration surface from intake through delivery.
A practical rollout of Hunyuan Image should begin with source-readiness checks, ownership of the submitted material, an agreed budget, and a written definition of the final 2.1 deliverable. Before automation is enabled, the acceptance pass should verify that the returned asset opens correctly, fits the intended downstream toolchain, satisfies the project’s review criteria, and can be reproduced from the stored request and route identity tencent/hunyuan-image/2.1.
Highlights
- Distinct output behavior. For Hunyuan Image, for Hunyuan Image, create visual work from a required written prompt In Hunyuan Image, this capability is applied through the exact tencent/hunyuan-image/2.1 workflow with seed as a relevant request control; the seed control exposes the corresponding choice in this route; the seed control exposes the corresponding choice in this route.
- Creative control. For Hunyuan Image, for Hunyuan Image, select one of ten landscape, square, or portrait ratios In Hunyuan Image, this capability is applied through the exact tencent/hunyuan-image/2.1 workflow with prompt as a relevant request control; the prompt control exposes the corresponding choice in this route; the prompt control exposes the corresponding choice in this route.
- Workflow fit. For Hunyuan Image, for Hunyuan Image, reprompting defaults on, while the refiner defaults off In Hunyuan Image, this capability is applied through the exact tencent/hunyuan-image/2.1 workflow with use refiner as a relevant request control; the use refiner control exposes the corresponding choice in this route; the use refiner control exposes the corresponding choice in this route.
- Production detail. For Hunyuan Image, for Hunyuan Image, adjust guidance and denoising steps, then reuse a seed for comparison In Hunyuan Image, this capability is applied through the exact tencent/hunyuan-image/2.1 workflow with aspect ratio as a relevant request control; the aspect ratio control exposes the corresponding choice in this route; the aspect ratio control exposes the corresponding choice in this route.
Pricing
| Configuration | Price |
|---|---|
| Per request | $0.1 |
When to Use
| Scenario | Why this model fits |
|---|---|
| Choose Hunyuan Image | Use it when the required deliverable is specifically the image result documented for tencent/hunyuan-image/2.1. |
| Match the source material | Select this route when your inputs naturally map to seed, prompt, use_refiner, aspect_ratio. |
| Use its distinguishing capability | For Hunyuan Image, create visual work from a required written prompt In Hunyuan Image, this capability is applied through the exact tencent/hunyuan-image/2.1 workflow with seed as a relevant request control; the seed control exposes the corresponding choice in this route |
| Plan repeatable production | For Hunyuan Image, select one of ten landscape, square, or portrait ratios In Hunyuan Image, this capability is applied through the exact tencent/hunyuan-image/2.1 workflow with prompt as a relevant request control; the prompt control exposes the corresponding choice in this route |
| Confirm cost and delivery | Use the pricing combinations below and the output contract above when budgeting or automating Hunyuan Image jobs. |
Prompt Guide
Build the request around the exact tencent/hunyuan-image/2.1 schema. Start with required fields, then add only the controls needed for the intended output; keep URLs reachable and enum values exactly as shown in Technical Specs.
{
"prompt": "A cute, cartoon-style anthropomorphic penguin plush toy, standing in a painting studio, wearing a red knitted scarf and beret.",
"seed": 0,
"use_refiner": false,
"aspect_ratio": "21:9"
}
Technical Specs
| Specification | Value |
|---|---|
| Model ID | tencent/hunyuan-image/2.1 |
| Execution mode | async |
| Required inputs | prompt |
| Request fields | seed (integer, optional); prompt (string, required); use_refiner (boolean, optional); aspect_ratio (string, optional, options: 21:9 / 16:9 / 3:2 / 4:3 / 5:4 / 1:1 / 4:5 / 3:4 / 2:3 / 9:16); use_reprompt (boolean, optional); output_format (string, optional, options: jpeg / png); guidance_scale (number, optional, min 1, max 20); num_inference_steps (integer, optional, min 1, max 50) |
| Output | url (string); content_type (string) |

