Media
Outil professionnel de redimensionnement d'image avec plusieurs méthodes, préservation du rapport d'aspect et conversion de format, y compris le flou de fond, supportant GIF/Animated WebP/APNG et JPEG/PNG/WEBP.
Appelez cet outil depuis votre code en trois langages.
# 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/fr/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'Envoyez une requête POST avec vos entrées en JSON. Les paramètres de type fichier nécessitent un upload préalable.
POST https://api.elysiatools.com/fr/api/tools/image-resize| Nom | Type | Requis | Description |
|---|---|---|---|
| imageFile | fileupload requis | Oui | — |
| resizeMode | select | Non | — |
| width | number | Non | — |
| height | number | Non | — |
| aspectRatio | select | Non | — |
| fit | select | Non | — |
| position | select | Non | — |
| background | color | Non | — |
| blurBackground | checkbox | Non | — |
| blurSigma | range | Non | — |
| kernel | select | Non | — |
| format | select | Non | — |
| quality | range | Non | — |
| upscale | checkbox | Non | — |
| progressive | checkbox | Non | — |
| stripMetadata | checkbox | Non | — |
Résultat fichier
{
"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)"
}Ajoutez cet outil à votre serveur Model Context Protocol pour que les agents IA puissent le lister et l'appeler.
Ajoutez ce bloc à la configuration de votre client MCP :
{
"mcpServers": {
"elysiatools-image-resize": {
"name": "image-resize",
"description": "Outil professionnel de redimensionnement d'image avec plusieurs méthodes, préservation du rapport d'aspect et conversion de format, y compris le flou de fond, supportant GIF/Animated WebP/APNG et JPEG/PNG/WEBP.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=image-resize",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Après connexion au point d'accès SSE, listez les outils exposés :
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Appelez l'outil par son id ; les arguments sont construits à partir de ses paramètres :
{
"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
}
}
}Des questions ou un problème ? Contactez [email protected]