Skip to main content
POST
/
generate
/
f
/
z-image-turbo
Z-Image Turbo Image Generation
curl --request POST \
  --url https://api.sinancode.com/v1/generate/f/z-image-turbo \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "A hyper-realistic portrait of a cat",
  "acceleration": "none",
  "enable_prompt_expansion": false,
  "enable_safety_checker": true,
  "image_size": "landscape_4_3",
  "num_images": 1,
  "num_inference_steps": 8,
  "output_format": "png",
  "seed": 42,
  "sync_mode": false
}
'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
Generate images ultra-fast using Alibaba Cloud’s Tongyi Wanxiang Z-Image Turbo model. Key Features:
  • Lowest Price - The most affordable image generation model on our platform
  • Fastest Speed - 6B parameter distilled model, sub-second inference on H800 GPU with only 8 steps, the fastest on our platform
  • Bilingual Text Rendering - Excellent Chinese and English text rendering in images
  • Photorealistic Quality - Outstanding skin texture, lighting, depth of field in portraits and realistic scenes
  • Open Source Commercial - Apache-2.0 license, achieving SOTA among open-source models

Authorizations

Authorization
string
header
required

Please use your API Token for authentication

Body

application/json

Task parameters

prompt
string
required

Prompt text (required)

Minimum string length: 1
Example:

"A hyper-realistic portrait of a cat"

acceleration
enum<string>
default:none

Acceleration level (none/regular/high, default none)

Available options:
none,
regular,
high
Example:

"none"

enable_prompt_expansion
boolean

Enable prompt expansion (adds 0.0025 credits/request)

Example:

false

enable_safety_checker
boolean
default:true

Enable safety checker (default true)

Example:

true

image_size
enum<string>
default:landscape_4_3

Image size (preset or custom width/height) Presets: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9

Available options:
square_hd,
square,
portrait_4_3,
portrait_16_9,
landscape_4_3,
landscape_16_9
Example:

"landscape_4_3"

num_images
integer
default:1

Number of images to generate (1-4, default 1)

Required range: 1 <= x <= 4
Example:

1

num_inference_steps
integer
default:8

Inference steps (1-8, default 8)

Required range: 1 <= x <= 8
Example:

8

output_format
enum<string>
default:png

Output format (jpeg/png/webp, default png)

Available options:
jpeg,
png,
webp
Example:

"png"

seed
integer

Random seed (same seed + same prompt = same result)

Example:

42

sync_mode
boolean

Sync mode (default false)

Example:

false

Response

OK

task_id
string
required

Task ID

Example:

"01234567-89ab-cdef-0123-456789abcdef"