Tongyi Lab's newly released image generation model Z-Image is the foundational model of the ⚡️-Image series, aiming to deliver exceptional quality, powerful generation diversity, extensive style coverage, and precise prompt adherence. While Z-Image-Turbo is designed for speed, Z-Image is a full-capacity, undistilled Transformer model intended to serve as the core pillar for creators, researchers, and developers pursuing the highest level of creative freedom.Sourced from: https://huggingface.co/Tongyi-MAI/Z-Image Average runtime: 10-20 secondsPrice: 0.05 PTC per query
Request
Header Params
Body Params application/json
Example
{"prompt":"漂亮中国女生,五官精致,青涩懵懂,皮肤白皙,the image shows two individuals posing for a selfie, both are wearing white dresses and appear to be in a restaurant or similar setting with a red wall in the background, the person on the left has long dark hair and is smiling, while the person on the right has shoulder-length brown hair and is making a playful gesture by touching their face, they both have accessories such as earrings and bracelets, adding to their stylish appearance, the overall atmosphere seems casual and friendly","image_size":{"width":1024,"height":1024},"num_inference_steps":28,"enable_safety_checker":true,"output_format":"png"}
Request Code Samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://api.302.ai/302/submit/z-image' \
--header'Authorization: Bearer ' \
--header'Content-Type: application/json' \
--data-raw'{
"prompt": "漂亮中国女生,五官精致,青涩懵懂,皮肤白皙,the image shows two individuals posing for a selfie, both are wearing white dresses and appear to be in a restaurant or similar setting with a red wall in the background, the person on the left has long dark hair and is smiling, while the person on the right has shoulder-length brown hair and is making a playful gesture by touching their face, they both have accessories such as earrings and bracelets, adding to their stylish appearance, the overall atmosphere seems casual and friendly",
"image_size": {
"width": 1024,
"height": 1024
},
"num_inference_steps": 28,
"enable_safety_checker": true,
"output_format": "png"
}'
Responses
🟢200success
application/json
Body
Example
{"images":[{"url":"https://file.302.ai/gpt/imgs/20251128/b2adc4b6493a31bb4ca9af931e084eec.png","width":1024,"height":1024,"content_type":"image/png"}],"timings":{"inference":1.1926776219625026},"seed":1001462437,"has_nsfw_concepts":[false],"prompt":"漂亮中国女生,五官精致,青涩懵懂,皮肤白皙,the image shows two individuals posing for a selfie, both are wearing white dresses and appear to be in a restaurant or similar setting with a red wall in the background, the person on the left has long dark hair and is smiling, while the person on the right has shoulder-length brown hair and is making a playful gesture by touching their face, they both have accessories such as earrings and bracelets, adding to their stylish appearance, the overall atmosphere seems casual and friendly"}