Image info
Try it interactively →POST /api/image-infoInspect an image: format, dimensions, colour space, channel count, alpha presence, file size. Cheap and fast — no full decode of the pixel data.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| image* | file | — | PNG, JPEG, WebP, or GIF. |
Response
Modes: json. Cache: yes (24h TTL).
Code samples
Built from the png-tile example.
# Download or substitute the example input:
# curl -O https://xtract.bot/examples/image-png-to-webp/sample.png
IMAGE=$(base64 -w0 < sample.png)
curl -X POST https://api.xtract.bot/api/image-info \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
-H "X-Api-Key: $XTRACT_API_KEY" \
-d '{
"image": "'"$IMAGE"'"
}'