Media
Convertir les images WebP au format WebP avec perte avec réduction de qualité contrôlée
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-webp-lossy' \
-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-webp-lossy' \
-F 'imageFile=/path/to/file.ext' \
-F 'quality=80' \
-F 'effort=4' \
-F 'method=4' \
-F 'alphaQuality=80' \
-F 'smartSubsample=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-webp-lossy| Nom | Type | Requis | Description |
|---|---|---|---|
| imageFile | fileupload requis | Oui | — |
| quality | range | Non | — |
| effort | number | Non | — |
| method | number | Non | — |
| alphaQuality | range | Non | Set quality for alpha/transparency channel when present |
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-webp-lossy": {
"name": "webp-to-webp-lossy",
"description": "Convertir les images WebP au format WebP avec perte avec réduction de qualité contrôlée",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=webp-to-webp-lossy",
"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-webp-lossy",
"arguments": {
"imageFile": "https://example.com/file.ext",
"quality": 80,
"effort": 4,
"method": 4,
"alphaQuality": 80,
"smartSubsample": false
}
}
}| smartSubsample | checkbox | Non | Use smart subsampling for potentially better quality with chroma channels |
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)"
}Des questions ou un problème ? Contactez [email protected]