WebP → JPEG
Try it interactively →POST /api/webp-to-jpegConvert WebP to JPEG. Configurable quality (1–100). Transparency is flattened against white because JPEG has no alpha channel.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| image* | file | — | WebP bytes. |
| quality | number (1…100) | 80 | JPEG 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"'"
}'