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

Convert WebP to JPEG. Configurable quality (1–100). Transparency is flattened against white because JPEG has no alpha channel.

Reads a WebP image and returns the same picture as a JPEG. Quality is configurable (default 80) — `1` is tiny and ugly, `100` is near-lossless and large. WebP transparency must be flattened because JPEG does not support an alpha channel. The decoder composites the image over an opaque white background before encoding. Animated WebP inputs aren't supported here — only the first frame's still image is converted. Use `image-webp-animated-to-frames` first if you need every frame.

Inputs

NameTypeDefaultDescription
image*fileWebP bytes.
qualitynumber (1…100)80JPEG quality 1–100. Default 80.

Response

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

Code samples

Built from the default example.

# Download or substitute the example input:
#   curl -O https://xtract.bot/examples/image-webp-to-png/sample.webp
IMAGE=$(base64 -w0 < sample.webp)

curl -X POST https://api.xtract.bot/api/webp-to-jpeg \
  -H "Content-Type: application/json" \
  -H "Accept: application/octet-stream" \
  -H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
  -H "X-Api-Key: $XTRACT_API_KEY" \
  -d '{
  "quality": 80,
  "image": "'"$IMAGE"'"
}'