VectorYay
Start free

API

The same trace, from a request.

Upload a PNG, JPEG, TIFF, or GIF. Receive SVG, and optionally PDF, EPS, DXF, or AI. Authenticate with a bearer key. This site calls the tracer from the server. The browser does not hold that key.

Example
curl -sS -X POST "$API/v1/vectorize" \
  -H "Authorization: Bearer $VM_API_KEY" \
  -F "image=@logo.png" \
  -F 'settings={"mode":"fully-automatic","output_formats":["svg"]}'
Example
const body = new FormData();
body.append("image", file);
body.append("settings", JSON.stringify({ mode: "fully-automatic" }));

const response = await fetch(api + "/v1/vectorize", {
  method: "POST",
  headers: { Authorization: "Bearer " + apiKey },
  body,
});
// 200 when the result is already cached or you waited.
// 202 when the job is queued. Poll GET /v1/jobs/{id}.
Example
import { ApiClient, DefaultApi } from "vm-api";

const client = ApiClient.instance;
client.basePath = process.env.API_BASE_URL || "http://127.0.0.1:8080";
client.authentications.bearerAuth.accessToken = process.env.VM_API_KEY;

const api = new DefaultApi();
const usage = await api.getUsage();
Example
import os
import vm_api

configuration = vm_api.Configuration(
    host="http://127.0.0.1:8080",
    access_token=os.environ["VM_API_KEY"],
)
with vm_api.ApiClient(configuration) as client:
    api = vm_api.DefaultApi(client)
    print(api.get_usage())
Async
A cache hit or a waited request returns 200. Otherwise you get 202 and poll GET /v1/jobs/{id} until the status is succeeded, failed, or canceled.
Settings
Send a settings object: mode fully-automatic, basic, or advanced; image type; quality; color mode; optional palette and flatten. The defaults are enough to start.
Limits
The shipped defaults are 120 requests a minute per key and 600 per IP. Uploads default to 20 MB and an 8192 pixel edge. Preview traces are downscaled to a 256 pixel edge.
Keys
Keys are for your own code. This site cannot create or revoke them. Sign in with a key you already hold. The reference and the try-it page use that session and do not show the secret.

The reference is rendered from the OpenAPI file at Docs. A signed-in try-it lives at API explorer. Generated clients are in the repository and are not published from this site.

This site does not load analytics or advertising. After you sign in it stores your API key in the httpOnly cookie vm_session. The theme preference uses vm_theme. Dismissing this note stores vm_notice in this browser only.