Tongyi-MAI logo

Base

Tongyi-MAIReleased Jul 31, 2025z-image/base
CostCompare

Z-Image is the foundation model of the Z-Image family, engineered for good quality, robust generative diversity, broad stylistic coverage, and precise prompt adherence. It is a 6B-parameter text-to-image model built for efficient, high-fidelity image generation with strong prompt following capabilities across a wide range of visual styles.

Context
4K
Max output
4K
Input /1M
—
Output /1M
$0.01/img
AcceptsTextProducesImage

Providers

FastRouter routes your requests to this provider. You can also bring your own key.

FAL AI logo
FAL AI
falai
Input /1M—
Output /1M$0.01/img
Context4K
Max output4K

Supported parameters

Request parameters you can send with this model.

Parameter
Type
FAL AI
Core (Sampling & basic generation)
nNumber of completions to generate.
number
1 to 4
seedSeed for deterministic sampling.
number
-
Other
acceleration
string
"none", "regular", "high"
enable_safety_checker
bool
true | false
guidance_scale
number
1 to 20
negative_prompt
string
-
num_inference_steps
number
1 to 50
output_format
string
"jpeg", "png", "webp"
size
string
"square_hd", "square", "portrait_4_3", "portrait_16_9", "landscape_4_3", "landscape_16_9"
sync_mode
bool
true | false

Make your first API call

OpenAI-compatible. Point your SDK at FastRouter, or call the API directly.

Full API docs
Replace <FASTROUTER_API_KEY> with your key · Get your key →Install
OpenAI SDKHTTP
import base64
from openai import OpenAI
client = OpenAI(
api_key="<FASTROUTER_API_KEY>",
base_url="https://api.fastrouter.ai/api/v1"
)
img = client.images.generate(
model="z-image/base",
prompt="A cute baby sea otter",
n=1,
size="1024x1024"
)
image_base64 = img.data[0].b64_json
image_bytes = base64.b64decode(image_base64)
with open("otter.png", "wb") as f:
f.write(image_bytes)

Frequently asked questions

More models from Tongyi-MAI

Tongyi-MAI logo
Turboz-image/turbo

Z-Image Turbo is a super fast text-to-image model of 6B parameters developed by Tongyi-MAI. It compresses inference to as few as 1-8 diffusion steps (default 8), delivering high-volume, low-cost image generation at $0.005 per megapixel while maintaining strong prompt adherence. Optimized for rapid prototyping, content variation testing, and high-throughput asset generation, with optional prompt expansion to enrich brief prompts automatically.

Model scores sourced from ArtificialAnalysis