Media
Herramienta profesional de redimensionamiento de imágenes con múltiples métodos, preservación de relación de aspecto y conversión de formato, incluida la funcionalidad de desenfoque de fondo, soportando GIF/Animated WebP/APNG y JPEG/PNG/WEBP.
Llama a esta herramienta desde tu código en tres lenguajes.
# 1) Request a presigned URL → returns { uploadUrl, storageKey }
curl -X POST 'https://api.elysiatools.com/api/upload/presign/image-resize' \
-H 'Content-Type: application/json' \
-d '{"filename":"imageFile.ext","contentType":"application/octet-stream","size":12345}'
# 2) PUT the file bytes directly to the presigned uploadUrl
curl -X PUT '<presigned uploadUrl>' \
--data-binary @/path/to/file.ext
# 3) Call the tool, passing the returned storageKey for each file field
curl -X POST 'https://api.elysiatools.com/es/api/tools/image-resize' \
-F 'imageFile=uploads/2026/01/01/your-tool-1700000000000-abc123.ext' \
-F 'resizeMode=pixels' \
-F 'width=0' \
-F 'height=0' \
-F 'aspectRatio=custom' \
-F 'fit=contain' \
-F 'position=center' \
-F 'background=#000000' \
-F 'blurBackground=true' \
-F 'blurSigma=20' \
-F 'kernel=lanczos3' \
-F 'format=original' \
-F 'quality=90' \
-F 'upscale=true' \
-F 'progressive=false' \
-F 'stripMetadata=true'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/image-resize| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| imageFile | filesubida requerida | Sí | — |
| resizeMode | select | No | — |
| width | number | No | — |
| height | number | No | — |
| aspectRatio | select | No | — |
| fit | select | No | — |
| position | select | No | — |
| background | color | No | — |
| blurBackground | checkbox | No | — |
| blurSigma | range | No | — |
| kernel | select | No | — |
| format | select | No | — |
| quality | range | No | — |
| upscale | checkbox | No | — |
| progressive | checkbox | No | — |
| stripMetadata | checkbox | 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-image-resize": {
"name": "image-resize",
"description": "Herramienta profesional de redimensionamiento de imágenes con múltiples métodos, preservación de relación de aspecto y conversión de formato, incluida la funcionalidad de desenfoque de fondo, soportando GIF/Animated WebP/APNG y JPEG/PNG/WEBP.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=image-resize",
"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": "image-resize",
"arguments": {
"imageFile": "https://example.com/file.ext",
"resizeMode": "pixels",
"width": 0,
"height": 0,
"aspectRatio": "custom",
"fit": "contain",
"position": "center",
"background": "#000000",
"blurBackground": true,
"blurSigma": 20,
"kernel": "lanczos3",
"format": "original",
"quality": 90,
"upscale": true,
"progressive": false,
"stripMetadata": true
}
}
}¿Dudas o problemas? Contacta con [email protected]