APIMaster.ai

qwen_image_edit_spicy — Usage and parameters

Image editing. The public model ID is qwen_image_edit_spicy; base price is $0.040 per successful image. Use this underscore ID in APIMaster requests.

qwen_image_edit_spicy

Image editing. The public model ID is qwen_image_edit_spicy; base price is $0.040 per successful image. Use this underscore ID in APIMaster requests.

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.
image · string Required primary image: an accessible image URL or data URI (data:image/png;base64,...).
reference_images · string[] | null = null; [] Optional string array, maximum two additional reference images. Same URL/data URI format. Total at most three images including the primary.
images / image_urls · string[] Alternative ordered image array. First item is the primary; up to two remaining items are references. Use one input convention to avoid duplicates.
seed · integer | null = null Optional integer or null, default null; 0 or null uses a random seed. The provider documents no numeric range. Do not assume the Z Image range applies.
size · string = auto Optional; only auto. Output dimensions follow the primary image; do not send width/height.
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 Qwen requires one primary image and at most two references. JSON image, images, image_urls, and reference_images are normalized in that order; use image plus reference_images as the clearest form. prompt_extend and explicit dimensions are unsupported. Omit resolution.

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": "qwen_image_edit_spicy",
  "prompt": "Change the red paper boat to blue. Keep the pond and lighting unchanged.",
  "n": 1,
  "response_format": "url",
  "seed": 0,
  "image": "https://example.com/primary.png",
  "reference_images": [
    "https://example.com/reference.png"
  ]
}'

Python · requests

import os
import requests

api_base = "https://apimaster.ai/v1"
payload = {
    "model": "qwen_image_edit_spicy",
    "prompt": "Change the red paper boat to blue. Keep the pond and lighting unchanged.",
    "n": 1,
    "response_format": "url",
    "seed": 0,
    "image": "https://example.com/primary.png",
    "reference_images": [
        "https://example.com/reference.png"
    ]
}
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)

cURL · multipart

For multipart /images/edits, upload image files using image, repeated image[], or images; files must be images, 1 byte–10 MiB each. The first file is primary. Use the same file field consistently. A multipart reference_images value is a JSON array of URL/data URI strings.

curl --max-time 750 'https://apimaster.ai/v1/images/edits' \
  -H "Authorization: Bearer $APIMASTER_API_KEY" \
  -F 'model=qwen_image_edit_spicy' \
  -F 'prompt=Change the red paper boat to blue.' \
  -F 'n=1' \
  -F 'response_format=b64_json' \
  -F 'seed=0' \
  -F 'image[]=@primary.png' \
  -F 'image[]=@reference.png'

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.

qwen_image_edit_spicy

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.

Qwen requires one primary image and at most two references. JSON image, images, image_urls, and reference_images are normalized in that order; use image plus reference_images as the clearest form. prompt_extend and explicit dimensions are unsupported. Omit resolution.

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 · z-image-spicy-pro

Source specification checked 2026-10-30; the APIMaster parameter contract above describes the deployed adapter, rather than the provider creation/polling API.

MuleRouter API