Media
Extend image canvas with gradient backgrounds for modern design effects and smooth transitions
Call this tool from your code in three languages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/image-extend-gradient' \
-F 'file=@/path/to/imageFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/en/api/tools/image-extend-gradient' \
-F 'imageFile=/path/to/file.ext' \
-F 'gradientType=linear' \
-F 'startColor=#000000' \
-F 'endColor=#ffffff' \
-F 'angle=45' \
-F 'uniformPadding=50' \
-F 'topPadding=0' \
-F 'rightPadding=0' \
-F 'bottomPadding=0' \
-F 'leftPadding=0' \
-F 'format=original' \
-F 'quality=90'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/image-extend-gradient| Name | Type | Required | Description |
|---|---|---|---|
| imageFile | fileupload required | Yes | Upload any image file (JPEG, PNG, WebP, TIFF, GIF, BMP) |
| gradientType | select | Yes | Choose the type of gradient background |
| startColor | color | Yes | Starting color of the gradient |
| endColor | color | Yes | Ending color of the gradient |
| angle | number | No | Angle for linear gradient (0-360 degrees) |
| uniformPadding | number | No | Extension to add on all sides |
| topPadding | number | No | Extension to add to the top edge |
| rightPadding | number | No | Extension to add to the right edge |
| bottomPadding | number | No | Extension to add to the bottom edge |
| leftPadding | number | No | Extension to add to the left edge |
| format | select | No | Choose output format or keep original |
| quality | number | No | Output quality for lossy formats (JPEG, WebP). Higher = better quality but larger file size |
File result
{
"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)"
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-image-extend-gradient": {
"name": "image-extend-gradient",
"description": "Extend image canvas with gradient backgrounds for modern design effects and smooth transitions",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=image-extend-gradient",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "image-extend-gradient",
"arguments": {
"imageFile": "https://example.com/file.ext",
"gradientType": "linear",
"startColor": "#000000",
"endColor": "#ffffff",
"angle": 45,
"uniformPadding": 50,
"topPadding": 0,
"rightPadding": 0,
"bottomPadding": 0,
"leftPadding": 0,
"format": "original",
"quality": 90
}
}
}Questions or issues? Contact [email protected]