Z Image Turbo
Overview
Rate Limit: 150 requests per minute
Category: Image Generation
Price: 0.005$ / image
Quickstart
Basic Image Generation (Asynchronous)
curl -X POST 'https://api.pruna.ai/v1/predictions' \
-H 'Content-Type: application/json' \
-H 'apikey: YOUR_API_KEY' \
-H 'Model: z-image-turbo' \
-d '{
"input": {
"prompt": "Young Chinese woman in red Hanfu, intricate embroidery. Impeccable makeup, red floral forehead pattern. Elaborate high bun, golden phoenix headdress, red flowers, beads."
}
}'
Basic Image Generation (Synchronous)
curl -X POST 'https://api.pruna.ai/v1/predictions' \
-H 'Content-Type: application/json' \
-H 'apikey: YOUR_API_KEY' \
-H 'Model: z-image-turbo' \
-H 'Try-Sync: true' \
-d '{
"input": {
"prompt": "Young Chinese woman in red Hanfu, intricate embroidery. Impeccable makeup, red floral forehead pattern. Elaborate high bun, golden phoenix headdress, red flowers, beads."
}
}'
Custom Dimensions and Quality
curl -X POST 'https://api.pruna.ai/v1/predictions' \
-H 'Content-Type: application/json' \
-H 'apikey: YOUR_API_KEY' \
-H 'Model: z-image-turbo' \
-d '{
"input": {
"prompt": "Sunset over mountain landscape, vibrant colors, dramatic clouds",
"width": 1440,
"height": 768,
"num_inference_steps": 12,
"output_format": "png",
"seed": 42
}
}'
Parameters
Required Parameters
| Parameter | Type | Description |
|---|---|---|
| prompt | string | Text prompt for image generation |
Optional Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| height | integer | 1024 | Height of the generated image (64-1440) |
| width | integer | 1024 | Width of the generated image (64-1440) |
| num_inference_steps | integer | 8 | Number of inference steps. This actually results in (num_inference_steps - 1) DiT forwards (1-50) |
| guidance_scale | float | 0.0 | Guidance scale. Should be 0 for Turbo models (0.0-20.0) |
| seed | integer | (optional) | Random seed. Set for reproducible generation |
| output_format | string | "jpg" | Format of the output images. Options: "png", "jpg", "webp" |
| output_quality | integer | 80 | Quality when saving the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. Not relevant for .png outputs |