GIF → WebP (still)
Try it interactively →POST /api/gif-to-webp-stillConvert a GIF to a still WebP image. Extracts the first frame of the GIF and re-encodes it as a single-frame WebP via libwebp. Use GIF → animated WebP if you need to preserve the animation.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| gif* | file | — | Input GIF. |
| quality | number (1…100) | 75 | WebP quality (1–100). Ignored when lossless=true. |
| lossless | boolean | false | Encode losslessly. Preserves pixels exactly; larger output. |
Response
Modes: binary, json. Cache: yes (24h TTL).
Code samples
Built from the dog example.
# Download or substitute the example input:
# curl -O https://xtract.bot/examples/gif-extract-frames/dog.gif
GIF=$(base64 -w0 < dog.gif)
curl -X POST https://api.xtract.bot/api/gif-to-webp-still \
-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 '{
"gif": "'"$GIF"'"
}'