API documentation

Generated from the published OpenAPI. Authenticate with your dashboard key in the Authorization: Bearer header.

The same reference as text for AI agents: /llms.txt

Vectorizza API v1.0.0

Every POST /v1/vectorize runs in a mode. production costs 1.0 credit and returns a clean file in any format plus a download token. preview costs 0.2 credit and returns a watermarked SVG plus a download token. test is free and returns a watermarked SVG without a token. POST /v1/download exchanges a token for a clean file in any format: 0.8 credit the first time for a preview token, free for a production token or a preview token already paid. Tokens last 24 hours. Every response after authentication carries X-Credits-Charged and X-Credits-Remaining; a call that fails is not charged. Plans: the output format and some option values depend on the plan of the account that owns the key; a format or value outside the plan returns 403 plan_required with error.resource naming it, without charge. An option sent with its default value never requires a plan. Each key has a per-minute request limit set by the plan; above it the API returns 429 rate_limited, without charge. The table of what each plan includes is at https://vectorizza.com/pricing.

Server: https://api.vectorizza.com

POST/v1/vectorize

Vectorize an image.

API key

Body multipart/form-data

FieldTypeDescription
imagerequiredfilePNG, JPEG or WebP image.
modeproduction | preview | testproduction charges 1.0; preview charges 0.2 and watermarks; test is free and watermarks.default: production
formatsvg | pdf | eps | dxf | pngOutput format. preview and test only accept svg.default: svg
optionsEngineOptionsEngine options: a JSON object, sent as text, with the keys of EngineOptions. Omitted options take their default. An unknown name, a wrong type, or a value outside the list or range returns 400 invalid_options.

Responses

  • 200 The vector file.

    image/svg+xml, application/pdf, application/postscript, application/dxf, image/png

    X-Credits-Charged
    Credits charged by this call.
    X-Credits-Remaining
    Credits available after this call.
    X-Download-Token
    Download token, valid for 24 hours (preview and production).

Errors

  • 400invalid_requestinvalid_options
  • 401unauthorized
  • 402insufficient_credits
  • 403plan_required
  • 404not_found
  • 413image_too_large
  • 415unsupported_image
  • 422invalid_image
  • 429rate_limited
  • 500internal_error
  • 503engine_unavailable

Example

curl -X POST "https://api.vectorizza.com/v1/vectorize" \
  -H "Authorization: Bearer $VECTORIZZA_API_KEY" \
  -F "image=@image.png" \
  -F "mode=production" \
  -F "format=svg" \
  -o "result.svg"

POST/v1/download

Exchange a download token for a clean file.

API key

Body application/json

FieldTypeDescription
tokenrequiredstringDownload token from the X-Download-Token header of a vectorize call.
formatsvg | pdf | eps | dxf | pngOutput format.default: svg

Responses

  • 200 The clean vector file.

    image/svg+xml, application/pdf, application/postscript, application/dxf, image/png

    X-Credits-Charged
    Credits charged by this call.
    X-Credits-Remaining
    Credits available after this call.

Errors

  • 400invalid_request
  • 401unauthorized
  • 402insufficient_credits
  • 403plan_required
  • 404token_not_foundnot_found
  • 429rate_limited
  • 500internal_error
  • 503engine_unavailable

Example

curl -X POST "https://api.vectorizza.com/v1/download" \
  -H "Authorization: Bearer $VECTORIZZA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"token":"<token>","format":"svg"}' \
  -o "result.svg"

GET/v1/account

Account balance.

API key

Responses

  • 200 The account.

    application/json

Errors

  • 401unauthorized
  • 404not_found
  • 429rate_limited
  • 500internal_error

Example

curl "https://api.vectorizza.com/v1/account" \
  -H "Authorization: Bearer $VECTORIZZA_API_KEY" \
  -o "result.json"

GET/v1/openapi.json

This document.

No authentication

Responses

  • 200 OpenAPI 3.1 document.

    application/json

