Skip to content
VectorMojo

Docs

Export

POST /v1/export returns one version of a design as a file: SVG, PNG, WebP or PDF. Exports are free and run at once, with no job.

curl https://api.vectormojo.com/api/v1/export \
  -H "Authorization: Bearer $BRUSH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "design_id": "6745c0a1e4b0c2a9d1f3b7e3", "version": 2, "format": "png", "scale": 2 }' \
  -OJ

-OJ tells curl to save the file under the name VectorMojo gives it.

Fields

FieldType and limitsWhat it does
design_idstringRequired. The design to export.
versionwhole number from 1Default: the current version.
formatsvg, png, webp or pdfDefault svg.
scalenumber, 0.5 to 4PNG and WebP only. 2 gives twice the width and height. Default 1.
textlive or outlinedSVG and PDF. outlined turns every text into shapes. Default live.
minifybooleanSVG only. Removes spaces and other bytes that change nothing. Default false.

The response

Status 200, and the body is the file itself (not JSON, not a link).

HeaderValue
Content-Typeimage/svg+xml; charset=utf-8 (svg), image/png (png), image/webp (webp), application/pdf (pdf)
Content-Dispositionattachment; filename="…" (see File names)
X-Brush-Export-NotesOnly when there is something to say. Plain-language notes on what the conversion did, URL-encoded. Decode it before you show it.

File names

<title>-v<version><variant>.<format>. The title becomes lowercase ASCII letters and digits joined by hyphens, at most 60 characters (design if nothing is left). The variant is -outlined for SVG or PDF with outlined text, and @2x (the scale) for a PNG or WebP not at scale 1. Example: sales-funnel-v2@2x.png.

SVG

  • Cleaned of anything unsafe, with the AI-generated marker inside.
  • "text": "live" keeps real, editable text. It shows in the viewer's own fonts.
  • "text": "outlined" turns text into shapes, so it looks the same everywhere and needs no font. The shapes are drawn with VectorMojo's bundled sans-serif font, Arimo, which has the same letter widths as Arial and Helvetica. Text that asked for a serif or monospace font is outlined in Arimo too. If a text cannot be outlined, it stays live and the notes header says why. Font rules inside a <style> block are not applied to outlined text.
curl https://api.vectormojo.com/api/v1/export \
  -H "Authorization: Bearer $BRUSH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "design_id": "6745c0a1e4b0c2a9d1f3b7e3", "format": "svg", "text": "outlined", "minify": true }' \
  -OJ -D headers.txt

PNG and WebP

  • Drawn from the vector at the target size, not blown up from a small picture. WebP is lossless.
  • Size = the design's width and height × scale. The largest export is 40 million pixels, and no side longer than 16,383 pixels. Larger gets 400 export_too_large: use a smaller scale.
  • PNG and WebP files do not carry the AI-generated marker.

PDF

  • One page the size of the design (1 pixel = 1 point). Shapes stay vector.
  • With "text": "live", text stays selectable, set in the bundled Arimo font, embedded in the file. A text with characters outside that font's Latin set is outlined.
  • With "text": "outlined", every text is outlined.
  • SVG filters, such as drop shadows, are not drawn in the PDF.
  • The PDF's document properties mark it as AI-generated with VectorMojo.

Errors

StatusCodeWhen
400invalid_requestA field is missing or out of range.
400export_too_largeThe PNG or WebP would be too large.
400invalid_svgThis version could not be exported.
404not_foundNo such design in your account, or no such version.

Designs are AI-generated. Outputs can contain factual mistakes, so review every design before you use it.