Template gallery / invoice

invoice

Letter-size invoice with line items, totals, and payment terms.

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

Rendered preview of the invoice template
Rendered by Galley from the example payload below, at 816px 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
invoice_number string required Your invoice reference.
issued_on string (date) required
due_on string (date) optional
currency string optional
notes string optional
seller object { name, email, address, logo_url } required
buyer object { name, email, address } required
line_items array of object { description, quantity, unit_price } required
tax_rate number optional

Default render options

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

page_size "Letter"
margin "0.5in"
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
{
  "invoice_number": "INV-1042",
  "issued_on": "2026-09-16",
  "due_on": "2026-10-16",
  "currency": "USD",
  "notes": "Payment due within 30 days. ACH details on request.",
  "seller": {
    "name": "Galley Render",
    "email": "billing@galleyrender.com",
    "address": "2727 Jean Lafitte Dr, Fernandina Beach, FL 32034"
  },
  "buyer": {
    "name": "Acme Robotics",
    "email": "ap@acme.test",
    "address": "100 Market St, Austin, TX 78701"
  },
  "line_items": [
    {
      "description": "Starter plan, September",
      "quantity": 1,
      "unit_price": 19
    },
    {
      "description": "Overage, 3,200 renders",
      "quantity": 3.2,
      "unit_price": 4
    }
  ],
  "tax_rate": 0.07
}

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": "invoice@1",
  "format": "pdf",
  "data": {
    "invoice_number": "INV-1042",
    "issued_on": "2026-09-16",
    "due_on": "2026-10-16",
    "currency": "USD",
    "notes": "Payment due within 30 days. ACH details on request.",
    "seller": {
      "name": "Galley Render",
      "email": "billing@galleyrender.com",
      "address": "2727 Jean Lafitte Dr, Fernandina Beach, FL 32034"
    },
    "buyer": {
      "name": "Acme Robotics",
      "email": "ap@acme.test",
      "address": "100 Market St, Austin, TX 78701"
    },
    "line_items": [
      {
        "description": "Starter plan, September",
        "quantity": 1,
        "unit_price": 19
      },
      {
        "description": "Overage, 3,200 renders",
        "quantity": 3.2,
        "unit_price": 4
      }
    ],
    "tax_rate": 0.07
  }
}'
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": "invoice",
        "format": "pdf",
        "data": { … see the example payload above … }
      }
    }
  }'

Pin the version — invoice@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 (9 top-level properties)
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Invoice",
  "type": "object",
  "required": [
    "invoice_number",
    "issued_on",
    "seller",
    "buyer",
    "line_items"
  ],
  "additionalProperties": true,
  "properties": {
    "invoice_number": {
      "type": "string",
      "description": "Your invoice reference.",
      "examples": [
        "INV-1042"
      ]
    },
    "issued_on": {
      "type": "string",
      "format": "date",
      "examples": [
        "2026-09-16"
      ]
    },
    "due_on": {
      "type": "string",
      "format": "date",
      "examples": [
        "2026-10-16"
      ]
    },
    "currency": {
      "type": "string",
      "default": "USD",
      "examples": [
        "USD"
      ]
    },
    "notes": {
      "type": "string",
      "examples": [
        "Thanks for your business."
      ]
    },
    "seller": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "examples": [
            "Galley Render"
          ]
        },
        "email": {
          "type": "string",
          "format": "email",
          "examples": [
            "billing@galleyrender.com"
          ]
        },
        "address": {
          "type": "string",
          "examples": [
            "2727 Jean Lafitte Dr, Fernandina Beach, FL 32034"
          ]
        },
        "logo_url": {
          "type": "string",
          "format": "uri",
          "examples": [
            "https://example.com/logo.png"
          ]
        }
      }
    },
    "buyer": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "examples": [
            "Acme Robotics"
          ]
        },
        "email": {
          "type": "string",
          "format": "email",
          "examples": [
            "ap@acme.test"
          ]
        },
        "address": {
          "type": "string",
          "examples": [
            "100 Market St, Austin, TX 78701"
          ]
        }
      }
    },
    "line_items": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "description",
          "quantity",
          "unit_price"
        ],
        "properties": {
          "description": {
            "type": "string",
            "examples": [
              "Rendering, September"
            ]
          },
          "quantity": {
            "type": "number",
            "minimum": 0,
            "examples": [
              2
            ]
          },
          "unit_price": {
            "type": "number",
            "minimum": 0,
            "examples": [
              19
            ]
          }
        }
      }
    },
    "tax_rate": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "examples": [
        0.07
      ]
    }
  }
}