Skip to content

Z Image Trainer

Integrate

Model id z-image-trainer
# 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/z-image-trainer?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image_data_url": "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: $2.26 2,260 API credits Run it on this page

Get API key
Alibaba Training #turbo#z-image#fast#trainer

Trains a LoRA for Z-Image Turbo from a zip of images, with content, style or balanced focus

Alibaba · File

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

URL of a zip archive of stylistically consistent images; at least 10 are recommended, and larger sets are preferable. For each image pair, edit instructions may be supplied in a matching text file named ROOT.txt, such as photo.txt. Missing text files fall back to default_caption; training fails if that fallback is also absent.

default 1000

Total count of steps for training.

Advanced training_type · default_caption · learning_rate
training_type default balanced

Training focus: 'content' emphasizes image content, 'style' emphasizes image style, and 'balanced' combines both.

Caption used in place of missing caption files, with None making their absence an error instead.

default 0.0001

Learning rate used for parameters that can be trained.

POST /run/z-image-trainer?wait=20 quote → $2.26
# 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/z-image-trainer?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image_data_url": "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 Z Image Trainer

Fine-tunes a LoRA on your own images supplied as a zip archive, ideally at least 10, optionally with a caption text file per image. Set `training_type` to content, style or balanced, `steps` from 100 to 10000, and `learning_rate`. A `default_caption` fills in for missing captions. Outputs the LoRA weights and a config file.

Parameters

NameType DefaultAllowed Description
image_data_urlrequired
Typestring
URL of a zip archive of stylistically consistent images; at least 10 are recommended, and larger sets are preferable. For each image pair, edit instructions may be supplied in a matching text file named ROOT.txt, such as photo.txt. Missing text files fall back to default_caption; training fails if that fallback is also absent.
stepsoptional
Typeinteger
Default1000
100 – 10,000
Total count of steps for training.
learning_rateoptional
Typenumber
Default0.0001
Learning rate used for parameters that can be trained.
default_captionoptional
Typestring | null
Caption used in place of missing caption files, with None making their absence an error instead.
training_typeoptional
Typeenum
Defaultbalanced
contentstylebalanced
Training focus: 'content' emphasizes image content, 'style' emphasizes image style, and 'balanced' combines both.
required

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "z-image-trainer",
  "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": 2260,
    "usd": "2.26",
    "charged": 2260,
    "refunded": 0
  },
  "input": {
    "image_data_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "output": {
    "diffusers_lora_file": {
      "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
    },
    "config_file": {
      "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
    }
  },
  "outputs": [
    {
      "type": "file",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "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
diffusers_lora_file
object {url, content_type, file_name, file_size}URL pointing to the trained LoRA weights in diffusers format.
config_file
object {url, content_type, file_name, file_size}URL pointing to the trained model's configuration file.

For AI agents: this page as Markdown is at https://doitong.com/en-US/developers/models/z-image-trainer.md. All models and guides: https://doitong.com/developers/llms.txt