Z Image API Service

Professional AI image generation API powered by Z-Image. Start creating stunning images with our managed API service.

6B
Parameters
8 NFEs
Fast generation
EN + ZH
Bilingual support

What We're Building

A managed API service powered by Z-Image from Tongyi-MAI

Fast Response

Optimized infrastructure for quick image generation

Python SDK

Official Python client library with full documentation

Multilingual

Support for English and Chinese text rendering

Managed Service

No infrastructure setup required, fully hosted solution

Based on Open Source

Built on Apache 2.0 licensed Z-Image project

Documentation

API reference and integration guides

Use Cases

Common applications for image generation API

Creative & Design

Design automation tools, marketing asset creation, and content generation platforms

  • Design automation tools
  • Marketing asset creation
  • Social media content

E-commerce & Retail

Product visualization, catalog enrichment, and personalized marketing materials

  • Product visualization
  • Dynamic ad generation
  • Catalog enrichment

Media & Entertainment

Game assets, character designs, and visual content for interactive experiences

  • Game asset generation
  • Character concept art
  • Visual content production

Education & Publishing

Custom illustrations, diagrams, and visual learning materials for educational content

  • Educational illustrations
  • Book cover designs
  • Infographic creation

Competitive Advantages

Compare with other image generation solutions

Feature Z Image API Other Solutions
Response Time < 1 second 5-30 seconds
License Apache 2.0 Proprietary
Python SDK Native Support Limited or REST only
Multilingual Text English & Chinese Limited
Self-Hosting Full Control Cloud Only
Hardware 16GB+ Consumer GPU Enterprise GPU Required
Commercial Use Unlimited Restrictions Apply

Ready to experience the difference?

View Pricing

Live Demo

Experience Z Image API in action

Interactive Demo

Try it on Hugging Face

Launch Live Demo

What You Can Try

  • Real-time Generation

    Generate high-quality images in under 1 second

  • Text in Images

    Support for English and Chinese characters

  • Custom Parameters

    Adjust size, steps, and guidance settings

  • Download Results

    Instant preview and download generated images

Note: Demo hosted on Hugging Face Spaces for public testing

Managed API Service

Enterprise-ready API service with global availability and premium support

Available Now

Hosted API Service

Fully managed API service so you don't have to worry about infrastructure, scaling, or maintenance. Focus on your application while we handle the complexity.

Global Edge Network

Sub-100ms latency worldwide

99.9% Uptime SLA

Enterprise-grade reliability

Auto-scaling

Handle any traffic volume

Priority Support

Direct access to our team

Simple API Integration

Easy-to-use RESTful API with Python, JavaScript, and cURL support

# Python Example
import requests

api_key = "your_api_key_here"
url = "https://api.z-image.ai/v1/generate"

response = requests.post(url, 
    headers={"Authorization": f"Bearer {api_key}"},
    json={
        "prompt": "A beautiful sunset over mountains",
        "width": 1024,
        "height": 1024,
        "steps": 4
    }
)

image_url = response.json()["image_url"]
print(f"Generated: {image_url}")

Ready to get started?

Choose a plan that fits your needs and start generating images today.

View Pricing

Pricing

Choose the plan that fits your project

Self-Hosted Managed API

Z-Image Basic

$7.99 /mo

Perfect for getting started

  • 360 Credits
  • ~180 images/month
  • $0.044 per image
  • More relaxed generation limits
  • Standard generation speed
  • Email support
Sign in to purchase
Popular

Z-Image Pro

$25.90 /mo

Ideal for creators and professionals

  • 1320 Credits
  • ~660 images/month
  • $0.039 per image
  • More relaxed generation limits
  • Priority processing
  • Private task generation
  • Priority support
  • Commercial image license
Sign in to purchase

Z-Image Max

$59.90 /mo

For studios and power users

  • 3600 Credits
  • ~1800 images/month
  • $0.033 per image
  • More relaxed generation limits
  • Fastest generation speed
  • Permanent image storage
  • Full commercial rights
  • Private task generation
Sign in to purchase

Get Started Today: Choose from our flexible pricing plans and start generating professional images with Z-Image API.

Getting Started

Step-by-step guide to get started with Z Image API

1

Installation & Setup

Begin by cloning the repository from GitHub and installing the required dependencies.

# Clone the repository from GitHub
git clone https://github.com/Tongyi-MAI/Z-Image.git
cd Z-Image

# Install dependencies
pip install -r requirements.txt
2

System Requirements

Ensure your system meets the minimum requirements:

  • Python 3.8 or higher
  • CUDA-compatible GPU with 16GB+ VRAM
  • PyTorch 2.0 or later
  • Sufficient storage for model weights
3

