---
title: "z-image-lora-trainer (balanced)"
method: POST
path: "/api/v1/z-image-lora-trainer"
tags: ["Image: Enhance"]
---

# z-image-lora-trainer (balanced)

`POST /api/v1/z-image-lora-trainer`

## Request

- Base URL: `https://api.muapi.ai`
- URL: `https://api.muapi.ai/api/v1/z-image-lora-trainer`
- Auth: one of:
  - API key in header `x-api-key`
  - OAuth 2 (client credentials, token URL `https://api.muapi.ai/oauth/token`)

Train custom image LoRA models from a dataset zip URL. Input: dataset zip URL, optional trigger_word, steps, learning_rate, lora_rank. Output: trained LoRA model weights URL. Use for: lora training, fine-tuning, custom style training, character lora.

## Query parameters

- `webhook` string
- `team_id` integer, nullable

## Headers

- `x-api-key` string
- `x-embed-code` string, nullable
- `x-agent-embed-code` string, nullable
- `x-whitelabel-studio` string, nullable
- `authorization` string, nullable

## Request body

- ZImageLoraTrainerRequest
  - `data` string, uri, required: URL to zip archive with images. Try to use at least 4 images in general the more the better. In addition to images the archive can contain text files with captions.
  - `trigger_word` string, nullable: Optional trigger word. If a caption file exists, it is prepended when not already present. Leave empty to enable no-caption training.
  - `steps` integer, nullable: Number of steps to train the LoRA on.
  - `learning_rate` number, nullable: Learning rate for training.
  - `lora_rank` integer, nullable: LoRA rank dimension.
  - `webhook_url` string, uri, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/muapi/apis/muapi-api.md) · [All operations](https://skmtc.dev/muapi/apis/muapi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/muapi/apis/muapi-api/revisions/e4b7374381e5?raw)
