Magic Press Developer Center
Generate editable HTML documents in batches from your own HTML templates. When copy grows or shrinks, the fields below move to keep the spacing in your design. Call the pagination API when you need a printable PDF.
Currently free · API use within the limits costs nothing. Usage is recorded and limits are shared across your projects.
Sign in or create an account to get an API key and test your integration with free monthly credit.
Render a batch of records with your own HTML template
Mark fields such as title and time in your template, then send matching records. One call renders up to 200 separate HTML results using the same design.
const template = {
version: 1,
fields: ["title", "time"],
html: "<article><h2>{{MP:title}}</h2><p>{{MP:time}}</p></article>",
};
const rows = [
{ id: "tide", content: { title: "Tidal Soundscape", time: "10:30 · Room 1" } },
{ id: "beacon", content: { title: "Lighthouse Echoes", time: "11:15 · Room 2" } },
];
const { rows: cards } = await client.templateBatch({ template, rows });To update a single result, send the same template with just the revised record.
const revised = { ...rows[1], content: { ...rows[1].content, time: "11:45 · Room 3" } };
const { rows: [updatedCard] } = await client.templateBatch({ template, rows: [revised] });Explore 24 exhibit cards and edit one Starting with raw copy? Show one edited example
Give the AI one raw note and the fields you want back. It edits the other notes to match. Pass the returned rows to the same template to render them. Each step meters its own input characters.
const { rows: edited } = await client.normalizeBatch({
example: { source: "Tidal Soundscape starts at half past ten in the morning in Room 1.", content: rows[0].content },
rows: [{ id: "beacon", source: "Room 2 hosts Lighthouse Echoes at a quarter past eleven in the morning." }],
});
const result = await client.templateBatch({ template, rows: edited });Compare the raw notes, edited fields, and final cards Need a new template? Design one from your first record and a brief