通義-文生圖-Z-Image 是一款輕量級文生圖模型,可快速產生映像,支援中英文字渲染,並靈活適配多種解析度與寬高比例。
快速入口:技術部落格
前提條件
效果展示
輸入提示詞 | 輸出映像 |
Photo of a stylish young woman with short black hair standing confidently in front of a vibrant cartoon-style mural wall. She wears an all-black outfit: a puffed bomber jacket with a ruffled collar, cargo shorts, fishnet tights, and chunky black Doc Martens, with a gold chain dangling from her waist. The background features four colorful comic-style panels: one reads “GRAND STAGE” and includes sneakers and a Gatorade bottle; another displays green Nike sneakers and a slice of pizza; the third reads “HARAJUKU st” with floating shoes; and the fourth shows a blue mouse riding a skateboard with the text “Takeshita WELCOME.” Dominant bright colors include yellow, teal, orange, pink, and green. Speech bubbles, halftone patterns, and playful characters enhance the urban street-art aesthetic. Daylight evenly illuminates the scene, and the ground beneath her feet is white tiled pavement. Full-body portrait, centered composition, slightly tilted stance, direct eye contact with the camera. High detail, sharp focus, dynamic framing. |
|
模型概覽
模型名稱 | 模型簡介 | 輸出映像規格 |
z-image-turbo | 輕量模型,快速生圖 | 映像解析度:總像素在[512*512, 2048*2048]之間,推薦解析度請參見size參數設定 映像格式:png 映像張數:固定1張 |
調用前,請查閱各地區支援的模型列表。
HTTP同步調用
新加坡地區:POST https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
北京地區:POST https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
請求參數 | 文生圖以下樣本直接返回圖片,響應速度較快。 若想開啟“智能思考”能力,請設定 以下為國際(新加坡)地區base_url,若使用中國大陸(北京)地區的模型,需將base_url替換為 |
要求標頭(Headers) | |
Content-Type 請求內容類型。此參數必須設定為 | |
Authorization 請求身份認證。介面使用阿里雲百鍊API-Key進行身份認證。樣本值:Bearer sk-xxxx。 | |
請求體(Request Body) | |
model 模型名稱。 樣本值:z-image-turbo。 | |
input 輸入的基本資料。 | |
parameters 影像處理參數。 |
響應參數 | 任務執行成功任務資料(如任務狀態、映像URL等)僅保留24小時,逾時後會被自動清除。請您務必及時儲存產生的映像。 任務執行異常如果因為某種原因導致任務執行失敗,將返回相關資訊,可以通過code和message欄位明確指示錯誤原因。請參見錯誤資訊進行解決。 |
output 任務輸出資訊。 | |
usage 輸出資訊統計。只對成功的結果計數。 | |
request_id 請求唯一標識。可用於請求明細溯源和問題排查。 | |
code 請求失敗的錯誤碼。請求成功時不會返回此參數,詳情請參見錯誤資訊。 | |
message 請求失敗的詳細資料。請求成功時不會返回此參數,詳情請參見錯誤資訊。 |
使用限制
資料時效:任務
task_id和 映像url均只保留 24 小時,到期後將無法查詢或下載。內容審核:輸入的
prompt和輸出的映像均會經過Alibaba Content Security Service審核,包含違規內容的請求將報錯“IPInfringementSuspect”或“DataInspectionFailed”,具體參見錯誤資訊。網路訪問配置:映像連結儲存於阿里雲 OSS,如果業務系統因安全性原則無法訪問外部OSS連結,請將以下 OSS 網域名稱加入網路訪問白名單。
# OSS網域名稱列表 dashscope-result-bj.oss-cn-beijing.aliyuncs.com dashscope-result-hz.oss-cn-hangzhou.aliyuncs.com dashscope-result-sh.oss-cn-shanghai.aliyuncs.com dashscope-result-wlcb.oss-cn-wulanchabu.aliyuncs.com dashscope-result-zjk.oss-cn-zhangjiakou.aliyuncs.com dashscope-result-sz.oss-cn-shenzhen.aliyuncs.com dashscope-result-hy.oss-cn-heyuan.aliyuncs.com dashscope-result-cd.oss-cn-chengdu.aliyuncs.com dashscope-result-gz.oss-cn-guangzhou.aliyuncs.com dashscope-result-wlcb-acdr-1.oss-cn-wulanchabu-acdr-1.aliyuncs.com
計費與限流
模型免費額度和計費單價請參見模型價格。
模型限流請參見通義-文生圖-Z-Image。
計費說明:
根據是否開啟智能按成功產生的 映像張數 計費。僅當查詢結果介面返回
task_status為SUCCEEDED並成功產生映像後,才會計費。模型調用失敗或處理錯誤不產生任何費用,也不消耗免費額度。
錯誤碼
如果模型調用失敗並返回報錯資訊,請參見錯誤資訊進行解決。
常見問題
Q: 如何查看模型調用量?
A: 模型調用完一小時後,請在模型觀測(新加坡)或模型觀測(北京)頁面,查看模型的調用次數、成功率等指標。如何查看模型調用記錄?
