SVG Converter API

Convert PNG and JPG images to full-color SVG from your own code. Send an image, get the SVG back as JSON. It's the same tracer and settings as the website.

Quick start

  1. 1. Create a key

    Sign in on your account page and create an API key. It's shown once, so copy it then.

  2. 2. Pick a plan

    Choose how many conversions you need each month on the same page. See pricing.

  3. 3. Send an image

    POST the image with your key, as below. Keep the key on your server, never in browser code.

curl https://svgconverter.online/api/v1/vectorize \
  -H "Authorization: Bearer $SVGCONVERTER_API_KEY" \
  -H "Content-Type: image/png" \
  --data-binary @logo.png \
  --max-time 120 \
  | jq -r .svg > logo.svg

API reference

Endpoint

POST https://svgconverter.online/api/v1/vectorize

Authentication

Send your key in the Authorization header: Bearer YOUR_API_KEY. Create and revoke keys on your account page.

Request

The raw image file is the request body, with a matching Content-Type: image/png, image/jpeg, image/webp or image/gif. Transparent areas stay transparent in the SVG. Colors are picked automatically, the same way as on the website.

Options

One optional query parameter on the endpoint URL:

gradients
true (default): smooth color ramps become SVG gradients. false: flat colors only, e.g. for cutting, embroidery or screen printing. Example: https://svgconverter.online/api/v1/vectorize?gradients=false

Response

JSON with the SVG and its size in pixels, which is the size of the image you sent.

{
  "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 4096 4096\" width=\"1024\" height=\"1024\">…</svg>",
  "width": 1024,
  "height": 1024
}
svg
The SVG document. It has a viewBox, so it scales to any size.
width, height
The SVG's size in pixels, equal to the uploaded image.

Quota

Each successful conversion counts once against your monthly plan; failed ones don't count. Every response carries X-Quota-Limit and X-Quota-Remaining. The count resets on the 1st of each month (UTC).

Errors

Errors come back as JSON: { "error": "…" }.

400
The body is empty or isn't a readable image, or gradients isn't true or false.
401
The API key is wrong or has been revoked.
402
This month's conversions are used up, or the account has no plan.
403
No API key was sent. Check the Authorization header.
413
The request is larger than 4.5 MB.
503
A temporary problem on our side. Retry after a few seconds.

Limits and timing

Up to 4.5 MB per request. Images are traced at up to 4096 px on the longest side. Most images take 10-20 seconds and complex ones up to a minute, so set your client's timeout to at least 120 seconds.