xtract.bot

GIF → WebP (still)

Try it interactively →
POST /api/gif-to-webp-still

Convert 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.

Takes a GIF and returns its first frame as a still WebP. Preserves transparency. If you want the full animation, use `gif-to-webp` (animated) instead — same encoder, but it packs every frame into a single animated WebP container.

Inputs

NameTypeDefaultDescription
gif*fileInput GIF.
qualitynumber (1…100)75WebP quality (1–100). Ignored when lossless=true.
losslessbooleanfalseEncode 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"'"
}'