Media
Convertir les images WebP au format WebP optimisé avec paramètres de compression avancés
Appelez cet outil depuis votre code en trois langages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/webp-to-optimized-webp' \
-F 'file=@/path/to/imageFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/fr/api/tools/webp-to-optimized-webp' \
-F 'imageFile=/path/to/file.ext' \
-F 'quality=85' \
-F 'effort=6' \
-F 'method=6' \
-F 'filterStrength=80' \
-F 'filterSharpness=2' \
-F 'filterType=1' \
-F 'smartSubsample=true' \
-F 'autoFilter=true' \
-F 'nearLossless=false'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/webp-to-optimized-webp| Nom | Type | Requis | Description |
|---|---|---|---|
| imageFile | fileupload requis | Oui | — |
| quality | range | Non | Higher quality = larger file size. 90+ enables near-lossless |
| effort | range | Non | Maximum effort for best compression ratio |
| method | range | Non | Maximum method for best compression quality |
| filterStrength | range | Non | Strength of the deblocking filter |
| filterSharpness | range | Non | Filter sharpness for preserving edges |
| filterType | number | Non | 0: simple, 1: strong, 2: cross |
| smartSubsample | checkbox | Non | Optimize chroma channel processing |
| autoFilter | checkbox | Non | Let the encoder choose optimal filter settings |
| nearLossless | checkbox | Non | Very high quality with minimal compression |
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-webp-to-optimized-webp": {
"name": "webp-to-optimized-webp",
"description": "Convertir les images WebP au format WebP optimisé avec paramètres de compression avancés",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=webp-to-optimized-webp",
"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": "webp-to-optimized-webp",
"arguments": {
"imageFile": "https://example.com/file.ext",
"quality": 85,
"effort": 6,
"method": 6,
"filterStrength": 80,
"filterSharpness": 2,
"filterType": 1,
"smartSubsample": true,
"autoFilter": true,
"nearLossless": false
}
}
}Des questions ou un problème ? Contactez [email protected]