Media
Optimize AVIF images for better compression and performance while maintaining visual quality
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-optimized-avif' \
-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-optimized-avif' \
-F 'imageFile=/path/to/file.ext' \
-F 'quality=80' \
-F 'effort=4' \
-F 'chromaSubsampling=4:2:0' \
-F 'lossless=false' \
-F 'targetSize=Enter target file size in KB...' \
-F 'maxFileSize=Enter maximum file size in KB...' \
-F 'denoiseLevel=0' \
-F 'sharpness=1' \
-F 'clearMetadata=true' \
-F 'removeExif=false' \
-F 'keepColorProfile=false' \
-F 'preserveTransparency=true'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-optimized-avif| Name | Type | Required | Description |
|---|---|---|---|
| imageFile | fileupload required | Yes | — |
| quality | range | No | Output quality (1-100, higher is better but larger) |
| effort | range | No | Compression effort (0=fast, 9=slowest but best compression) |
| chromaSubsampling | select | No | Chroma subsampling for color compression |
| lossless | checkbox | No | Use lossless compression for perfect quality |
| targetSize | text | No | Target file size for optimization (KB) |
| maxFileSize | text | No | Maximum allowed file size (KB) |
| denoiseLevel | range | No | Noise reduction level (0=none, 10=maximum) |
| sharpness | range | No | Image sharpening level (0=none, 10=maximum) |
| clearMetadata | checkbox | No | Remove all metadata for maximum compression |
| removeExif | checkbox | No | Remove EXIF metadata while keeping color profile |
| keepColorProfile | checkbox | No | Preserve original color profile (may increase file size) |
| preserveTransparency | checkbox | No | Keep alpha channel for transparency |
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-optimized-avif": {
"name": "avif-to-optimized-avif",
"description": "Optimize AVIF images for better compression and performance while maintaining visual quality",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=avif-to-optimized-avif",
"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-optimized-avif",
"arguments": {
"imageFile": "https://example.com/file.ext",
"quality": 80,
"effort": 4,
"chromaSubsampling": "4:2:0",
"lossless": false,
"targetSize": "Enter target file size in KB...",
"maxFileSize": "Enter maximum file size in KB...",
"denoiseLevel": 0,
"sharpness": 1,
"clearMetadata": true,
"removeExif": false,
"keepColorProfile": false,
"preserveTransparency": true
}
}
}Questions or issues? Contact [email protected]