Image generation
Generate images with model-specific sizes, formats, and credit tiers.
/v1/images/generationsapi.17.wtfRequest body
| Parameter | Type / requirement | Description |
|---|---|---|
model | string · required | An image model ID, not a text model. |
prompt | string · required | Nonblank prompt, up to 32,000 characters; model limits may be lower. |
n | integer · optional | Defaults to 1; 1–10 with a model-specific maximum. |
size | string · optional | WIDTHxHEIGHT or auto; omit for model default. Must match a supported size. |
quality | string · optional | Model-supported quality, such as auto, standard, or high. |
background | string · optional | auto, opaque, or transparent where supported. |
moderation | string · optional | auto or low where supported. |
output_format | string · optional | png, jpeg, or webp where supported. |
output_compression | integer · optional | 0–100; only for models that support it. |
response_format | string · optional | b64_json or url where supported upstream. |
style | string · optional | vivid or natural where supported. |
user | string · optional | Optional end-user identifier where supported. |
stream | false only · optional | Image streaming is not supported. |
partial_images | 0 only · optional | Partial images are not supported. |
Start with model defaults
Replace IMAGE_MODEL_ID with an image model from the console. Start with the minimal request and then add only options listed for that model. Unknown request fields are rejected.
curl https://api.17.wtf/v1/images/generations \
-H "Authorization: Bearer $LM0_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "IMAGE_MODEL_ID",
"prompt": "A quiet coastal observatory at sunrise",
"n": 1
}' Save your generated images
The response includes created and a data array. Each image includes both b64_json and a hosted url; revised_prompt may also be present. Decode base64 to save a durable copy. Hosted images use GET /generations/{imageId} and currently expire after one hour; they can become unavailable earlier after storage loss. Expired or unknown images return 404.
Hosted image URLs are accessible without a key. Treat the URL as a shareable link and avoid using temporary hosting as permanent storage.
Image credits & limits
Image cost is the number of generated images multiplied by the configured credits per image for the selected resolution tier. The service reserves credits before generation. Free image allowances count each requested image attempt. Some models produce only one image per request or use a fixed native format. Current sizes, pricing, and free-overage policies are shown in the console.