Skip to content

Hunyuan Image · v3 · Instruct · Edit

Integrate

Model id hunyuan-image/v3/instruct/edit
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/hunyuan-image/v3/instruct/edit?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

This request: ≈$0.174 174 API credits Run it on this page

Get API key
Tencent Image Editing #tencent#hunyuan-image#instruct#edit

Instruction-based image editing from up to 3 reference images, with optional prompt expansion

Tencent · Image

Your first result goes here

Build a request below and run it with your API key. Outputs are copied to our storage, kept forever or 7 days for free.

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

•required

Text instructions used to generate an image.

•required image_urls
Drop a file, or

Provide generation references by URL, with no more than 3 images in the list.

image_size default auto

Output image dimensions, either requested explicitly or chosen by the model when set to auto.

num_images default 1

Image count requested for generation.

Advanced output_format · guidance_scale · seed · enable_prompt_expansion · enable_safety_checker
output_format default png

File format for the resulting image.

default 3.5

Prompt-following strength: increase this value to make the model follow the prompt more strictly.

Reproducibility seed; None lets the system choose one at random instead of using a caller-specified value.

POST /run/hunyuan-image/v3/instruct/edit?wait=20 quote → $0.174
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/hunyuan-image/v3/instruct/edit?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About Hunyuan Image · v3 · Instruct · Edit

Edits images following a text `prompt`, using one to three reference images in `image_urls`. `image_size` defaults to auto, so the model picks the output size. Up to 4 images can be returned, `guidance_scale` runs from 1 to 20, and prompt expansion is on by default. Output is png or jpeg.

Parameters

Send either the canonical name or the native name, not both. Canonical names

NameType DefaultAllowed Description
promptrequired
Typestring
Text instructions used to generate an image.
image_sizeoptional
Typeobject
Defaultauto
autosquare_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
Output image dimensions, either requested explicitly or chosen by the model when set to auto.
num_imagesoptional num_outputs
Typeinteger
Default1
1 – 4
Image count requested for generation.
guidance_scaleoptional
Typenumber
Default3.5
≤ 20> 1
Prompt-following strength: increase this value to make the model follow the prompt more strictly.
enable_prompt_expansionoptional
Typeboolean
Defaulttrue
Prompt expansion through internal model recaptioning, enabled when set to true.
seedoptional
Typeinteger | null
Reproducibility seed; None lets the system choose one at random instead of using a caller-specified value.
enable_safety_checkeroptional
Typeboolean
Defaulttrue
Safety checker activation; true enables checking.
output_formatoptional
Typeenum
Defaultpng
jpegpng
File format for the resulting image.
image_urlsrequired images
Typeurl[] · image
Provide generation references by URL, with no more than 3 images in the list.
required Canonical name, also accepted

File parameters take a public https:// URL, a data: URI up to 10 MB, or the file_url of an upload. Files

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "hunyuan-image/v3/instruct/edit",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 174,
    "usd": "0.174",
    "charged": 174,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "image_urls": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200,
        "width": 1024,
        "height": 768
      }
    ],
    "seed": 42
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
images
array of object {url, content_type, file_name, file_size, width, height}List containing the generated images.
seed
integerBase seed used during generation.

More models: Image Editing

For AI agents: this page as Markdown is at https://doitong.com/developers/models/hunyuan-image/v3/instruct/edit.md. All models and guides: https://doitong.com/developers/llms.txt