Media
Optimize GIF images with advanced compression techniques 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/gif-to-optimized-gif' \
-F 'file=@/path/to/gifFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/en/api/tools/gif-to-optimized-gif' \
-F 'gifFile=/path/to/file.ext' \
-F 'optimizationLevel=medium' \
-F 'colorReduction=auto' \
-F 'customColors=0' \
-F 'ditheringMethod=floyd-steinberg' \
-F 'backgroundColor=transparent' \
-F 'customBackgroundColor=#ffffff' \
-F 'preserveTransparency=true' \
-F 'adaptivePalette=true' \
-F 'interlaced=false' \
-F 'loopCount=0' \
-F 'removeMetadata=true' \
-F 'targetFileSize=0'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/gif-to-optimized-gif| Name | Type | Required | Description |
|---|---|---|---|
| gifFile | fileupload required | Yes | — |
| optimizationLevel | select | No | — |
| colorReduction | select | No | — |
| customColors | number | No | — |
| ditheringMethod | select | No | — |
| backgroundColor | select | No | — |
| customBackgroundColor | color | No | — |
| preserveTransparency | checkbox | No | — |
| adaptivePalette | checkbox | No | — |
| interlaced | checkbox | No | — |
| loopCount | number | No | — |
| removeMetadata | checkbox | No | — |
| targetFileSize | number | No | — |
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-gif-to-optimized-gif": {
"name": "gif-to-optimized-gif",
"description": "Optimize GIF images with advanced compression techniques while maintaining visual quality",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=gif-to-optimized-gif",
"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": "gif-to-optimized-gif",
"arguments": {
"gifFile": "https://example.com/file.ext",
"optimizationLevel": "medium",
"colorReduction": "auto",
"customColors": 0,
"ditheringMethod": "floyd-steinberg",
"backgroundColor": "transparent",
"customBackgroundColor": "#ffffff",
"preserveTransparency": true,
"adaptivePalette": true,
"interlaced": false,
"loopCount": 0,
"removeMetadata": true,
"targetFileSize": 0
}
}
}Questions or issues? Contact [email protected]