SDKs & integrations
MostlyRender is a plain REST API — use it from any language with an HTTP client, or generate a typed client from the OpenAPI spec. We also ship official Node, Python and Go SDKs, an n8n community node and an MCP server for AI agents. Every one of them is a thin wrapper over the same REST calls, authenticated with the same API key.
# Node
Zero dependencies — uses the built-in fetch (Node 18+). Ships TypeScript types.
npm install @mostlytiny/mostlyrender
const MostlyRender = require('@mostlytiny/mostlyrender');
const mr = new MostlyRender('mr_live_…'); // or new MostlyRender(key, { baseUrl })
await mr.render({ templateId: 'tpl_abc', modifications: { title: 'Hello' } }); // → { id, url, output }
await mr.renderBatch({ templateId: 'tpl_abc', items: [{ title: 'A' }] }); // → { results, count, ok }
await mr.screenshot({ url: 'https://stripe.com', fullPage: true }); // → { id, url, output }
await mr.listTemplates(); // → { templates: [...] }
const job = await mr.renderAsync({ templateId: 'tpl_abc', output: 'pdf', webhookUrl: 'https://your.app/hook' });
const done = await mr.waitForRender(job.id); // polls until done
Errors throw MostlyRenderError with .status, .body, the API’s stable .code and per-row .errors.
# Generators
All three SDKs (Node, Python, Go) wrap the generator API: createGenerator,
addRows (upsert by row key, with dryRun and idempotencyKey), submitDataset (CSV upload in
one call), getJob / waitForJob / cancelJob / retryJob, listItems (iterates every page),
getItem / updateItem / deleteItem, getTemplateParams and getManifest.
const job = await mr.addRows(generatorId, rows, { idempotencyKey: 'import-1' });
const done = await mr.waitForJob(generatorId, job.id);
# Python
Zero dependencies (standard library only), Python 3.9+. Source: mostlytiny/mostlyrender-python.
pip install mostlyrender
from mostlyrender import MostlyRender
mr = MostlyRender("mr_live_…") # or MostlyRender(key, base_url=...)
mr.render("tpl_abc", modifications={"title": "Hello"}) # → { id, url, output }
mr.render_batch(template_id="tpl_abc", items=[{"title": "A"}]) # → { results, count, ok }
mr.screenshot("https://stripe.com", full_page=True) # → { id, url, output }
mr.list_templates() # → { templates: [...] }
mr.get_account() # → { plan, email, display_name }
job = mr.render_async("tpl_abc", output="pdf", webhook_url="https://your.app/hook")
final = mr.wait_for_render(job["id"]) # polls until done
Errors raise MostlyRenderError with .status and .body. See Errors.
# Go
Standard library only, Go 1.21+. Every call takes a context.Context. Source:
mostlytiny/mostlyrender-go.
go get github.com/mostlytiny/mostlyrender-go
import mostlyrender "github.com/mostlytiny/mostlyrender-go"
mr := mostlyrender.NewClient("mr_live_…") // or NewClient(key, mostlyrender.WithBaseURL(...))
out, err := mr.Render(ctx, mostlyrender.RenderParams{
TemplateID: "tpl_abc",
Modifications: map[string]any{"title": "Hello"},
})
RenderBatch, Screenshot, RenderAsync, GetRender, WaitForRender,
ListTemplates and GetAccount mirror the other SDKs. A non-2xx response returns an
*mostlyrender.Error carrying Status and Body.
# n8n
A community node for self-hosted n8n. In n8n go to Settings → Community Nodes → Install and enter:
n8n-nodes-mostlyrender
Add a MostlyRender API credential with your key. Operations: Render Template, Screenshot URL, Get Render and List Templates — renders and screenshots can return the finished file as binary data for the next node. Any n8n trigger can start it.
# AI agents (MCP)
Claude, Cursor or any MCP client can call MostlyRender as a tool. See MCP server for the one-line install.
# cURL / REST
Anything the SDKs do is a direct REST call, so every language works today:
curl https://api.mostlyrender.com/v1/renders \
-H "Authorization: Bearer mr_live_…" \
-H "Content-Type: application/json" \
-d '{ "template": "tpl_abc", "modifications": { "title": "Hello" } }'
The full machine-readable contract is the OpenAPI spec — import it into your own client generator or Postman. Browse it interactively in the API reference.