Media
Convert AVIF images to WebP format with advanced compression options and web optimization
Call this tool from your code in three languages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/avif-to-webp' \
-F 'file=@/path/to/imageFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/en/api/tools/avif-to-webp' \
-F 'imageFile=/path/to/file.ext' \
-F 'quality=85' \
-F 'lossless=false' \
-F 'nearLossless=false' \
-F 'effort=4' \
-F 'smartSubsample=false' \
-F 'alphaQuality=85' \
-F 'keepMetadata=false' \
-F 'resizeMethod=cover' \
-F 'targetSize=e.g., 800:600 or just 800'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/avif-to-webp| Name | Type | Required | Description |
|---|---|---|---|
| imageFile | fileupload required | Yes | — |
| quality | range | No | WebP quality level (0-100). Higher values = better quality, larger file size. |
| lossless | checkbox | No | Compress without any quality loss (overrides quality setting) |
| nearLossless | checkbox | No | Almost perfect quality with good compression (min quality: 85) |
| effort | range | No | Higher values = better compression but slower processing |
| smartSubsample | checkbox | No | Enable smart chroma subsampling for potentially better quality |
| alphaQuality | range | No | Quality setting for alpha/transparency channel when present |
| keepMetadata | checkbox | No | Preserve original image metadata (EXIF, IPTC, XMP) |
| resizeMethod | select | No | — |
| targetSize | text | No | Target dimensions (width:height or just width). Height calculated if omitted. |
File result
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-avif-to-webp": {
"name": "avif-to-webp",
"description": "Convert AVIF images to WebP format with advanced compression options and web optimization",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=avif-to-webp",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "avif-to-webp",
"arguments": {
"imageFile": "https://example.com/file.ext",
"quality": 85,
"lossless": false,
"nearLossless": false,
"effort": 4,
"smartSubsample": false,
"alphaQuality": 85,
"keepMetadata": false,
"resizeMethod": "cover",
"targetSize": "e.g., 800:600 or just 800"
}
}
}Questions or issues? Contact [email protected]