Errors

  • 404not_found
  • 500internal_error

Example

curl "https://api.vectorizza.com/v1/openapi.json" \
  -o "result.json"

GET/llms.txt

This API described in Markdown for LLM agents (llmstxt.org).

No authentication

Responses

  • 200 The API reference, generated from this document.

    text/plain

Errors

  • 404not_found
  • 500internal_error

Example

curl "https://api.vectorizza.com/llms.txt"

Engine options

Sent in the options field as a JSON object in text. Every option is optional; one left out takes its default.

OptionTypeValues or rangedefaultDescription
colorsnumber≥ 00Maximum number of inks. 0 lets the engine decide. Set a small number to force a short palette, e.g. for screen printing or plotters.
tolerancenumber0.6How far a curve may stray from the traced edge, in working pixels. Raise for fewer nodes and smoother curves; lower for tighter edges.
specklenumber0Smallest region kept, in original-image square pixels; smaller regions merge into a neighbour. 0 = automatic. Raise to remove noise, lower to keep tiny dots.
gradientQualitynumber0 – 10.5With gradientLevel high: 0 = lighter file (bigger pieces, more error), 1 = more faithful (smaller pieces, many more nodes).
maxSidenumber1 – 12501250Longest side of the working image in pixels: bigger images are reduced to it, upscaling stops at it. Lower it for speed and less detail; below 1250 it also turns off the automatic fine-line pass.
upscalenumber0 – 40Enlarge small images before tracing so fine detail survives: 0 = automatic, 1 = never, 2 to 4 = that factor. Never goes past maxSide.
denoisenumber2.5Strength (pixels) of edge-preserving smoothing before inks are picked; 0 = off. Raise for grainy or JPEG-damaged images, lower to keep texture.
paletteRadiusnumber4.5Colour distance (OKLab x100) within which pixels count as one ink. Raise for fewer, broader inks; lower to split close shades.
blotchnumber4Multiplier on the speckle area for cleaning up medium blobs and halos of similar colour. Raise to remove bigger blobs.
tonalSmoothnumber1.5Radius (pixels) for smoothing borders between similar inks into clean edges; 0 = off. Lower to keep ragged tonal detail.
sizeFollownumber1Exponent for how curve tolerance grows with image size. Only matters on the large fine-line pass; leave at the default.
shadeSplitnumber1.6Weight of lightness against hue when grouping inks. Raise to split light and dark steps (shading) into separate inks.
flatGapnumber10With gradients: internal threshold (OKLab x100) under which neighbouring inks that differ mostly in lightness merge into one flat colour; 0 = off. Leave at the default.
mergeHuenumber6Largest hue spread (degrees) allowed when merging similar regions; 0 = no hue limit. Lower to keep colour variants apart.
farInknumber7Colour distance (OKLab x100): a smooth area farther than this from every ink becomes a new ink; 0 = off. Lower to add more inks.
farHuenumber8With farInk above 0: hue difference (degrees) that also makes a nearby but differently hued area a new ink, e.g. lips on skin. Lower to separate more hue variants.
farDarknumber3.5With farInk above 0: lightness step by which a dark area must exceed a near-black line ink to become its own ink. Lower to separate more dark shades (irises, hair).
crispFaintnumber0.45How much faint but sharp borders get looser, rounder curves. 0 traces them as tightly as strong edges; raise to simplify them more.
localHuenumber6With high detail and gradients: largest chroma spread (OKLab x100) for grouping same-hue regions into one local gradient; 0 = off. Raise to merge more.
rimWidthnumber5With rimTrim: largest mean width (working pixels) for a piece to count as an edge band, such as a bevel or frame. Internal; leave at the default.
softDeltanumber8With softMerge: largest colour difference (OKLab x100) between neighbouring blobs for them to become one shape. Raise to merge more.
softEdgenumber0.45With softMerge: a border counts as soft when its colour step is below this fraction of the two blobs' colour difference. Raise to let sharper borders merge too.
blendWidthnumber2.4With dissolveBlend: largest mean width (working pixels) of a thin in-between colour band that is given back to the nearer neighbour. Raise to dissolve wider bands.
blendResidnumber0.15With dissolveBlend: how far, as a fraction of the neighbours' colour distance, a band may sit off the blend between them and still count as one. Internal; leave at the default.
blendCorenumber0.02With dissolveBlend: a band whose flat interior exceeds this fraction of its area is kept as a real drawn stripe. Internal; leave at the default.
carveDeltanumber5With carve: colour deviation (OKLab x100) from the surrounding shape that marks an area to be carved out as its own shape (eye whites, lip lines). Lower to carve more.
carveHuenumber5With carve: hue deviation (degrees) that also qualifies an area for carving, e.g. lips on skin; 0 = off.
spotDeltanumber30With carve: how much lighter than its surroundings a small spot must be to come back as a highlight (iris or lip shine); 0 = off. Lower to bring back more highlights.
spotMinLnumber70With carve and spotDelta above 0: lowest lightness (0 to 100) for a highlight; dimmer spots pass only if round, small and nearly grey. Lower to recover dull highlights.
carveEdgenumber3With carve: lowest border contrast (OKLab x100) for a carved area to be kept. Raise to keep only crisp-edged areas.
gradientsbooleantrueAllow linear and radial gradient fills. false = flat colours only, the same as gradientLevel flat.
gapFillerbooleantrueAdd thin strokes under the borders between shapes to hide hairline gaps. No effect with stacking stacked.
regionColorbooleantrueEach flat shape takes the dominant colour of its pixels in the original instead of its palette ink. Turn off for strict palette colours.
paletteAllbooleantrueWith high detail: build the palette from every opaque pixel, not only flat interiors, keeping texture tones in 3D renders and photos.
rimTrimbooleantrueTrim edge bands (bevels, frames) where they bulge past their usual width; tuned by rimWidth.
softMergebooleantrueMerge near-identical blobs with soft borders (airbrush grain) into one shape; tuned by softDelta and softEdge. High detail turns it off unless set.
dissolveBlendbooleantrueGive thin in-between colour bands between two very different shapes (anti-aliasing, blur) back to the nearer side; tuned by blendWidth, blendResid and blendCore.
carvebooleantrueBring back small areas of distinct tone, thin dark lines and highlight spots that the palette swallowed; tuned by the carve and spot options.
edgeFromColorbooleantruePlace each border by matching edge pixels to the neighbour colour that best explains them, for more accurate anti-aliased edges.
gradientLevelstringflat | simple | normal | high | heavynormalHow much gradient the vector gets. flat = none (plotter, screen printing); simple = flat, and tones the eye does not tell apart become one colour; normal = light gradients where the image asks; high = gradient in every varying shape, split until colours match (heaviest files); heavy = same as high.
backgroundstringkeep | outer | allallBackground removal. keep = keep it; outer = remove only the background touching the image border; all = remove the background colour everywhere, including inside letters.
stackingstringcutouts | stackedcutoutscutouts = each shape has its own holes; stacked = each shape continues under the ones above, so paint order matters (turns off gapFiller and grouping).
groupingstringmerged | color | layers | nonemergedHow shapes are organised in the file; the drawing is the same. merged = one shape per colour; color = one group per colour; layers = Background, Shapes, Shadows, Highlights and Outline groups; none = loose pieces. Only with stacking cutouts.
detailstringauto | normal | high | paintingautoDetail level. auto = the engine decides (3D renders and photos get high); normal; high = more tones, less cleanup; painting = high with the palette covering all tones and a gradient in every shape.
hintsobject[][]Regions to treat differently, each {"box":[x0,y0,x1,y1],"mode":...} with the box in original-image pixels. smooth = small object becomes a smooth shape with few inks; detail = thin detail protected from cleanup; simplify = texture becomes a few blobs.