Skip to main content
Glama

Shapesoda

Vectorize image

vectorize

Use this when the user wants to convert a raster image (logo, icon, illustration, scan, screenshot; PNG, JPEG, WebP, BMP, GIF, TIFF) into a vector: SVG, PDF, EPS, DXF or a re-rendered PNG. Pass the image in exactly one way: image (a file attached to the chat message), upload_id (from create_upload) or image_base64 (≤2 MB). Returns a download link per format, valid 24 hours (or retention_days), and the SVG inline when small. Uses 1 credit for all formats; mode=test is free and watermarked; mode=preview is a free PNG up to 1 MP whose link buys the vectors later (format=svg, 1 credit). Do not use for generating new images, editing photos or upscaling.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dpiNoPixels per inch of PNG output; needs a size in pt, mm, cm or in. Default 300.
drawNofill: filled shapes; stroke: outline of every shape; stroke_edges: only the borders between shapes, each once (no double cuts). Default from the preset.
modeNotest: free, watermarked result for building an integration. preview: free PNG up to 1 MP without watermark, no vectors; fetch its link with format=svg to buy the vectors for 1 credit. Neither is available for vectorize_url. Default live.
unitNoUnit for width/height: px (default), pt, mm, cm, in.
imageNoImage file attached to the user's message in the chat (ChatGPT).
scaleNoOutput size as a multiple of the source size. Not with width/height.
widthNoPhysical output width in unit. With width only, the height follows the aspect ratio; with height too, a sheet of that size (see aspect). Up to 10 m.
aspectNoWith both width and height: fit (default, whole drawing inside), fill (covers the sheet, excess cropped), stretch (exact size, distorted).
colorsNoNumber of colors: 'auto', 'unlimited', or an integer 2–32 (max_colors goes up to 256). Default auto.
curvesNoall: curves and lines; lines: straight segments only; lines_arcs: DXF lines and arcs, other formats as lines.
detailNoOutput detail for photos. Default auto.
formatNoOutput formats; several formats cost 1 credit together. Default: the preset's format (svg for web).
heightNoPhysical output height in unit (width follows the aspect ratio unless width is set too).
layersNoShapes stacked on top of each other, cut out of each other, or cut out and grouped by color. Default from the preset.
presetNoSettings for the job: web (default), print (PDF, shapes cut out), cut (vinyl/stickers, 8 colors), laser (2-color outlines), embroidery (12 colors, no tiny shapes).
align_xNoHorizontal placement on the sheet, 0 left … 1 right (default 0.5). Needs width and height; not with aspect=stretch.
align_yNoVertical placement on the sheet, 0 top … 1 bottom (default 0.5). Needs width and height; not with aspect=stretch.
cornersNoKeep corners sharp or round them.
denoiseNoNoise reduction before tracing: 0 off … 3 strongest.
paletteNoFixed colors #rrggbb (2–256), as a list or a comma-separated string. Not combined with colors or max_colors.
qualityNoInput quality: low for blurry/noisy/JPEG-heavy images. Default auto.
group_byNoGroups in the output: color (one per color) or layer (by nesting depth). SVG <g>, PDF layers, EPS blocks, DXF layers. Default: by color only for layers=cutouts_grouped (DXF always by color).
min_areaNoSmallest shape kept, in px²; smaller specks are dropped. Overrides the preset.
upload_idNoID returned by create_upload after the file was uploaded.
dxf_curvesNoDXF curves as lines (polylines, default), arcs or splines. curves=lines/lines_arcs wins.
gap_fillerNoon: an underlay in the shape colors hides light gaps between shapes. Needs draw=fill. Default off.
image_typeNoKind of image: artwork with smooth (anti-aliased) edges, artwork with hard pixel edges, or photo. Default auto.
max_colorsNoMaximum number of colors (2–256). Not combined with colors or palette.
max_pixelsNoDownscale the input to at most this many pixels before tracing (faster, fewer nodes).
smoothnessNoContour smoothing 1–10 (higher: smoother, fewer nodes).
svg_versionNoSVG flavor: 1.1 (default), 1.0, or tiny1.2 (no opacity or gradient transforms).
adobe_compatNotrue: SVG friendly to Adobe Illustrator (size always set, stroke widths in drawing coordinates).
image_base64NoPNG/JPEG/WebP/BMP/GIF/TIFF bytes in base64 (≤2 MB). Use create_upload for larger files.
stroke_colorNoStroke color #rrggbb instead of the shape color; needs draw=stroke or stroke_edges.
stroke_widthNoStroke width; needs draw=stroke or stroke_edges. Output units, or source pixels with stroke_scaling=scale. Default: hairline.
transparencyNoTransparent areas: keep (stay transparent), white, or a background color #rrggbb.
png_antialiasNoAnti-aliasing in PNG output. Default on.
retention_daysNoKeep the result downloadable for this many days (default 24 hours). Live mode only.
stroke_scalingNofixed (default): width stays in output units when resized; scale: width in source pixels scales with the drawing.
svg_fixed_sizeNotrue (default): width/height on the root <svg>; false: only a viewBox (responsive).
curve_toleranceNoCurve fitting tolerance in source pixels (default ≈0.5): lower keeps more nodes. Also sets smoothness unless given.
gap_filler_widthNoGap filler width in source pixels (default 1). Needs gap_filler=on.
palette_toleranceNoWith palette: how far (CIE76 ΔE) an image color may be from a palette color to snap to it; farther colors keep their own value.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo
filesYesDownload link per format.
widthYes
heightYes
result_idNo
svg_bytesNo
expires_atNo
download_urlNoLink to the first requested format.
credits_chargedNo
credits_remainingYes
free_remaining_todayNoFree MCP vectorizations left today (used before credits).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources