xtract.bot
POST /api/heic-to-webp

Convert HEIC / HEIF (the iPhone capture format) to WebP. Configurable quality, optional lossless mode, edge-cached.

Takes an HEIC or HEIF image and returns the same picture as WebP. WebP at quality 75 is roughly the perceptual equivalent of JPEG at quality 85 with 25-35% smaller files — a useful default for serving images to modern browsers. Set `lossless: true` for a pixel-perfect round-trip (the HEIC itself is still lossy upstream, but no further loss is added). Animated HEIC sequences are not supported — only the primary image is converted. Limits to be aware of: - Maximum image size: 5 megapixels. - iPhone tile-grid captures (full-resolution photos with the HDR gain map) are rejected with a clear error pointing you to re-export the photo at a lower resolution first.

Inputs

NameTypeDefaultDescription
image*fileHEIC or HEIF image bytes.
qualitynumber (1…100)75WebP quality 1–100. Default 75. Ignored when `lossless` is true.
losslessbooleanfalseLossless WebP encode. Slower and larger.

Response

Modes: binary, json. Cache: yes (24h TTL).