Image · Alibaba

Z Image API

Z Image API 调用超快文生图,8 步推理即可生成照片级真实图像。

运行中 · 1 endpoints · 起价 $0.010
runapi.ai
curl -X POST https://runapi.ai/api/v1/z_image/text_to_image \
  -H "Authorization: Bearer $RUNAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "z-image",
  "prompt": "生成一张白色运动鞋在渐变背景上的干净产品图,摄影棚打光。"
}'
import { ZImageClient } from "@runapi.ai/z-image";

const client = new ZImageClient();
const result = await client.textToImage.run({
    model: "z-image",
    prompt: "生成一张白色运动鞋在渐变背景上的干净产品图,摄影棚打光。",
});
<?php

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

use RunApi\ZImage\ZImageClient;

$client = new ZImageClient();
$result = $client->textToImage->run([
        'model' => 'z-image',
        'prompt' => '生成一张白色运动鞋在渐变背景上的干净产品图,摄影棚打光。',
]);
require "runapi/z_image"

client = RunApi::ZImage::Client.new
result = client.text_to_image.run(
    model: "z-image",
    prompt: "生成一张白色运动鞋在渐变背景上的干净产品图,摄影棚打光。"
)
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
概览

Z Image 是阿里巴巴的超快文生图模型,仅需 8 步推理即可在约 1 秒内完成图像生成,在保持图像质量的同时极致压缩生成延迟。

  • 多变体覆盖不同速度/质量层级
  • Model skill 包含文档、schema 和接入说明
  • 适合面向应用的编码工作流
  • 失败的生成不计费
定价

定价

失败的生成不计费
Text to image
$0.01 / image
规格

技术细节

模型 ID z-image
提供方 Alibaba
模态 image
任务类型 asynchronous
计费单位 call
API 端点 /api/v1/z_image/text_to_image
商用许可 允许商用
状态 运行中
技能

为应用开发安装 Z Image skill

把模型文档、schema、定价说明和接入步骤加载进代码工作区。

# Install the model skill for app development workflows
npx skills add runapi-ai/z-image -g
Installs docs, schemas, pricing context, and setup notes into your developer workspace.
Or use this setup request in your coding tool:
Install the Z Image skill for this app:

1. Add runapi-ai/z-image with the skills installer.
2. Load SKILL.md in this workspace.
3. Use its docs, schemas, pricing notes, and setup steps when adding model features.
4. Confirm the install path when done.
工作流程

四步从 model skill 到首次结果

01

选择模型

根据输出类型、质量要求和延迟目标选择模型与变体。

02

配置

设置 RunAPI key,并在代码工作区安装对应 model skill。

03

调用

按 skill 里的说明,把模型能力接入到你的应用里。

04

接收

按 task ID 轮询、在支持时使用流式,或处理 webhook 回调。

背景

Z Image API 是什么?

Z Image 是阿里巴巴的速度优化文生图模型,约 1 秒内完成生成。通过 RunAPI,与所有阿里巴巴模型共享 API 和计费。

Provider
Alibaba
Modality
Image
为何选择 RunAPI

为什么用 RunAPI 调用 Z Image API

一把认证,覆盖所有提供方

一把 RunAPI key 解锁整个模型目录。无需为每家提供方单独建账户。

统一的定价与账单

USD 按次定价,按月结算。失败的生成不计费。

Schema 优先的 SDK

Typed schema 和接入说明已打包进 model skill,让实现从正确契约开始。

常见问题

常见问题

应该从哪个变体开始?

选满足质量要求的最便宜变体。多数团队从 fast 起步,生产时升级到 pro。

有免费额度吗?

新账户每个模型都有免费调用额度,之后按次计费。

支持流式吗?

模型支持流式时,RunAPI 端到端流式。

失败怎么计费?

失败的生成不计费。

输出会缓存吗?

输出按任务 ID 存储在 R2 供回取。输入不缓存。

可以商用吗?

可以——所有变体默认含商用许可,除非模型许可明确限制;有例外会在变体页面注明。

速率限制?

Key 级限流随使用层级伸缩。当前限制见定价页。

在哪里报问题?

在公共 GitHub 仓库提 issue 或邮件联系 support。

立即开始

立即体验 Z Image API。