Z-Image Turbo z-image-turbo
Efficient text-to-image diffusion model that produces quality images in as few as 8 steps.
Image
$0.02 / megapixel
Inputs
| Input | Accepts |
|---|---|
text |
Parameters
Streams with stream: true.
| Parameter | Type | Values | Default |
|---|---|---|---|
size | any | ||
aspect_ratio | string | 1:1, 9:7, 7:9, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, 9:21 | 1:1 |
resolution | string | 512, 768, 1K, 1.5K, 2K | |
n | integer | 1–10 | 1 |
response_format | string | url, b64_json | url |
seed | integer | ||
steps | integer | 1–50 | 8 |
output_format | string | png, jpeg, webp | png |
output_compression | integer | 0–100 | |
background | string | auto, opaque | auto |
Endpoints
POST
/v1/images/generations
Create Image
POST/v1/images
Generate Image (OpenRouter)
POST/v1/images/edits
Edit Image
A request
curl https://api.vultrinference.com/v1/images/generations \
-H "Authorization: Bearer $VULTR_INFERENCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "z-image-turbo",
"prompt": "Studio photograph of a red ceramic teapot beside a blue cup on a wooden table.",
"n": 1,
"size": "1024x1024",
"response_format": "b64_json"
}'import os
import requests
response = requests.post(
"https://api.vultrinference.com/v1/images/generations",
headers={"Authorization": f"Bearer {os.environ['VULTR_INFERENCE_API_KEY']}"},
json={
"model": "z-image-turbo",
"prompt": "Studio photograph of a red ceramic teapot beside a blue cup on a wooden table.",
"n": 1,
"size": "1024x1024",
"response_format": "b64_json",
},
)
print(response.json())const response = await fetch("https://api.vultrinference.com/v1/images/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.VULTR_INFERENCE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "z-image-turbo",
"prompt": "Studio photograph of a red ceramic teapot beside a blue cup on a wooden table.",
"n": 1,
"size": "1024x1024",
"response_format": "b64_json"
}),
});
console.log(await response.json());