Home / API docs / Image Vectorization API
Design & Assets

Image Vectorization API

POST /api/vectorize $0.10 per call USDC on Base · x402

High-quality image vectorization powered by Vectorizer.AI: POST a public image URL or base64 (PNG/JPEG/GIF/BMP/WebP, up to 10 MB) and get a production-grade vector back — SVG by default, or PNG/PDF/EPS/DXF. Full-color tracing, clean paths, ready for print, cutting, and scaling. The premium finish for logos, icons, sketches, and raster art.

Parameters

NameInDescription
urlbodyPublic URL of the raster image to vectorize (PNG, JPEG, GIF, BMP, WebP; max 10 MB)
image_base64bodyBase64-encoded image as an alternative to url (data URIs accepted)
output_formatbodysvg (default), png, pdf, eps, or dxf
modebodyproduction (default, full quality), preview, or test
max_colorsbodyLimit the color count, 0-256 (0 = unlimited). Great for flat/logo looks
palettebodyForce a specific palette: array of hex or CSS color names — output only uses these colors
draw_stylebodyfill_shapes (default), stroke_shapes, or stroke_edges (line-art outlines)
group_bybodySVG shape grouping: none (default), color, parent, or layer
scalebodyOutput size multiplier vs input, 0-100 (e.g. 2 = double size)
min_area_pxbodyDrop shapes smaller than this many pixels (0-10000) — despeckling
optionsbodyRaw passthrough for any documented Vectorizer.AI option, e.g. {"output.gap_filler.enabled": false} — see vectorizer.ai/api

Example request

curl -X POST "https://api.webbersites.com/api/vectorize" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/logo.png","output_format":"svg"}'
# first call returns 402 + payment requirements; an x402 client pays and retries automatically

Example response

{
    "source": "https://example.com/logo.png",
    "mode": "production",
    "output_format": "svg",
    "content_type": "image/svg+xml",
    "input_bytes": 48211,
    "output_bytes": 15302,
    "svg": "<svg …>",
    "engine": "vectorizer.ai"
}
MCP tool: post_vectorize — via npx -y webbersites-x402-mcp (local, key stays on your machine) or the remote endpoint https://api.webbersites.com/mcp.

How payment works

There is no signup and no API key. Call the endpoint; it replies 402 Payment Required with machine-readable payment requirements. Your client signs a USDC transfer authorization (EIP-3009, gasless) and retries with the X-PAYMENT header — @x402/fetch does this automatically. See the overview for a working snippet.