Convert image format

Convert an image to a different format (jpeg, png, webp, tiff, gif, avif). Optionally set quality, strip metadata, enable lossless mode (webp, avif), or tune encoder effort (avif). Instead of a q number you can set quality_target (0-1]: the smallest file with SSIM at or above the target, searched on the worker (jpeg, webp, avif; flat surcharge; outcome reported in X-Pictomancer-Quality-* headers). Optional enhancement modifiers: denoise (1-3), equalize, sharpen (applied denoise -> equalize -> op -> sharpen).

post/v1/convert

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/convert
  • Auth: none declared

Request body

sourcestring required

Image source: a public URL (https://...) or a base64-encoded string (optionally as a data URI like data:image/png;base64,...).

formatstring required

Target format: jpeg, png, webp, tiff, gif, or avif.

qinteger nullable

Quality (1-100). Maps to libvips Q parameter.

stripboolean nullable

Strip metadata (EXIF, ICC profile, etc.) from the output.

losslessboolean nullable

Enable lossless encoding. Only applies to webp and avif.

effortinteger nullable

AV1 encoder CPU effort (0-9). Higher = smaller file, slower. Only applies to avif.

quality_targetnumber nullable

Target SSIM (0-1]: the worker searches for the smallest file that still scores at least this. Alternative to q; mutually exclusive with it and with lossless. Only for jpeg, webp, avif. Carries a flat surcharge for the extra encodes.

autorotboolean nullable

Apply EXIF orientation before converting. Opt-in; default false, which preserves current byte-for-byte behavior.

denoiseinteger nullable

Median denoise before converting: radius 1-3 (window 3x3 to 7x7). Opt-in; no surcharge.

equalizeboolean nullable

Auto-contrast (histogram equalisation of the value channel; hue and saturation preserved) before converting. Opt-in.

sharpenboolean nullable

Unsharp-mask sharpen after converting (libvips defaults). Opt-in.

Response

Processed image binary

unknown required

Changes