AI-generated images, web-ready

The step after generation: from a multi-megabyte PNG to the file you actually ship.

Image generators optimize for fidelity, not for delivery. gpt-image, DALL-E, Flux, Midjourney and Stable Diffusion hand back PNGs of two to eight megabytes that no page should ever load. Pictomancer is the second call your agent makes: the same picture, as WebP or AVIF, metadata stripped, transparency kept, sized for where it goes.

Why a separate step

  • Generators emit PNG because it is lossless, not because it is small: 1024x1024 outputs are routinely 2-4 MB and 1536px ones reach 8 MB
  • A WebP of the same picture is typically 5-15x smaller at no visible loss; AVIF goes further at a small encode surcharge
  • Transparency survives: gpt-image outputs with a transparent background stay transparent on webp, avif and png
  • Metadata is stripped by default; provenance manifests do not survive a re-encode anyway, so nothing is silently half-kept
  • Never upscaled: max_dimension only ever shrinks
  • Not smaller? Free. The result is still returned, but X-Pig-Billed is 0 and no free-tier slot is spent

One call

curl -X POST https://api.pictomancer.ai/v1/optimize_generated \
  -H "Content-Type: application/json" \
  -d '{"source": "https://your.cdn/gen-output.png", "format": "avif", "max_dimension": 1600}'

Or, from an MCP client, the tool is optimize_generated_image. Same parameters: source, format (webp default, avif, jpeg, png), max_dimension, q or quality_target.

From an agent

Point Claude, Cursor or any MCP client at https://api.pictomancer.ai/mcp and the tool shows up in tools/list next to resize, crop and convert. A2A agents find the same skill in the agent card. No account: the first 50 requests are free, then each one is paid per request with USDC on Base through x402, or with an API key.

Price

Same as convert: $0.002 per image under 1 MB, scaling with input size (1.5x from 1 MB, 2x from 5 MB). AVIF adds $0.001; quality_target adds a flat $0.004 for the SSIM search.

SDKs

Available in the Python, Node, PHP and Go SDKs and the n8n node as optimize_generated.