Image Alibaba

Z Image API

Use the Z Image API via RunAPI with a model skill, unified auth, and pay-as-you-go pricing.

runapi.ai
curl -X POST https://runapi.ai/api/v1/z_image/text_to_image \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "z-image",
  "prompt": "Generate a clean product shot of white sneakers on a gradient background, studio lighting."
}'
import { ZImageClient } from "@runapi.ai/z-image";

const client = new ZImageClient();
const result = await client.textToImage.run({
    model: "z-image",
    prompt: "Generate a clean product shot of white sneakers on a gradient background, studio lighting.",
});
<?php

require __DIR__ . "/vendor/autoload.php";

use RunApi\ZImage\ZImageClient;

$client = new ZImageClient();
$result = $client->textToImage->run([
        'model' => 'z-image',
        'prompt' => 'Generate a clean product shot of white sneakers on a gradient background, studio lighting.',
]);
require "runapi/z_image"

client = RunApi::ZImage::Client.new
result = client.text_to_image.run(
    model: "z-image",
    prompt: "Generate a clean product shot of white sneakers on a gradient background, studio lighting."
)
npx skills add runapi-ai/z-image -g
# Claude Code
claude mcp add runapi -s user -- npx -y @runapi.ai/mcp

# Codex
codex plugin install runapi-mcp@agents

# Cursor / Windsurf / VS Code
npx @runapi.ai/mcp init cursor
@runapi.ai/z-image v1
OVERVIEW

About Z Image

Z Image is Alibaba's ultra-fast text-to-image model that generates images in approximately 1 second using 8 inference steps. It prioritizes generation speed while maintaining coherent, high-quality outputs.

Provider
Alibaba
Modality
Image
PRICING

Pricing

Failed generations are not charged
Text to image
$0.01 / image
SPEC SHEET

Technical details

Model ID z-image
Provider Alibaba
Modality image
Task type asynchronous
Billing unit call
API endpoint /api/v1/z_image/text_to_image
Commercial license Yes — included via API
Catalog status Operational
Agent integration

Run Z Image From an Agent

HOW IT WORKS

Get Started with Z Image

  1. Create an API key

    Sign up and generate an API key from the dashboard.

  2. Pick a version

    Choose the version that best matches your quality and cost requirements.

  3. Send a request

    Submit your prompt and parameters to the model's documented endpoint.

  4. Get your result

    Poll the task or set a webhook, then download the completed output.

CONTEXT

About Z Image on RunAPI

Z Image is Alibaba's speed-optimized text-to-image model, generating results very fast. Through RunAPI, it shares the same API shape and billing as all Alibaba models.

Provider
Alibaba
See all →
Modality
Image
Browse models →

Why Use Z Image Through RunAPI

One auth, every provider

A single RunAPI API key unlocks the whole model catalog across all providers. No separate accounts to create, no API keys to rotate per integration, and no credential management overhead. Add a new model to your app by changing one parameter.

Unified pricing & billing

Per-call pricing in USD, billed monthly into a single invoice. No subscription tiers, no minimum spend, and failed generations are never charged. The pricing page and check_pricing API show exact costs before you commit to a model.

Schema-first SDK

Typed schemas, parameter constraints, and setup notes are packaged in the model skill so your implementation starts from the right contract. The skill loads into Claude Code, Codex, Gemini CLI, Cursor, and VS Code — your agent knows the correct request shape before you write a line of code.

Z Image Questions

How fast is Z Image generation?

Approximately 1 second using 8 inference steps — one of the fastest text-to-image models available.

Is the quality comparable to slower models?

Z Image produces photorealistic, coherent images suitable for production use. For maximum fidelity on complex scenes, consider Qwen 2 or Imagen 4.

What makes Z Image so fast?

Z Image uses a distilled architecture that runs in just 8 inference steps, dramatically reducing generation time while maintaining visual coherence.

What output resolution does Z Image produce?

Standard resolution suitable for web and social media. For higher-resolution needs, pair Z Image with Topaz upscaling.

Is Z Image good for batch generation?

Yes — its speed makes it ideal for high-volume pipelines like e-commerce catalogs, social media assets, and thumbnail generation.

Which variant should I start with?

Pick the cheapest variant that meets your quality bar. Most teams start on the fast variant and graduate to pro for production.

SIMILAR MODELS

Similar Image Models

Start generating with Z Image