Z-Image Spicy text-to-image — you set the output size: width / height or an OpenAI-style size, 256–1536 px per side, or just an aspect_ratio with the long side fixed at 1536. Seed for repeatable output, prompt_extend can be turned off. One image per request, about 15 s, flat $0.015 per image.
Authorization: Bearer YOUR_API_KEY| Model | model | Price | Notas |
|---|---|---|---|
| Z-Image Spicy | z-image-spicy | $0.015 per image | Flat price for any size; one image per request |
Pricing examples: 10 images = $0.15, 100 images = $1.50, regardless of size, seed or prompt_extend. Failed requests are not charged.
# ─── Text-to-image by aspect ratio (long side = 1536) ─────
curl -X POST https://api.apimodels.app/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "z-image-spicy",
"prompt": "a red fox on a mossy log, golden hour, shallow depth of field",
"aspect_ratio": "16:9",
"seed": 42
}'
# Response (async — a task is created):
# { "code": 200, "data": { "taskId": "clxxx", "state": "pending" } }
# ─── Exact pixel size (256–1536 per side), prompt used verbatim ──
curl -X POST https://api.apimodels.app/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "z-image-spicy",
"prompt": "minimal poster, one bold word: SUMMER, warm gradient",
"width": 1152,
"height": 1536,
"prompt_extend": false
}'
# ─── Poll for the result ──────────────────────────────────
curl "https://api.apimodels.app/v1/images/generations?task_id=TASK_ID" \
-H "Authorization: Bearer YOUR_API_KEY"
# { "code": 200, "data": { "state": "completed", "resultUrls": ["https://r2.apimodels.app/..."] } }| Field | Required | Type | Description |
|---|---|---|---|
| model | Yes | string | z-image-spicy |
| prompt | Yes | string | Text description of the image |
| width | No | number | Width in pixels, 256–1536; pass together with height |
| height | No | number | Height in pixels, 256–1536; pass together with width |
| size | No | string | OpenAI-style "WIDTHxHEIGHT", e.g. 1536x864; without callback_url the image is returned in the same response |
| aspect_ratio | No | string | 1:1 16:9 9:16 4:3 3:4 3:2 2:3 5:4 4:5 21:9 9:21, long side fixed at 1536; with no size information the default is 1024x1536 |
| seed | No | number | Random seed (0 to 2147483647) for reproducible output; random when omitted |
| prompt_extend | No | boolean | Expand the prompt before rendering, default true; false draws your prompt verbatim |
| callback_url | No | string | Webhook URL called when the task completes |
Try it in the Playground
A flat $0.015 per image, whatever the size, seed or prompt_extend setting. Each request produces one image and is charged only on success.
Any width and height from 256 to 1536 pixels per side. Pass width and height, an OpenAI-style size such as 1536x864, or an aspect_ratio like 16:9 (the long side is then set to 1536). There is no 2K or 4K tier; sizes beyond 1536 are rejected instead of silently downscaled.
No. It is text-to-image only; image, image_urls and mask are rejected with a 400. For image-to-image use a model such as flux-2-klein-4b or gpt-image-2.