amnt docs
SVG engine

Image to SVG

What traces well, what does not, and how to prepare a file before you send it.

Send it

POST /api/v1/svg/vectorize

curl -X POST https://www.amnt.io/api/v1/svg/vectorize \
  -H "Authorization: Bearer amnt_sk_..." \
  -H "Content-Type: application/json" \
  -d '{ "image": "https://example.com/logo.png", "detail": "high" }'

image accepts three things:

FormExample
https URL"https://example.com/logo.png"
Data URI"data:image/png;base64,iVBOR..."
Bare base64"iVBOR..."

Limit: 10 MB. Anything larger is rejected with 400 before you are charged.

The URL is fetched server-side and checked against a private-address guard before it is used. An image URL pointing at localhost, a link-local address or an internal range is refused, not fetched.

What traces well

Traces cleanlyTraces as an interpretation
LogosPhotographs
Icons and glyphsSoft gradients
Flat illustrationHeavy texture or noise
Line artFilm grain
Diagrams and chartsAnything relying on blur
Pixel artVery small text

A photo is not a failure, it is a different output: you get an illustration that looks like the photo. If you need the photo, keep the photo.

Preparing a file

  1. Bigger is better. The engine enlarges 2x before tracing, but it cannot invent detail that is not in the source. 1024px on the long edge is a good floor.
  2. Flatten the background. A single solid colour behind the subject cuts cleanly. A photograph behind it does not.
  3. Do not pre-sharpen. Unsharp mask leaves a halo that traces as its own shape.

Detail

detailPathsUse it for
lowfewestBold marks, screen print, vinyl cutting
mediumbalancedDefault. Removes the grain that makes a trace look traced
highmostClosest to the picture, largest file

Colour count

colors caps the palette, 2 to 64. Lower means fewer shapes and a smaller file. A two colour logo should be told so:

{ "image": "https://example.com/logo.png", "colors": 2 }

palette goes further and snaps every colour to a list you supply, which is how you make a trace land exactly on brand colours:

{
  "image": "https://example.com/logo.png",
  "palette": ["#1a2b3c", "#f5f0e8", "#d97757"]
}

Background

For vectorize the default is "keep", because cutting a backdrop you did not ask to cut would be rude. Set "background": "transparent" to remove a flat one.

Transparent mode is what removes the pale ring round a cut-out. Each edge pixel takes the colour of the solid pixel just inside it, so the old background does not survive as a halo.

On this page