Use Z-Image Base LoRA Trainer with Z-Image Base LoRA Trainer via the Muapi REST API. Pay per generation — no subscription needed.
POST https://api.muapi.ai/api/v1/z-image-base-lora-trainerSubmit 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.
| Name | Type | Required | Description |
|---|---|---|---|
| data | string | Yes | 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 | No | Optional trigger word. If a caption file exists, it is prepended when not already present. |
| steps | int | No | Number of steps to train the LoRA on.Default: 1000 |
| learning_rate | float | No | Learning rate for Z-Image Base LoRA training.Default: 0.0001 |
| lora_rank | int | No | LoRA rank dimension.Default: 16 |
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"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.