About Z-Image
The Z-Image API is a single fast text to image endpoint: prompt up to 1,000 characters, aspect ratio, seed and PNG output. Rendering takes about a second and total request time around ten seconds including queueing, at a very low price, which makes it ideal for exploration features and high-volume generation.
Call it with the model name alibaba/z-image-turbo/text-to-image on POST /jobs/createTask, from $0.01.
Introduction
Z-Image Text to Image turns a written description into a single image, typically in around a second.
Z-Image is Tongyi's compact 6B image family tuned for roughly one-second photoreal output, published as a single text-to-image endpoint. Five aspect ratios, lossless PNG, 1,000-character prompts.
Key features
Iterate quickly on a short brief
At roughly a second per image, you can compare several variations of a short prompt without spending long on each draft.
Snapshot texture, not studio gloss
Its strongest register is the unglamorous one: phone-camera mirror selfies, fluorescent overhead light, slight motion blur, damp hair. Describe these photographic details when you want a casual snapshot look.
Request parameters
| Parameter | Required | Description |
|---|---|---|
seed | No | Use the same seed and settings for more controlled comparisons. ≥ 0 · ≤ 2147483647 |
prompt | Yes | Describe what you want to make. |
aspect_ratio | No | The shape of the frame: wide, square or tall. 1:1 · 4:3 · 3:4 · 16:9 · 9:16 · Default: 1:1 |
output_format | No | File type of the result. png · Default: png |
enable_prompt_expansion | No | Lets the model add detail to a short prompt. Default: false |
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.01 |
| enable_prompt_expansion true | $0.016 |
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
Start from a written brief
Use this endpoint when you want many quick looks at a written idea: each call returns one lossless PNG in about a second, in one of five aspect ratios. Keep every prompt that lands together with its seed.
Character sweeps at volume
Explore character portraits and role-play settings in multiple directions through the same endpoint. Each run draws its own frame, so keep the prompts that land and vary wardrobe and setting one clause at a time.
Concepting before a finishing model
Use this model for early visual exploration, then carry the successful prompt’s lighting, lens and texture descriptions into the model you use for the final image.
Prompt guide & pro tips
Keep the brief tight and concrete
1,000 characters is a small budget — spend it on light, lens and texture.
Keep the prompt with the keeper
Without a seed, identical requests draw different frames. Save the prompt and the seed beside the asset, and change a single clause at a time while comparing alternatives. Holding the seed steady helps compare prompt edits, but is not a guarantee of frame-identical results.
Adapt the included example
Start with the published example using aspect_ratio: 1:1, output_format: png. Replace the subject and creative direction while keeping the input contract for this mode intact.
A square take on the request behind the published still: a snapshot brief that names the light source, the blur and the framing rather than asking for quality.
Check the result before iterating
The prompt cap is 1,000 characters, and a longer prompt is rejected before the request is sent rather than truncated — this model rewards a tight brief rather than a shot list. Each aspect_ratio maps to a fixed size around the model’s native one-megapixel range, so there is no resolution switch for a larger output here. Check fine typography and dense small details carefully.
API quick start
Call the Z-Image 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-turbo/text-to-image 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-turbo/text-to-image",
"input": {
"prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette",
"aspect_ratio": "1:1",
"output_format": "png"
}
}'
# 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.
What to build with the Z-Image API
- Instant idea boards that render many variations per prompt.
- Bulk realistic stock-style imagery.
- Preview generation before a premium image model.
Z-Image parameter notes
- Prompts over 1,000 characters are rejected, not truncated.
- aspect_ratio has five values; output_format is png.
- seed supported; enable_prompt_expansion optional.
- No editing endpoint.
How Z-Image API pricing adds up
A very low flat price per image.
- Create Image: $0.01 per run, $1.00 for 100 runs
- enable_prompt_expansion true: $0.016 per run, $1.60 for 100 runs
Async jobs, webhooks and rate limits
Every Z-Image request is asynchronous: createTask returns a taskId straight away, and the result arrives when the job finishes. Poll GET /jobs/recordInfo every few seconds, or pass a public https callBackUrl and verify the X-Webhook-Signature header (HMAC-SHA256 over taskId, timestamp and the body hash) before trusting the payload. Each account gets 1,000 write requests per 10 seconds; a 429 carries Retry-After. Send an Idempotency-Key with createTask so a retried request for alibaba/z-image-turbo/text-to-image never runs or bills twice.
Common Z-Image API errors
| errorCode | What it usually means and how to fix it |
|---|---|
invalid_request | A prompt over 1,000 characters. Trim it client-side before sending. |
content_rejected | A refused prompt. |
rate_limited | Bursty batch jobs can hit the write limit; respect Retry-After. |
Z-Image API questions
How much does the Z-Image API cost?
Z-Image costs $0.01 per image. Prices by option: Standard $0.01 per image, true $0.016 per image. 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 is the model name for Z-Image in the API?
Put alibaba/z-image-turbo/text-to-image for Create Image in the model field of POST /jobs/createTask.
How fast is the Z-Image API?
About a second of rendering, around ten seconds per request end to end.
Does Z-Image truncate long prompts?
No, prompts over 1,000 characters are rejected.
What format does Z-Image return?
Lossless PNG.
What are the limits of the Z-Image API?
Aspect ratios: 1:1 · 4:3 · 3:4 · 16:9 · 9:16; Prompt length (characters): 1,000. Requests outside these limits are rejected before anything is charged.
Can I try Z-Image without writing code?
Run Z-Image in the Playground without an API key, using the same PopNow balance as the website, shown in USD. Each run appears in your developer history with its matching code.
All Z-Image models
Z-Image Turbo LoRA runs the same family with your own LoRAs and adds image to image.