Skip to content
API reference

Image generation

Generate images with model-specific sizes, formats, and credit tiers.

POST/v1/images/generationsapi.17.wtf
On this page Request bodyStart with model defaultsSave your generated imagesImage credits & limits

Request body

ParameterType / requirementDescription
modelstring · requiredAn image model ID, not a text model.
promptstring · requiredNonblank prompt, up to 32,000 characters; model limits may be lower.
ninteger · optionalDefaults to 1; 1–10 with a model-specific maximum.
sizestring · optionalWIDTHxHEIGHT or auto; omit for model default. Must match a supported size.
qualitystring · optionalModel-supported quality, such as auto, standard, or high.
backgroundstring · optionalauto, opaque, or transparent where supported.
moderationstring · optionalauto or low where supported.
output_formatstring · optionalpng, jpeg, or webp where supported.
output_compressioninteger · optional0–100; only for models that support it.
response_formatstring · optionalb64_json or url where supported upstream.
stylestring · optionalvivid or natural where supported.
userstring · optionalOptional end-user identifier where supported.
streamfalse only · optionalImage streaming is not supported.
partial_images0 only · optionalPartial 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.