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.
### Responses:
**200**: Processed image binary (Success Response)
Content-Type: application/json
Content-Type: image/jpeg
**Example Response:**
```json
"string"
```
Content-Type: image/png
**Example Response:**
```json
"string"
```
Content-Type: image/webp
**Example Response:**
```json
"string"
```
ConnectorNo auth