Your first SVG
Open the Vectali converter, choose a PNG, and run the conversion. Compare the original with the vector preview, then download the SVG.
Start with a clear logo or illustration with distinct shapes. The output follows the image you upload, so a cleaner source gives you a better starting point for editing.
- Choose your image. Upload a PNG up to 10 MiB and 4 million pixels.
- Inspect the result. Compare the edges and small details at the size you need.
- Download the SVG. Open it in your design tool or use it as an image on the web.
Make an API request
Send a multipart POST request to https://vectali.com/api/vectorize. The uploaded file belongs in a field named image.
curl --fail-with-body \
--request POST \
--form 'image=@logo.png' \
https://vectali.com/api/vectorize \
--output result.jsonconst form = new FormData();
form.append("image", file);
const response = await fetch("/api/vectorize", {
method: "POST",
body: form,
});
const result = await response.json();
if (!response.ok) throw new Error(result.error);
const svg = result.svg;from pathlib import Path
import requests
with open("logo.png", "rb") as image:
response = requests.post(
"https://vectali.com/api/vectorize",
files={"image": ("logo.png", image, "image/png")},
timeout=60,
)
response.raise_for_status()
Path("logo.svg").write_text(response.json()["svg"], encoding="utf-8")The JavaScript example uses a relative URL for code running on the Vectali origin. From your own application, call the endpoint from your server; browser requests from a different origin require CORS support.
The Python example uses the third-party requests package: install it with python -m pip install requests. It is an HTTP example, not a Vectali SDK.
Save the response
A successful request returns JSON. The svg property contains the SVG document as a string; save that string to a .svg file. Saving the entire JSON response as .svg will not produce a usable image.
# After the cURL example above, extract the SVG string.
python -c 'import json,pathlib; pathlib.Path("logo.svg").write_text(json.load(open("result.json"))["svg"], encoding="utf-8")'
Read the response reference for the other fields, or the full endpoint reference for request details.
Before you integrate
- Check file limits before uploading.
- Handle non-success status codes using the error reference.
- Keep the original image so you can compare or re-export later.
The current endpoint does not require an API key. There is no client SDK to install.