Family Tree Maker

HTTP API

Render family tree images directly from your scripts, without going through the MCP protocol.

Base URL: https://family-tree-maker.mnapoli.fr

POST /api/render

Renders a family tree as a PNG image.

Request

MethodPOST
Path/api/render
Content-Typeapplication/json
Query paramsscale (optional, 0.5 – 4, default 2) — pixel density multiplier.
BodyA FamilyTree JSON object (see schema).

Response

Example

curl -X POST 'https://family-tree-maker.mnapoli.fr/api/render?scale=2' \
  -H 'content-type: application/json' \
  -d '{ "couple": { "father": { "name": "Vito Napoli", "birth": 1854 }, "mother": { "name": "Giuseppa Grammatico", "birth": 1860 }, "marriageYear": 1876 }, "fatherParents": { "father": { "name": "Girolamo Napoli" }, "mother": { "name": "Teresa Poma" } }, "motherParents": { "father": { "name": "Nicolo Grammatico" }, "mother": { "name": "Rosaria Rizzo" } }, "children": [ { "name": "Nicolo", "birth": 1880 }, { "name": "Rosaria", "birth": 1891 }, { "name": "Mario" } ] }' \
  --output tree.png

GET /api/tree.svg

Returns the SVG for a tree encoded in a shareable URL. Handy for debugging or embedding in HTML.

MethodGET
Path/api/tree.svg
Query paramsd (required) — the base64url-encoded tree as produced by the ?d= query string on the home page.
curl 'https://family-tree-maker.mnapoli.fr/api/tree.svg?d=<encoded>' > tree.svg

Schema

A FamilyTree has this shape:

type FamilyTree = {
  couple: Couple;           // required — the central couple
  fatherParents?: Couple;   // optional — father's parents (grandparents)
  motherParents?: Couple;   // optional — mother's parents (grandparents)
  children?: Person[];      // up to 20
};

type Couple = {
  father: Person;
  mother: Person;
  marriageYear?: number;
};

type Person = {
  name: string;             // 1 – 50 chars
  birth?: number;           // integer year, -3000 to 3000
  death?: number;
};

Missing birth or death years are displayed as ? in the rendered tree.

Rate limits

The render endpoint is limited per client IP: a token bucket of 30 requests with a refill of one every two seconds. Exceeding the limit returns 429 with a retry-after header (in seconds).

Prefer MCP?

If you're integrating with an AI assistant rather than a backend service, the MCP endpoint gives you the same rendering capability wrapped in a tool that ChatGPT and Claude can call directly.