Template gallery / badge

badge

4x3 in. conference name badge for standard insert stock: event band, large given name, family name, company, a colour-coded role pill, session access ticks and an attendee barcode.

chromium default PDF 7 top-level fields 1 unit per page

Rendered preview of the badge template
Rendered by Galley from the example payload below, at 384px wide , scale 2.

Fields

The full JSON Schema is below. Required fields are marked; anything missing comes back as a 422 naming the path, the expected type and a value that would be accepted.

Field Type Required Description
band_color string optional Header band background.
on_band_color string optional
event object { name, dates, venue, website } required
attendee object { given_name, family_name, pronouns, company, … } required
role object { label, color } optional The coloured pill. Use a consistent colour per role so staff can sort a queue by eye.
access array of object { label, granted } optional Session or area entitlements. Granted ones are picked out in the role colour.
barcode object { pattern, module } optional Width-pattern barcode, same scheme as the shipping label. Omit `pattern` and the attendee ID prints as monospace text.

Default render options

Applied unless you override them. Options are part of the cache key.

margin "0"
print_background true

Example payload

This exact object renders the preview above. It is also what the API echoes back in a validation error, so an agent can repair a payload without a round trip to the docs.

example.jsonjson
{
  "band_color": "#0f2e3d",
  "event": {
    "name": "Agents & Artifacts 2026",
    "dates": "Nov 14–15",
    "venue": "The Palace Saloon",
    "website": "agentsandartifacts.test"
  },
  "attendee": {
    "given_name": "Lena",
    "family_name": "Ortiz",
    "pronouns": "she/her",
    "company": "Acme Robotics",
    "title": "Director of Infrastructure",
    "id": "AA26-01188"
  },
  "role": {
    "label": "Speaker",
    "color": "#b45309"
  },
  "access": [
    {
      "label": "Workshops",
      "granted": true
    },
    {
      "label": "Green room",
      "granted": true
    },
    {
      "label": "After party",
      "granted": true
    },
    {
      "label": "Sponsor lounge",
      "granted": false
    }
  ],
  "barcode": {
    "pattern": "13113131113111131131311113113111331111311133311111131111313111133131113113111131311311113131131131113113113111131131311",
    "module": 0.7
  }
}

Render it

With an API keyshell
curl -sS https://api.galleyrender.com/v1/render \
  -H "Authorization: Bearer $GALLEY_API_KEY" \
  -H 'content-type: application/json' \
  -d '{
  "template": "badge@1",
  "format": "pdf",
  "data": {
    "band_color": "#0f2e3d",
    "event": {
      "name": "Agents & Artifacts 2026",
      "dates": "Nov 14–15",
      "venue": "The Palace Saloon",
      "website": "agentsandartifacts.test"
    },
    "attendee": {
      "given_name": "Lena",
      "family_name": "Ortiz",
      "pronouns": "she/her",
      "company": "Acme Robotics",
      "title": "Director of Infrastructure",
      "id": "AA26-01188"
    },
    "role": {
      "label": "Speaker",
      "color": "#b45309"
    },
    "access": [
      {
        "label": "Workshops",
        "granted": true
      },
      {
        "label": "Green room",
        "granted": true
      },
      {
        "label": "After party",
        "granted": true
      },
      {
        "label": "Sponsor lounge",
        "granted": false
      }
    ],
    "barcode": {
      "pattern": "13113131113111131131311113113111331111311133311111131111313111133131113113111131311311113131131131113113113111131131311",
      "module": 0.7
    }
  }
}'
With no API key, over MCPshell
# No API key. The first call mints a 50-render trial.
curl -sS https://mcp.galleyrender.com/mcp \
  -H 'content-type: application/json' \
  -H 'accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "render",
      "arguments": {
        "template": "badge",
        "format": "pdf",
        "data": { … see the example payload above … }
      }
    }
  }'

Pin the version — badge@1 — in anything you ship. Publishing a new version never changes an old one. Render endpoint reference →

Try a free tool

Renders the example payload on the production service. No account, no key.

JSON Schema

schema.json (7 top-level properties)
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Conference badge",
  "description": "4x3 in. badge insert. Render at page size 4in x 3in with zero margin, or as a PNG at 1200x900 (300dpi).",
  "type": "object",
  "required": [
    "event",
    "attendee"
  ],
  "additionalProperties": true,
  "properties": {
    "band_color": {
      "type": "string",
      "description": "Header band background.",
      "examples": [
        "#0f2e3d"
      ]
    },
    "on_band_color": {
      "type": "string",
      "examples": [
        "#ffffff"
      ]
    },
    "event": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "examples": [
            "Agents & Artifacts 2026"
          ]
        },
        "dates": {
          "type": "string",
          "examples": [
            "Nov 14–15"
          ]
        },
        "venue": {
          "type": "string",
          "examples": [
            "The Palace Saloon"
          ]
        },
        "website": {
          "type": "string",
          "examples": [
            "agentsandartifacts.test"
          ]
        }
      }
    },
    "attendee": {
      "type": "object",
      "required": [
        "given_name",
        "family_name"
      ],
      "properties": {
        "given_name": {
          "type": "string",
          "description": "Set large — this is what people read across a room.",
          "examples": [
            "Lena"
          ]
        },
        "family_name": {
          "type": "string",
          "examples": [
            "Ortiz"
          ]
        },
        "pronouns": {
          "type": "string",
          "examples": [
            "she/her"
          ]
        },
        "company": {
          "type": "string",
          "examples": [
            "Acme Robotics"
          ]
        },
        "title": {
          "type": "string",
          "examples": [
            "Director of Infrastructure"
          ]
        },
        "id": {
          "type": "string",
          "description": "Printed under the bars and used for scan-in.",
          "examples": [
            "AA26-01188"
          ]
        }
      }
    },
    "role": {
      "type": "object",
      "description": "The coloured pill. Use a consistent colour per role so staff can sort a queue by eye.",
      "properties": {
        "label": {
          "type": "string",
          "default": "Attendee",
          "examples": [
            "Speaker"
          ]
        },
        "color": {
          "type": "string",
          "examples": [
            "#b45309"
          ]
        }
      }
    },
    "access": {
      "type": "array",
      "description": "Session or area entitlements. Granted ones are picked out in the role colour.",
      "items": {
        "type": "object",
        "required": [
          "label"
        ],
        "properties": {
          "label": {
            "type": "string",
            "examples": [
              "Workshops"
            ]
          },
          "granted": {
            "type": "boolean",
            "default": false,
            "examples": [
              true
            ]
          }
        }
      }
    },
    "barcode": {
      "type": "object",
      "description": "Width-pattern barcode, same scheme as the shipping label. Omit `pattern` and the attendee ID prints as monospace text.",
      "properties": {
        "pattern": {
          "type": "string",
          "examples": [
            "131131113111"
          ]
        },
        "module": {
          "type": "number",
          "minimum": 0.25,
          "default": 0.7,
          "examples": [
            0.7
          ]
        }
      }
    }
  }
}