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

ParameterTypeDescription
promptstringText prompt for image generation

Optional Parameters

ParameterTypeDefaultDescription
heightinteger1024Height of the generated image (64-1440)
widthinteger1024Width of the generated image (64-1440)
num_inference_stepsinteger8Number of inference steps. This actually results in (num_inference_steps - 1) DiT forwards (1-50)
guidance_scalefloat0.0Guidance scale. Should be 0 for Turbo models (0.0-20.0)
seedinteger(optional)Random seed. Set for reproducible generation
output_formatstring"jpg"Format of the output images. Options: "png", "jpg", "webp"
output_qualityinteger80Quality when saving the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. Not relevant for .png outputs