Options
Every field, its type, its default, and what it actually changes.
Request fields
prompt (generate only)
String, 3 to 2000 characters. Required.
image (vectorize only)
String. An https URL, a data URI, or bare base64, up to 10 MB. Required.
style
auto (default) · flat · icon · logo · illustration
The only field that adds words to your prompt. See prompt to SVG.
quality
standard (default) · hd
Generate only. hd costs more and resolves finer detail.
aspect
1:1 (default) · 3:2 · 2:3 · 16:9 · 9:16
Generate only. Vectorize always uses the image's own shape.
background
transparent · keep
Default is transparent for generate and keep for vectorize.
detail
low · medium (default) · high
How much small detail survives. medium is the default because it removes
the grain that makes a trace look like a trace.
colors
Integer, 2 to 64. Caps the palette.
palette
Array of 1 to 64 hex strings like #1a2b3c. Snaps every colour in the output
to the nearest one in your list.
mode
stacked (default) · cutout
| Mode | What you get | Use it for |
|---|---|---|
stacked | Shapes layered in draw order. Smallest file | Web, almost everything |
cutout | No overlapping shapes, one region per colour | Figma editing, Cricut, laser cutting |
layers
color (default) · objects
color groups paths by colour. objects finds real things (hat, face,
background) and puts each in its own named <g> you can move.
objects costs +$0.02, because finding them costs a call.
objects
Array of up to 8 short names, 40 characters each. Skips the guessing:
{ "layers": "objects", "objects": ["hat", "sunglasses"] }Setting this implies layers: "objects".
fill_behind
Boolean. Requires layers: "objects". Costs +$0.02.
Paints what is hidden behind each object, so moving the hat does not leave a hole where the hat was.
formats
Array from svg, png, pdf, eps, dxf, icons, small. svg is
always included. See exports.
png_width
Integer, 16 to 8192. Raster size when png is requested.
Response fields
| Field | Meaning |
|---|---|
svg | The markup itself |
url | Permanent link to the .svg file |
files | One link per extra format you asked for |
width, height | Canvas size in SVG units |
paths | How many paths the trace produced |
colors | How many distinct colours survived |
bytes | Size of the SVG, before gzip |
layers | Each layer's id and its fill colours |
score | Fidelity, 0 to 1, measured by rendering back and comparing |
cost_usd | What this call charged |
ms | Wall time |
Errors
Every one of these is returned before anything is charged, or refunded in full.
| Status | Meaning |
|---|---|
| 400 | A field is wrong. The message names the field and the allowed values |
| 401 | Missing or invalid API key |
| 402 | Not enough Balance |
| 422 | The image could not be read, or the URL was refused |
| 429 | Rate limited. Retry-After says how long in seconds |
| 5xx | Something failed upstream. Refunded |
A failed call is never a paid call. Validation runs before the charge, and the Balance door refunds on any throw. On the x402 rail the prompt is validated before the paywall runs at all.