About Z-Image Base LoRA
Z-Image Base LoRA edit takes one image_url, a prompt, optional loras and strength, typically in about 21 seconds.
Call it with the model name alibaba/z-image-base-lora/edit on POST /jobs/createTask, from $0.0144.
Introduction
Z-Image Base LoRA Image to image redraws one source image on Z-Image, the 6-billion-parameter base model from Alibaba's Tongyi-MAI team, with up to three of your own LoRA files loaded. A strength control sets how far the result moves from the source. The output keeps the source's aspect ratio.
Choose a mode by starting material
| What you have | Mode |
|---|---|
| a written description | Z-Image Base LoRA Text to image |
| a picture to restyle | Z-Image Base LoRA Image to image |
Key features
One strength dial
Strength runs from 0 to 1 (default 0.7). Below 0.6 the source comes back nearly unchanged; from about 0.75 the scene is re-posed and re-staged with the same light and palette.
Two resolution tiers
1k returns a long side of 1,024 pixels and 1.5k a long side of 1,536 pixels, in the source's own aspect ratio.
Request parameters
| Parameter | Required | Description |
|---|---|---|
image_url | Yes | The picture to start from. |
loras | No | Add LoRA weights compatible with this model to guide its style or character. Default: [] |
output_format | No | File type of the result. jpeg · png · webp · Default: jpeg |
prompt | Yes | Describe what you want to make. |
resolution | No | Choose an available output size. 1k · 1.5k · Default: 1k |
seed | No | Use the same seed and settings for more controlled comparisons. ≥ 0 · ≤ 2147483647 |
strength | No | How far the result may move away from your input. ≥ 0 · ≤ 1 · Default: 0.7 |
Pricing
Prices are in USD and charged to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.
| Option | USD per image |
|---|---|
| Standard | $0.0144 |
Send the same request body to POST /jobs/quote to see the estimated and maximum USD charge before running. A quote does not run the task or charge your balance.
Use cases
Variations of a shot
At 0.75 to 0.8 the model keeps the light and mood of a photo but redraws the pose and setting, which is useful for alternate takes.
Testing a trained LoRA on real images
Check how a LoRA you trained on Z-Image Base treats real photographs before you build on it.
Prompt guide & pro tips
Describe the whole picture
Write the image you want back, not the change. "A woman in a green velvet dress singing on a dark stage" works; "make it black and white" alone did not in our tests.
Let the LoRA do the restyling
Without a LoRA, instructions to change the medium or the outfit changed little below 0.8. A style LoRA changed the medium at 0.6.
Pick the strength by the job
0.6 for a restyle that keeps everything in place, 0.7 for small content changes, 0.75 to 0.8 for a new take on the scene, 0.85 and above for a new picture.
Use Base LoRAs
A LoRA trained on Z-Image Turbo broke the image on this build in our test. Use files trained on Z-Image Base.
API quick start
Call the Z-Image Base LoRA API in three steps
- Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow-. API calls are billed in USD from your PopNow balance.
- Send the request. POST /jobs/createTask with model alibaba/z-image-base-lora/edit and an input object that follows the parameter table. The response returns a task ID straight away.
- Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-d '{
"model": "alibaba/z-image-base-lora/edit",
"input": {
"prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette",
"image_url": "https://media.popnow.ai/influencer/examples/marco.webp",
"resolution": "1k",
"output_format": "jpeg"
}
}'
# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $POPNOW_API_KEY"Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.
About the Z-Image Base LoRA Edit Image endpoint
It is a restyle, not an instruction editor: it redraws the whole frame and does not follow commands like "make the shirt red".
Strength near 0.6 keeps pose and setting; from about 0.75 they get redrawn.
Pair it with an illustration LoRA trained on Z-Image Base to turn a set of photos into matching artwork.
Output can be 1k or 1.5k.
Z-Image Base LoRA API questions
How much does the Z-Image Base LoRA API cost?
Z-Image Base LoRA starts at $0.0144 per image with Edit Image, its lowest-priced task. API usage is charged in USD to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.
What are the limits of the Z-Image Base LoRA · Edit Image API?
Resolutions: 1K · 1.5K; Prompt length (characters): 5,000; Largest upload: 10 MB. Requests outside these limits are rejected before anything is charged.
More about Z-Image Base LoRA
- Endpoints
- Z-Image Base LoRA · Create Image