Skip to content
Pruna AI logo

Z-Image Turbo

Text-to-Image • Pruna AI

Model ID

Use with the Workers AI binding, the AI Gateway REST API, or the Unified API.

Calling the provider directly? Use the provider's model name instead, including with provider-native endpoints or the provider's own SDK. For example, Anthropic's name for anthropic/claude-opus-4.8 is claude-opus-4-8.

  • Third-party

Z-Image Turbo is Tongyi-MAI's 6B-parameter distilled text-to-image model, served by Pruna. It generates photorealistic images in about 8 steps, renders English and Chinese text well, and supports custom sizes up to 2048×2048.

Model Info
More informationlink ↗
Pricing
  • Per image$0.005

Usage

const response = await env.AI.run(
  'pruna/z-image-turbo',
  { prompt: 'A red fox curled up asleep in fresh snow, soft morning light, photorealistic' },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "pruna/z-image-turbo",
  "input": {
    "prompt": "A red fox curled up asleep in fresh snow, soft morning light, photorealistic"
  }
}'
Fox in the Snow
{
  "state": "Completed",
  "result": {
    "image": "https://examples.aig.cloudflare.com/pruna/z-image-turbo/fox-in-the-snow.jpg"
  }
}

Examples

Bilingual Neon Sign — Renders Chinese and English text in the same image, wide format, PNG.
const response = await env.AI.run(
  'pruna/z-image-turbo',
  {
    prompt:
      'A rainy night street in Shanghai, a glowing neon sign that reads "营业中 OPEN LATE" in red Chinese characters and blue English letters, reflections on wet pavement, cinematic',
    width: 1440,
    height: 768,
    output_format: 'png',
    seed: 42,
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "pruna/z-image-turbo",
  "input": {
    "prompt": "A rainy night street in Shanghai, a glowing neon sign that reads \"营业中 OPEN LATE\" in red Chinese characters and blue English letters, reflections on wet pavement, cinematic",
    "width": 1440,
    "height": 768,
    "output_format": "png",
    "seed": 42
  }
}'
Bilingual Neon Sign
{
  "state": "Completed",
  "result": {
    "image": "https://examples.aig.cloudflare.com/pruna/z-image-turbo/bilingual-neon-sign.png"
  }
}
Fast Product Shot — Studio product photo with go_fast for the lowest latency.
const response = await env.AI.run(
  'pruna/z-image-turbo',
  {
    prompt:
      'Studio product photo of a matte black wireless earbud case on a white marble pedestal, soft rim light, shallow depth of field',
    go_fast: true,
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "pruna/z-image-turbo",
  "input": {
    "prompt": "Studio product photo of a matte black wireless earbud case on a white marble pedestal, soft rim light, shallow depth of field",
    "go_fast": true
  }
}'
Fast Product Shot
{
  "state": "Completed",
  "result": {
    "image": "https://examples.aig.cloudflare.com/pruna/z-image-turbo/fast-product-shot.jpg"
  }
}

Parameters

prompt
stringrequiredminLength: 1Text description of the image to generate.
width
integerminimum: 64maximum: 2048Width of the generated image in pixels (64-2048). Defaults to 1024.
height
integerminimum: 64maximum: 2048Height of the generated image in pixels (64-2048). Defaults to 1024.
num_inference_steps
integerminimum: 1maximum: 50Number of inference steps (1-50). Defaults to 8.
guidance_scale
numberminimum: 0maximum: 20Guidance scale (0-20). Should be 0 for Turbo models, which is the default.
go_fast
booleanApply additional optimizations for faster generation. Defaults to false.
seed
integerminimum: -9007199254740991maximum: 9007199254740991Random seed for reproducible generation.
output_format
stringenum: jpg, png, webpFormat of the output image. Defaults to jpg.
output_quality
integerminimum: 0maximum: 100Quality when saving jpg or webp output, from 0 to 100. Defaults to 80.
enable_safety_filter
booleanCheck the prompt against the content policy. Defaults to false; the always-on categories are still blocked.
image
stringformat: uriPresigned URL for the generated image.

API Schemas (Raw)

Input
Output

Was this helpful?