Z-Image Base LoRA Trainer API: Lora Support

Use Z-Image Base LoRA Trainer with Z-Image Base LoRA Trainer via the Muapi REST API. Pay per generation — no subscription needed.

Z-Image Base LoRA Trainer API Reference

Endpoint

POST https://api.muapi.ai/api/v1/z-image-base-lora-trainer

Submit a job with your MuApi API key in the x-api-key header, then poll https://api.muapi.ai/api/v1/predictions/{request_id}/result until status is completed.

Parameters

NameTypeRequiredDescription
datastringYesURL 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_wordstringNoOptional trigger word. If a caption file exists, it is prepended when not already present.
stepsintNoNumber of steps to train the LoRA on.Default: 1000
learning_ratefloatNoLearning rate for Z-Image Base LoRA training.Default: 0.0001
lora_rankintNoLoRA rank dimension.Default: 16

cURL example

REQUEST_ID=$(curl -s -X POST https://api.muapi.ai/api/v1/z-image-base-lora-trainer \
  -H "x-api-key: $MUAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data":"<data>"}' | jq -r .request_id)

curl -s https://api.muapi.ai/api/v1/predictions/$REQUEST_ID/result -H "x-api-key: $MUAPI_API_KEY"

Python example

import os, time, requests

API = "https://api.muapi.ai/api/v1"
headers = {"x-api-key": os.environ["MUAPI_API_KEY"]}

r = requests.post(f"{API}/z-image-base-lora-trainer", headers=headers, json={"data":"<data>"})
request_id = r.json()["request_id"]

while True:
    res = requests.get(f"{API}/predictions/{request_id}/result", headers=headers).json()
    if res["status"] == "completed":
        print(res["outputs"]); break
    if res["status"] == "failed":
        raise RuntimeError(res.get("error"))
    time.sleep(3)

Full docs and agent/MCP integration: llms.txt. Get an API key at muapi.ai/access-keys.