v1

latestOpenAPI 3.1.0MIT2026-07-2614271305.9 KB
Image Generation

z-image-turbo Interface

  • Z Image Turbo is an ultra-fast text-to-image generation model with exceptional quality
  • Asynchronous processing mode, use the returned task ID to query
  • Generated image links are valid for 24 hours, please save them promptly
post/v1/images/generations

Request body

model'z-image-turbo' required

Image generation model name

promptstring required

Prompt describing the image to be generated, limited to 2000 characters

size'1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '9:16' | '16:9' | '1:2' | '2:1'

Size of the generated image. Supports two formats:

Aspect Ratio Format:

  • Use preset ratios like 1:1, 16:9, 9:16, etc.
  • Supported ratios: 1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9, 1:2, 2:1

Custom Dimensions:

  • Width x Height (e.g., 1024x768)
  • Width and height range: 376-1536 pixels
seedinteger

Random seed for reproducible results

Note:

  • Range: 1 to 2147483647
  • Leave empty for random seed
  • Same seed with same prompt produces similar results
nsfw_checkboolean

Enable additional NSFW content moderation

Note:

  • Default: false (disabled)
  • Basic content moderation is always active even when disabled
  • Enable for stricter content filtering
callback_urlstring uri

HTTPS callback address after task completion

Callback Timing:

  • Triggered when task is completed, failed, or cancelled
  • Sent after billing confirmation is completed

Security Restrictions:

  • Only HTTPS protocol is supported
  • Callback to internal IP addresses is prohibited (127.0.0.1, 10.x.x.x, 172.16-31.x.x, 192.168.x.x, etc.)
  • URL length must not exceed 2048 characters

Callback Mechanism:

  • Timeout: 10 seconds
  • Maximum 3 retries on failure (retries after 1 second/2 seconds/4 seconds)
  • Callback response body format is consistent with the task query API response format
  • Callback address returning 2xx status code is considered successful, other status codes will trigger retry

Example request

{
  "model": "z-image-turbo",
  "prompt": "a cute cat",
  "size": "1:1",
  "seed": 12345,
  "callback_url": "https://your-domain.com/webhooks/image-task-completed"
}

Response

Image generation task created successfully

createdinteger

Task creation timestamp

idstring

Task ID

modelstring

Actual model name used

object'image.generation.task'

Specific type of the task

progressinteger

Task progress percentage (0-100)

status'pending' | 'processing' | 'completed' | 'failed'

Task status

type'text' | 'image' | 'audio' | 'video'

Output type of the task

Example response

{
  "created": 1757165031,
  "id": "task-unified-1757165031-uyujaw3d",
  "model": "z-image-turbo",
  "status": "pending",
  "task_info": {
    "can_cancel": true,
    "estimated_time": 10
  },
  "type": "image",
  "usage": {
    "billing_rule": "per_call",
    "credits_reserved": 5,
    "user_group": "default"
  }
}