API Documentation
Convert at scale
Use the Convert2SVG API to automate raster-to-vector conversions in your own workflows.
Quick Start
Get started in three steps:
- Open the converter or API endpoint
- Send a raster image
- Download the SVG response
curl -X POST https://convert2svg.org/api/v1/convert \
-F "file=@image.jpg"
# Response
{
"success": true,
"svg": "<svg>...</svg>",
"metadata": {
"originalSize": 1048576,
"svgSize": 204800,
"creditsUsed": 1,
"creditsRemaining": 29
}
}Authentication
No authentication is required at this time. If that changes, we will document it here.
POST /api/v1/convert
Convert a raster image to SVG format.
Request Parameters
| Parameter | Type | Description |
|---|---|---|
file | File | Image file (JPG, PNG, WebP) |
options | JSON | Optional conversion settings |
Options Object
{
"detail": 70, // 0-100, higher = more detail
"colorCount": 16, // 2-64, number of colors
"smoothing": 60 // 0-100, path smoothing
}Response
{
"success": true,
"svg": "<svg xmlns=\"http://www.w3.org/2000/svg\">...</svg>",
"metadata": {
"originalSize": 1048576,
"svgSize": 204800,
"creditsUsed": 1,
"creditsRemaining": 29
}
}Error Codes
| Code | Description |
|---|---|
400 | Bad Request - Missing file or invalid parameters |
401 | Unauthorized - Invalid or missing API key |
402 | Payment Required - Insufficient credits |
413 | Payload Too Large - File exceeds size limit |
500 | Internal Server Error - Conversion failed |
Support
Need help? Reach us at support@convert2svg.org