Image to SVG Vectorizer API - trace PNG/JPG logos & icons into clean SVG
image_to_svgTrace raster images (PNG, JPG, WebP) into scalable SVG vector paths using Potrace: monochrome black-and-white (with auto Otsu or custom threshold) or stacked multi-colour vector layers (2 to 16 colours). Runs on our server, files are deleted right after the call, nothing stored. Free: 5 calls/day per IP. Paid: Radar API key (from €15/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.003/call via x402 at https://radarbg.com/x402/image-to-svg.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mode": "bw",
"detail": "normal",
"fileName": "sample.png",
"fileContent": "iVBORw0KGgoAAAANSUhEUgAAAHgAAABQCAIAAABd+SbeAAAA6klEQVR4nO3cQQ2DABAAwdKgg1cFVQIykIOEyqiIisFDKdsQZv6XXDb3vmFa3jeOd//3AlchdEToiNARoSNCR4SOCB0ROiJ0ROiI0BGhI0JHhI4IHRE6InRE6Mi4Z/jznH+0xmk8Xut3gy46InRE6IjQEaEjQkeEjggdEToidEToiNARoSNCR4SOCB0ROiJ0ROiI0BGhI0JHhI4IHRE6InRE6IjQEaEjQkeEjggdEToidEToiNARoSNCR4SOCB0ZPIFtuOiI0BGhI0JHhI4IHRE6InRE6IjQEaEjQkeEjggdEToidEToiNCRDexBBl0OjJSaAAAAAElFTkSuQmCC"
},
"name": "image_to_svg"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | bw (black and white) or color (stacked colour layers) | bw |
| color | No | Foreground HEX or CSS colour name when mode=bw | black |
| files | No | Or several files: [{fileName, fileContent (base64)}] (up to 60 files, 20 MB total) | |
| colors | No | Number of colour layers when mode=color: 2, 4, 6, 8, 12 or 16 | 8 |
| detail | No | Tracing detail: smooth, normal or fine | normal |
| invert | No | Trace light regions instead of dark when mode=bw | |
| fileName | No | File name with extension, e.g. report.pdf | |
| threshold | No | Optional monochrome cut-off 1-254 (0 = automatic Otsu) | |
| fileContent | No | The file as base64 (a data: URI is fine; 20 MB total decoded limit per call) | |
| whiteBackground | No | Add solid white background rectangle when mode=bw |