Optimize an AI-generated image for the web
The step after image generation. gpt-image, DALL-E, Flux, Midjourney and Stable Diffusion hand back 2-8 MB PNGs; this returns the same picture as a web-ready webp (default), avif, jpeg or png, metadata stripped, transparency kept on webp/avif/png. Optional max_dimension caps the longest side (never upscales); optional q or quality_target (smallest file with SSIM >= target, flat surcharge) control quality. Same price as convert. If the result is not smaller than the input it is still returned but free (X-Pig-Billed: 0). X-Pictomancer-Bytes-Before/-After/-Saved-Percent report the saving. The input's C2PA manifest, if any, is reported in X-Pictomancer-C2PA-Input but is not carried over: re-encoding invalidates it.
Request
- Base URL: https://api.pictomancer.ai (the document declares no server; this is the origin it was published from)
- URL: https://api.pictomancer.ai/v1/optimize_generated
- Auth: none declared
Request body
Response
Processed image binary
Changes
No recorded changes to this operation across all 1 revision of this API.