Media
Convertir plusieurs fichiers image entre différents formats comme JPG, PNG, WebP, AVIF, TIFF, GIF avec réglages de qualité et traitement par lot
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-batch-convert' \
-H 'Content-Type: application/json' \
-d '{"filename":"imageFiles.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-batch-convert' \
-F 'imageFiles=photo.jpg' \
-F 'outputFormat=webp' \
-F 'quality=85' \
-F 'resizeWidth=0' \
-F 'resizeHeight=0' \
-F 'maintainAspect=true' \
-F 'backgroundColor=white' \
-F 'keepMetadata=true' \
-F 'keepOriginalNames=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-batch-convert| Nom | Type | Requis | Description |
|---|---|---|---|
| imageFiles | fileupload requis | Oui | — |
| outputFormat | select | Oui | — |
| quality | range | Non | Qualité de l'image de sortie (1-100) |
| resizeWidth | number | Non | Largeur cible en pixels (laisser vide pour garder l'original) |
| resizeHeight | number | Non | Hauteur cible en pixels (laisser vide pour garder l'original) |
| maintainAspect | checkbox | Non | — |
| backgroundColor | select | Non | Utilisé pour les formats qui ne supportent pas la transparence (JPG) |
| keepMetadata | checkbox | Non | — |
| keepOriginalNames | 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-batch-convert": {
"name": "image-batch-convert",
"description": "Convertir plusieurs fichiers image entre différents formats comme JPG, PNG, WebP, AVIF, TIFF, GIF avec réglages de qualité et traitement par lot",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=image-batch-convert",
"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-batch-convert",
"arguments": {
"imageFiles": [
"photo.jpg"
],
"outputFormat": "webp",
"quality": 85,
"resizeWidth": 0,
"resizeHeight": 0,
"maintainAspect": true,
"backgroundColor": "white",
"keepMetadata": true,
"keepOriginalNames": true
}
}
}Des questions ou un problème ? Contactez [email protected]