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.txtVectorizza 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
| Field | Type | Description |
|---|---|---|
imagerequired | file | PNG, JPEG or WebP image. |
mode | production | preview | test | production charges 1.0; preview charges 0.2 and watermarks; test is free and watermarks.default: production |
format | svg | pdf | eps | dxf | png | Output format. preview and test only accept svg.default: svg |
options | EngineOptions | Engine 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
200The 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_options401unauthorized402insufficient_credits403plan_required404not_found413image_too_large415unsupported_image422invalid_image429rate_limited500internal_error503engine_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
| Field | Type | Description |
|---|---|---|
tokenrequired | string | Download token from the X-Download-Token header of a vectorize call. |
format | svg | pdf | eps | dxf | png | Output format.default: svg |
Responses
200The 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_request401unauthorized402insufficient_credits403plan_required404token_not_foundnot_found429rate_limited500internal_error503engine_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
200The account.application/json
Errors
401unauthorized404not_found429rate_limited500internal_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
200OpenAPI 3.1 document.application/json
Errors
404not_found500internal_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
200The API reference, generated from this document.text/plain
Errors
404not_found500internal_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.
| Option | Type | Values or range | default | Description |
|---|---|---|---|---|
colors | number | ≥ 0 | 0 | Maximum number of inks. 0 lets the engine decide. Set a small number to force a short palette, e.g. for screen printing or plotters. |
tolerance | number | 0.6 | How far a curve may stray from the traced edge, in working pixels. Raise for fewer nodes and smoother curves; lower for tighter edges. | |
speckle | number | 0 | Smallest region kept, in original-image square pixels; smaller regions merge into a neighbour. 0 = automatic. Raise to remove noise, lower to keep tiny dots. | |
gradientQuality | number | 0 – 1 | 0.5 | With gradientLevel high: 0 = lighter file (bigger pieces, more error), 1 = more faithful (smaller pieces, many more nodes). |
maxSide | number | 1 – 1250 | 1250 | Longest 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. |
upscale | number | 0 – 4 | 0 | Enlarge small images before tracing so fine detail survives: 0 = automatic, 1 = never, 2 to 4 = that factor. Never goes past maxSide. |
denoise | number | 2.5 | Strength (pixels) of edge-preserving smoothing before inks are picked; 0 = off. Raise for grainy or JPEG-damaged images, lower to keep texture. | |
paletteRadius | number | 4.5 | Colour distance (OKLab x100) within which pixels count as one ink. Raise for fewer, broader inks; lower to split close shades. | |
blotch | number | 4 | Multiplier on the speckle area for cleaning up medium blobs and halos of similar colour. Raise to remove bigger blobs. | |
tonalSmooth | number | 1.5 | Radius (pixels) for smoothing borders between similar inks into clean edges; 0 = off. Lower to keep ragged tonal detail. | |
sizeFollow | number | 1 | Exponent for how curve tolerance grows with image size. Only matters on the large fine-line pass; leave at the default. | |
shadeSplit | number | 1.6 | Weight of lightness against hue when grouping inks. Raise to split light and dark steps (shading) into separate inks. | |
flatGap | number | 10 | With 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. | |
mergeHue | number | 6 | Largest hue spread (degrees) allowed when merging similar regions; 0 = no hue limit. Lower to keep colour variants apart. | |
farInk | number | 7 | Colour distance (OKLab x100): a smooth area farther than this from every ink becomes a new ink; 0 = off. Lower to add more inks. | |
farHue | number | 8 | With 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. | |
farDark | number | 3.5 | With 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). | |
crispFaint | number | 0.45 | How much faint but sharp borders get looser, rounder curves. 0 traces them as tightly as strong edges; raise to simplify them more. | |
localHue | number | 6 | With high detail and gradients: largest chroma spread (OKLab x100) for grouping same-hue regions into one local gradient; 0 = off. Raise to merge more. | |
rimWidth | number | 5 | With 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. | |
softDelta | number | 8 | With softMerge: largest colour difference (OKLab x100) between neighbouring blobs for them to become one shape. Raise to merge more. | |
softEdge | number | 0.45 | With 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. | |
blendWidth | number | 2.4 | With 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. | |
blendResid | number | 0.15 | With 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. | |
blendCore | number | 0.02 | With dissolveBlend: a band whose flat interior exceeds this fraction of its area is kept as a real drawn stripe. Internal; leave at the default. | |
carveDelta | number | 5 | With 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. | |
carveHue | number | 5 | With carve: hue deviation (degrees) that also qualifies an area for carving, e.g. lips on skin; 0 = off. | |
spotDelta | number | 30 | With 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. | |
spotMinL | number | 70 | With 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. | |
carveEdge | number | 3 | With carve: lowest border contrast (OKLab x100) for a carved area to be kept. Raise to keep only crisp-edged areas. | |
gradients | boolean | true | Allow linear and radial gradient fills. false = flat colours only, the same as gradientLevel flat. | |
gapFiller | boolean | true | Add thin strokes under the borders between shapes to hide hairline gaps. No effect with stacking stacked. | |
regionColor | boolean | true | Each flat shape takes the dominant colour of its pixels in the original instead of its palette ink. Turn off for strict palette colours. | |
paletteAll | boolean | true | With high detail: build the palette from every opaque pixel, not only flat interiors, keeping texture tones in 3D renders and photos. | |
rimTrim | boolean | true | Trim edge bands (bevels, frames) where they bulge past their usual width; tuned by rimWidth. | |
softMerge | boolean | true | Merge near-identical blobs with soft borders (airbrush grain) into one shape; tuned by softDelta and softEdge. High detail turns it off unless set. | |
dissolveBlend | boolean | true | Give thin in-between colour bands between two very different shapes (anti-aliasing, blur) back to the nearer side; tuned by blendWidth, blendResid and blendCore. | |
carve | boolean | true | Bring back small areas of distinct tone, thin dark lines and highlight spots that the palette swallowed; tuned by the carve and spot options. | |
edgeFromColor | boolean | true | Place each border by matching edge pixels to the neighbour colour that best explains them, for more accurate anti-aliased edges. | |
gradientLevel | string | flat | simple | normal | high | heavy | normal | How 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. |
background | string | keep | outer | all | all | Background removal. keep = keep it; outer = remove only the background touching the image border; all = remove the background colour everywhere, including inside letters. |
stacking | string | cutouts | stacked | cutouts | cutouts = each shape has its own holes; stacked = each shape continues under the ones above, so paint order matters (turns off gapFiller and grouping). |
grouping | string | merged | color | layers | none | merged | How 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. |
detail | string | auto | normal | high | painting | auto | Detail 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. |
hints | object[] | [] | 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. |