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:

  1. Open the converter or API endpoint
  2. Send a raster image
  3. 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

ParameterTypeDescription
fileFileImage file (JPG, PNG, WebP)
optionsJSONOptional 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

CodeDescription
400Bad Request - Missing file or invalid parameters
401Unauthorized - Invalid or missing API key
402Payment Required - Insufficient credits
413Payload Too Large - File exceeds size limit
500Internal Server Error - Conversion failed

Support

Need help? Reach us at support@convert2svg.org