Convert a PNG
Menu
Documentation
Type to search. Use the down arrow to browse results, or Escape to close them.

Convert an image

Upload a PNG or JPEG and receive its vector representation as an SVG string.

POST/api/vectorize

Request

Send the file using multipart/form-data. Let your HTTP client set the content type, including the multipart boundary.

Field Type Required Description
image File Yes A PNG or JPEG, within the file limits

The public URL is https://vectali.com/api/vectorize. The current endpoint does not require an Authorization header. No query parameters or processing options are part of this contract.

curl --fail-with-body \
  --request POST \
  --form 'image=@logo.png' \
  https://vectali.com/api/vectorize \
  --output result.json

Successful response

HTTP 200 returns application/json with an svg string, the output format, and information about this conversion. Responses use Cache-Control: no-store.

See the response fields for types and an illustrative payload.

Errors

An invalid request returns a non-success status code and JSON with an error message. Read the body as JSON before deciding what to show in your interface.

const response = await fetch("/api/vectorize", { method: "POST", body: form });
const result = await response.json();

if (!response.ok) {
  throw new Error(result.error ?? `Conversion failed (${response.status}).`);
}

See errors for 400, 413, 415, 422, and service failures.

Calling from a different origin

Use your application’s server to call Vectali when the browser page is hosted on another origin. The current endpoint does not declare cross-origin access headers. A successful server request does not imply the same request is allowed directly from any browser origin.

A useful next step? Read the journal