Trace PNG or JPEG to SVG

Upload a dark logo, signature or line drawing on a light background. The vectorizer follows the outlines and writes black SVG paths that you can scale or edit. Choose a higher threshold to pick up faint pencil lines or a lower one to leave out a gray paper background.

The whole API
curl -fsS https://aisenseapi.com/services/v1/image_vectorize \
  -F "file=@mark.png" \
  -F "threshold=65" -o traced.json &&
curl -fsS "$(jq -er .storage_url traced.json)" -o traced.svg
PNG or JPEG input Black SVG paths No API key 24-hour Storage

Try it in the browser

This form posts your image to the same endpoint and shows the stored result. The image is sent to aisenseapi.com, and the result is kept for 24 hours at a link that anyone with the link can open.

Drop an image here or click to choose one, or paste it with Ctrl+V. JPEG or PNG, up to 10 MB.

What gets traced

The service places transparent pixels on white and fits the whole image inside 1024 × 1024, preserving its proportions. Smaller images keep their size. Pixels darker than the threshold form the black foreground. The remaining area is transparent. This works best for silhouettes and line art. In a photograph, color and shading collapse into a single foreground shape or a set of outlines.

Trace and download

Send POST /services/v1/image_vectorize as multipart/form-data.

FieldRequiredValue
fileyesA JPEG or PNG up to 10 MB and 25 megapixels.
thresholdnoAn integer from 1 to 99. The default is 50.

The command at the top uses curl and jq. Give it a local mark.png, use file=@scan.jpg for a JPEG, or create a sample PNG with the SVG-to-PNG example. The POST saves a JSON receipt to traced.json. The GET downloads the SVG into traced.svg.

Result fields

FieldMeaning
storage_id, storage_urlWhere the result is. A GET on the URL returns it.
sha256_hash, bytesThe digest and size of the stored result.
expire_timestamp, expire_datetimeWhen the result is removed, 24 hours after it was stored.
content_type, format, filenameimage/svg+xml, svg, and the suggested download name.
operation, thresholdimage_vectorize and the threshold used for the trace.
width, heightDimensions of the traced image.
input_format, input_bytesFormat and size of the uploaded image.

The receipt identifies the file as image/svg+xml. Storage serves the bytes as application/octet-stream, so use the download button or save the file as result.svg. The link expires after 24 hours. A white image produces a transparent SVG. If a detailed trace returns HTTP 413, simplify or downsize the source and try again.

Errors

A refused request stores nothing and answers with error. The endpoint's own refusals also carry fix, a sentence saying what to send instead.

StatusWhen
400The threshold is outside 1 to 99, a field is invalid or the image cannot be decoded.
405The method is not POST.
413The upload, its number of pixels or the result is over a limit.
415The body is not multipart/form-data, or the file is not a JPEG or PNG.
429More than 5000 requests from one IP address per day, or the day's Storage budget is used up.
503The image service is busy, timed out or unavailable.

Questions

Will the SVG keep my colors?

The SVG uses black paths on transparent space. Use the image converter for a full-color raster result.

How do I keep more of a faint drawing?

Raise the threshold to include lighter pixels. Lower it if shadows or paper texture start to appear.

All image endpoints All free public APIs