z-image-spicy-pro — Usage and parameters
Text-to-image. The public model ID is z-image-spicy-pro; base price is $0.020 per successful image.
z-image-spicy-pro
Text-to-image. The public model ID is z-image-spicy-pro; base price is $0.020 per successful image.
Use an APIMaster API key with Authorization: Bearer. JSON uses Content-Type: application/json; for multipart let cURL/requests set the boundary. https://apimaster.ai/v1 already includes /v1.
POST https://apimaster.ai/v1/images/generations · application/json
These examples use synchronous endpoints: the server waits while polling the accepted upstream task. Clients receive the final Images response, not the provider task UUID. Set a generous read timeout (e.g. 750 seconds); do not use streaming.
Parameters
| Field / type | Rules and defaults |
|---|---|
model · string |
Required. Exact public model ID shown above. |
prompt · string |
Required non-empty string. Describe the desired image or editing instruction. |
n · integer = 1 |
Optional integer; only 1 is supported. Default 1. |
response_format · string = url |
Optional string: url (default) or b64_json. |
width / height · integer = 1024 |
Optional integers, independently 256–2560 pixels. Upstream defaults: 1024 × 1024. |
size · string |
Optional WIDTHxHEIGHT, e.g. 512x512, or auto. Must agree with explicit width/height; omit all size fields for upstream defaults. |
seed · integer | null = 0 |
Optional integer or null; 0–2147483647. Default 0; 0 or null uses a random seed, not a reproducibility guarantee. |
prompt_extend · boolean | null = false |
Optional boolean or null. Default false; true enables upstream prompt rewriting/expansion; null uses the default. |
quality · standard; stream · false |
Unsupported: n>1, stream=true, mask/mask_url, style, background, output_format and watermark. Omit quality or use standard; it does not select an additional quality tier. Unknown extra parameters are rejected. |
resolution |
Z Image accepts no reference image inputs. Use size or width/height; omit resolution (legacy 1K is accepted without setting dimensions). |
Examples
cURL · JSON
curl --max-time 750 'https://apimaster.ai/v1/images/generations' \
-H "Authorization: Bearer $APIMASTER_API_KEY" \
-H 'Content-Type: application/json' \
--data '{
"model": "z-image-spicy-pro",
"prompt": "A red paper boat on a calm blue pond, no text.",
"n": 1,
"response_format": "url",
"seed": 0,
"width": 512,
"height": 512,
"prompt_extend": false
}'
Python · requests
import os
import requests
api_base = "https://apimaster.ai/v1"
payload = {
"model": "z-image-spicy-pro",
"prompt": "A red paper boat on a calm blue pond, no text.",
"n": 1,
"response_format": "url",
"seed": 0,
"width": 512,
"height": 512,
"prompt_extend": False
}
response = requests.post(
api_base + "/images/generations",
headers={"Authorization": "Bearer " + os.environ["APIMASTER_API_KEY"]},
json=payload,
timeout=(20, 750),
)
response.raise_for_status()
result = response.json()
print(result)
Responses and billing
On success, HTTP 200 contains created (Unix seconds) and a one-item data array. url is a downloadable image address; save it promptly. b64_json is base64 image bytes. Verify the image content as well as the status code.
{"created": 1793380000, "data": [{"url": "https://example.com/generated.png"}]}
{"created": 1793380000, "data": [{"b64_json": "BASE64_IMAGE_BYTES"}]}
Base prices are per image; existing route/group/account ratios determine the final charge shown in the marketplace and usage logs. Supported dimensions and reference counts do not add a separate surcharge. The examples use n=1.
Limits and troubleshooting
Unsupported: n>1, stream=true, mask/mask_url, style, background, output_format and watermark. Omit quality or use standard; it does not select an additional quality tier. Unknown extra parameters are rejected.
Z Image accepts no reference image inputs. Use size or width/height; omit resolution (legacy 1K is accepted without setting dimensions).
A 400 validation error requires correcting parameters. Provider rejection/failure is returned as an error. A timeout, disconnect or unknown receipt does not prove the generation was rejected: retain the request ID, check usage logs and contact support before submitting another paid POST. The adapter does not automatically resubmit an accepted upstream task.
Image API overview · qwen_image_edit_spicy
Source specification checked 2026-10-30; the APIMaster parameter contract above describes the deployed adapter, rather than the provider creation/polling API.
