Media
Reducir el número de colores en imágenes GIF manteniendo calidad visual y animación
Llama a esta herramienta desde tu código en tres lenguajes.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/gif-to-colors-reduced-gif' \
-F 'file=@/path/to/gifFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/es/api/tools/gif-to-colors-reduced-gif' \
-F 'gifFile=/path/to/file.ext' \
-F 'colorReductionMethod=quantize' \
-F 'targetColors=128' \
-F 'ditheringMethod=floyd-steinberg' \
-F 'ditheringStrength=1' \
-F 'preserveTransparency=true' \
-F 'transparencyThreshold=128' \
-F 'adaptivePalette=true' \
-F 'multiFrameHandling=preserve-animation'Envía una petición POST con tus entradas en JSON. Los parámetros de tipo archivo requieren una subida previa.
POST https://api.elysiatools.com/es/api/tools/gif-to-colors-reduced-gif| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| gifFile | filesubida requerida | Sí | — |
| colorReductionMethod | select | No | — |
| targetColors | number | No | — |
| ditheringMethod | select | No | — |
| ditheringStrength | range | No | — |
| preserveTransparency | checkbox | No | — |
| transparencyThreshold | number | No | — |
| adaptivePalette | checkbox | No | — |
| multiFrameHandling | select | No | — |
Resultado de archivo
{
"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)"
}Añade esta herramienta a tu servidor Model Context Protocol para que los agentes de IA puedan listarla y llamarla.
Añade este bloque a la configuración de tu cliente MCP:
{
"mcpServers": {
"elysiatools-gif-to-colors-reduced-gif": {
"name": "gif-to-colors-reduced-gif",
"description": "Reducir el número de colores en imágenes GIF manteniendo calidad visual y animación",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=gif-to-colors-reduced-gif",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Tras conectar al endpoint SSE, lista las herramientas expuestas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoca la herramienta por su id; los argumentos se construyen a partir de sus parámetros:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "gif-to-colors-reduced-gif",
"arguments": {
"gifFile": "https://example.com/file.ext",
"colorReductionMethod": "quantize",
"targetColors": 128,
"ditheringMethod": "floyd-steinberg",
"ditheringStrength": 1,
"preserveTransparency": true,
"transparencyThreshold": 128,
"adaptivePalette": true,
"multiFrameHandling": "preserve-animation"
}
}
}¿Dudas o problemas? Contacta con [email protected]