/api/v1/vectorizeRequest
The public endpoint is https://api.vectali.com/api/v1/vectorize. Send multipart/form-data, allowing your HTTP client to set the content type and its boundary.
| Field | Type | Required | Description |
|---|---|---|---|
image |
File | Yes | Exactly one PNG, JPG, GIF, BMP or WebP within the file limits. |
No query parameters or processing options are part of this endpoint’s contract.
Authentication
| Header | Required | Value |
|---|---|---|
Authorization |
Yes | Bearer vt_live_..., using a key created in the dashboard. |
Idempotency-Key |
Recommended | A unique identifier for this conversion, reused on retries. |
Keep API keys in your server environment or secret manager. A missing, malformed, revoked, or unknown key returns 401. Do not send keys in query parameters or expose them to a browser client.
# Set a new request ID for each new conversion; keep it for retries.
REQUEST_ID="logo-upload-20261015-001"
curl --fail-with-body \
https://api.vectali.com/api/v1/vectorize \
--header "Authorization: Bearer $VECTALI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--form 'image=@logo.png' \
--output result.jsonimport { readFile, writeFile } from "node:fs/promises";
import { randomUUID } from "node:crypto";
const apiKey = process.env.VECTALI_API_KEY;
if (!apiKey) throw new Error("Set VECTALI_API_KEY on your server.");
const requestId = randomUUID(); // Keep this value when retrying this conversion.
const body = new FormData();
body.append("image", new Blob([await readFile("logo.png")], {
type: "image/png",
}), "logo.png");
const response = await fetch("https://api.vectali.com/api/v1/vectorize", {
method: "POST",
headers: {
Authorization: `Bearer ${apiKey}`,
"Idempotency-Key": requestId,
},
body,
signal: AbortSignal.timeout(240_000),
});
const result = await response.json();
if (!response.ok) throw new Error(result.error ?? "Conversion failed.");
await writeFile("logo.svg", result.svg, "utf8");from pathlib import Path
import os
import uuid
import requests
request_id = str(uuid.uuid4()) # Reuse this value for retries.
with open("logo.png", "rb") as image:
response = requests.post(
"https://api.vectali.com/api/v1/vectorize",
headers={
"Authorization": f"Bearer {os.environ['VECTALI_API_KEY']}",
"Idempotency-Key": request_id,
},
files={"image": ("logo.png", image, "image/png")},
timeout=240,
)
response.raise_for_status()
Path("logo.svg").write_text(response.json()["svg"], encoding="utf-8")Idempotency and retries
Use an Idempotency-Key containing 8–128 letters, digits, periods, underscores, colons, or hyphens. A UUID works well. Both v1 and the supported legacy /api/vectorize endpoint generate a new key if it is omitted, so a later request cannot recover the original attempt by itself. MCP instead derives an automatic key from the image bytes; see agents and MCP.
- Completed request: the same key returns the saved result and its original
conversion_id, without another conversion charge. - Still processing: the same key returns
409with codeconversion_in_progress. Wait before retrying with that key. - Failed request: unsuccessful conversion work releases its reserved allowance. Retry the same logical request with the same key.
- Different image or new conversion: use a new key. Reusing a completed key with different bytes returns
409 idempotency_conflict; it does not convert or charge for the new upload.
Keep the source file and request ID until you have received the result. After a lost connection, retry with that same ID rather than creating another conversion.
Usage and saved results
API plans include 500–100,000 credits per billing period. One successful conversion uses one credit. Unused monthly credits do not roll over. Requests reserve an allowance while processing; failed conversions release it. A completed replay does not spend another allowance. Administrator-granted API credits work without a subscription, never expire, and are used after monthly allowance. 402 means neither source has available credits.
API inputs, SVG outputs, and conversion metadata are saved to your account’s private history. The browser’s “remember history” preference controls browser saves; it does not turn off API result storage needed for replay. See privacy.
Successful response
HTTP 200 returns application/json with conversion_id, svg, format, processing_ms, paths, and optimized_bytes. The conversion ID is also returned in X-Conversion-Id. Responses use Cache-Control: no-store.
See the response reference for field types and an illustrative payload.
Calling from your application
Call the API from your application’s server. Browser access is restricted to Vectali’s configured origins; the API is not a public cross-origin upload endpoint for arbitrary websites. Keep your Vectali key server-side and authenticate your own users before accepting uploads through your application.
Read the error reference before implementing retries. API plans include 500–100,000 successful conversions per billing period. See pricing for monthly totals and per-image rates. Manage your subscription from the dashboard’s billing settings; Stripe checkout processes real payments.
Download SVG, PDF, EPS or DXF
After conversion, use the returned conversion_id with the same account’s API key:
curl "https://api.vectali.com/api/v1/files/$CONVERSION_ID/pdf" \
-H "Authorization: Bearer $VECTALI_API_KEY" \
--output artwork.pdf
Replace pdf with svg, eps or dxf. The response is the file bytes with the corresponding content type and download filename. This endpoint verifies ownership and uses the saved SVG; it does not retrace the image or consume another conversion. It also works through the supported /api/files/ alias. An export failure leaves the saved conversion available for retry.
Read the format and animation notes before choosing EPS or DXF. GIF and animated WebP inputs use the first frame.
The billing response retains the apiStarter field name for compatibility. apiCredits.available reports non-expiring granted credits; add it to apiStarter.remaining for total available conversions. Its plan identifies the current API tier and limit is the actual monthly allowance (500–100,000); clients should read these values rather than assume Starter.