Download Model Weights

Download the pre-trained model weights from the official repository.

# Download model weights
python download_models.py --model turbo
4

Basic Usage

Start generating images with simple Python code. See the Python guide below for detailed examples.

# Basic image generation example
from zimage import ZImageAPI

api = ZImageAPI()
image = api.generate("A beautiful sunset over mountains")
image.save("output.png")

Python Integration Guide

Python integration examples and best practices

Basic Implementation

Simple Python script to generate your first image:

import torch
from zimage import ZImagePipeline

# Initialize the pipeline
pipeline = ZImagePipeline.from_pretrained(
    "Tongyi-MAI/Z-Image-Turbo",
    torch_dtype=torch.float16
)
pipeline = pipeline.to("cuda")

# Generate image
prompt = "A futuristic city at night"
image = pipeline(
    prompt=prompt,
    num_inference_steps=4,
    guidance_scale=0.0
).images[0]

# Save the result
image.save("generated_image.png")

Advanced Configuration

Customize generation parameters for optimal results:

from zimage import ZImagePipeline

pipeline = ZImagePipeline.from_pretrained(
    "Tongyi-MAI/Z-Image-Turbo"
)

# Advanced parameters
image = pipeline(
    prompt="Your detailed prompt here",
    negative_prompt="unwanted elements",
    height=1024,
    width=1024,
    num_inference_steps=4,
    guidance_scale=0.0,
    seed=42  # For reproducibility
).images[0]

image.save("advanced_output.png")

Batch Processing

Efficiently generate multiple images with Python loops:

from zimage import ZImagePipeline

pipeline = ZImagePipeline.from_pretrained(
    "Tongyi-MAI/Z-Image-Turbo"
)

prompts = [
    "A serene lake at dawn",
    "A bustling marketplace",
    "An ancient temple"
]

for idx, prompt in enumerate(prompts):
    image = pipeline(prompt=prompt).images[0]
    image.save(f"batch_image_{idx}.png")
    print(f"Generated image {idx + 1}/{len(prompts)}")

Error Handling

Robust Python code with proper exception handling:

from zimage import ZImagePipeline
import torch

try:
    pipeline = ZImagePipeline.from_pretrained(
        "Tongyi-MAI/Z-Image-Turbo"
    )
    
    image = pipeline(
        prompt="Your prompt",
        num_inference_steps=4
    ).images[0]
    
    image.save("output.png")
    print("Image generated successfully!")
    
except torch.cuda.OutOfMemoryError:
    print("GPU out of memory. Try reducing image size.")
except Exception as e:
    print(f"Error occurred: {str(e)}")

Open Source on GitHub

Join the Z Image API community

Why GitHub?

  • Access to complete source code and model architecture
  • Regular updates and bug fixes from Tongyi MAI team
  • Active community discussions and feature requests
  • Comprehensive documentation and examples
  • Apache 2.0 license for commercial use
Repository
Tongyi-MAI/Z-Image
License
Apache 2.0
Language
Python

Frequently Asked Questions

What is Z Image API?

Z Image API is an open-source, high-performance image generation service developed by Tongyi MAI. It generates high-quality images with sub-second response times, featuring full Python integration and comprehensive documentation.

How do I integrate Z Image API with Python?

Integration is straightforward using our Python SDK. Simply install the package from GitHub, import the ZImagePipeline class, and start generating images with just a few lines of code. Check our Python guide section for detailed examples.

What are the system requirements?

Z Image API requires Python 3.8+, a CUDA-compatible GPU with at least 16GB VRAM, and PyTorch 2.0 or later. The API is optimized to run efficiently on consumer-grade hardware.

Is Z Image API free to use?

Yes! Z Image API is completely open-source and released under the Apache 2.0 license, which means you can use it freely for both personal and commercial projects.

Where can I find the GitHub repository?

The official Z Image API repository is available at github.com/Tongyi-MAI/Z-Image. You'll find complete source code, documentation, examples, and community support.

Can I contribute to the project?

Absolutely! We welcome contributions from the community. Visit our GitHub repository to report issues, submit pull requests, or participate in discussions about new features and improvements.

Get Started Today

Start using Z-Image API now or subscribe for product updates and tips

  • Launch Notification

    Get notified as soon as we go live

  • Early Pricing Info

    Receive pricing details before public launch

  • Documentation Access

    Early access to API documentation and guides

  • Updates & News

    Regular updates on development progress

JD
MK
AL
RS
+1K

1,247+ developers already on the waitlist

Subscribe for Updates

Get notified when we launch our API service

We respect your privacy. Unsubscribe anytime.

Ready to Start Creating?

Choose a plan that fits your needs and start generating professional images with Z-Image API today