Design file format & one-shot generation

The document

A Design Document is a single JSON object with three top-level parts: meta (document settings), styles (reusable swatches and text styles), and artboards (the pages).

{
  "schemaVersion": 1,
  "meta": { "title": "Summer flyer", "colorMode": "cmyk", "unit": "mm", "dpi": 300, "bleed": 3 },
  "styles": {
    "swatches": [ { "key": "brand", "name": "Brand red", "type": "process", "cmyk": [0, 90, 70, 0] } ],
    "paragraphStyles": [],
    "characterStyles": []
  },
  "artboards": [
    {
      "key": "cover", "name": "Cover", "width": 210, "height": 297,
      "background": { "hex": "#ffffff" },
      "elements": [
        { "type": "rect", "key": "band", "x": 0, "y": 0, "width": 210, "height": 80, "fill": { "swatchRef": "brand" } },
        { "type": "text", "key": "title", "x": 15, "y": 22, "width": 180, "height": 40,
          "content": "Summer Sale", "font": "Playfair Display", "size": 48, "fill": { "hex": "#ffffff" }, "align": "center" }
      ]
    }
  ]
}

meta

Field Values Notes
title string The design name.
colorMode "rgb" | "cmyk" cmyk for print, rgb for screen.
unit "px" | "mm" | "cm" | "in" | "pt" The unit for all geometry.
dpi integer Resolution — 300 for print, 72 for screen.
bleed number Print bleed in unit (0 for screen).

Coordinates & units

  • Every position and size is in meta.unit.
  • Positions are artboard-local: (0, 0) is that artboard's own top-left corner. An element at x: 20, y: 30 sits 20 units right and 30 units down inside its artboard.
  • Text size and letterSpacing are the exception: they're always in points (typographic), regardless of meta.unit.

artboards

Each artboard is a page: { key, name, width, height, background, elements }. width/height are in meta.unit; background is a color; elements is an array ordered back-to-front (later elements sit on top). See Elements for every element type.

styles

  • swatches — named colors referenced by swatchRef. type: "spot" swatches export as PDF Separation plates (die cut, varnish, foil…). See Colors.
  • paragraphStyles / characterStyles — named text styles referenced by paragraphStyleRef / characterStyleRef on text elements.

key and identity

Give every artboard, element, and style a short unique key. On a revise, keys are how the tool keeps track of which element is which — the AI keeps the key of anything it doesn't change, so your design's structure stays stable across edits.