Z-Image Turbo
Z-Image Turbo API. Fast, low-cost photoreal AI images at 1K or 2K from Alibaba's Tongyi lab.
Pricing, live playground and model overview: Z-Image Turbo API on YepAPI
/v1/media/queueOverview
Z-Image Turbo — Alibaba's fast, low-cost photoreal text-to-image model, at 1K or 2K. Async operation — submit a job, poll for completion.
| Property | Value |
|---|---|
| Model ID | alibaba/z-image-turbo |
| Alias | z-image, z-image-turbo |
| Provider | Alibaba |
| Category | Image Generation |
| Inputs | text-to-image |
| Resolutions | 1k, 2k |
| Aspect Ratios | 1:1, 2:3, 3:2, 3:4, 4:3, 7:9, 9:7, 9:16, 16:9, 21:9 |
| Billing | Per job — priced when queued, charged only on success |
| Pricing | $0.03/image |
Usage
All media models use the async job queue. Submit a job, then poll for the result.
Step 1: Submit Job
Text-to-Image
options.params passes this model's own parameters (see Model parameters).
const res = await fetch('https://api.yepapi.com/v1/media/queue', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'alibaba/z-image-turbo',
prompt: 'Product photo of a ceramic coffee mug on a walnut desk, soft window light',
options: {
aspectRatio: '1:1',
resolution: '1k',
params: {
seed: 42,
},
},
}),
});
const { data } = await res.json();
// data.jobId — use this to poll for resultscurl -X POST https://api.yepapi.com/v1/media/queue \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "alibaba/z-image-turbo", "prompt": "Product photo of a ceramic coffee mug on a walnut desk, soft window light", "options": {"aspectRatio": "1:1", "resolution": "1k", "params": {"seed": 42}}}'Step 2: Poll for Result
const status = await fetch(`https://api.yepapi.com/v1/media/status/${data.jobId}`, {
headers: { 'x-api-key': 'YOUR_API_KEY' },
});
const { data: job } = await status.json();
// job.status — "pending" | "processing" | "completed" | "failed"
// job.result.image — { mimeType, base64 } when completedcurl https://api.yepapi.com/v1/media/status/JOB_ID \
-H "x-api-key: YOUR_API_KEY"Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
model | string | Yes | alibaba/z-image-turbo or aliases z-image, z-image-turbo | — |
prompt | string | Yes | Text description of the image to generate | — |
options.aspectRatio | string | No | One of: 1:1, 2:3, 3:2, 3:4, 4:3, 7:9, 9:7, 9:16, 16:9, 21:9 | 1:1 |
options.resolution | string | No | 1k, 2k | 1k |
options.params | object | No | Model-specific parameters under their own names: prompt_extend, seed. Unknown names return 400 | — |
Options are validated when you submit: an unsupported duration, resolution or value returns 400 naming the allowed values.
Model parameters
Pass these inside options.params.
| Parameter | Type | Allowed | Description | Default |
|---|---|---|---|---|
prompt_extend | boolean | — | Rewrite and reason over the prompt before generating (enhanced price tier) | false |
seed | integer | 0–2147483647 | Random seed for reproducible results | — |
Features
- Fast photoreal text-to-image
- 1K or 2K output, ten aspect ratios
- Optional prompt expansion via
options.params.prompt_extend
Pricing
| Resolution | Cost per image |
|---|---|
| 1k | $0.03 |
| 2k | $0.03 |
One image per job. Each job is priced when it's queued and charged only if it succeeds — failed or moderated jobs are free. prompt_extend uses an enhanced price tier, quoted at submit.
Image jobs typically complete in 5–60 seconds. Results retained for 1 hour.
Powered by Alibaba's Z-Image Turbo via our AI provider.