Authorization: Bearer <key>.
Things to know before you call:
- Rendering spends a credit.
renders.create,renders.duplicateandrenders.mergeeach use API quota, and a deleted render does not refund it. - A render is synchronous by default. It comes back complete with its
urlin about two seconds. Passasync: trueto return while it is stillPENDINGand givewebhook_urlfor Templated to call when it finishes; the render then moves toCOMPLETEDorFAILED. - Batch renders answer an array. Sending
templatesinstead oftemplaterenders each one, so the response is an array of renders rather than one object. Both shapes parse. - The list routes are paged by number, starting at 0.
renders.listdocuments no query parameters at all, so the plugin rejects a filter on it.templates.listtakesquery,page,limit,widthandheight, and defaults to 25 per page;uploads.listandfolders.listdefault to 15. - Uploads need real file bytes.
uploads.createtakesfileNameandfileBase64, rebuilds the bytes as a Blob and sends multipart, because the route accepts an image file up to 2 MB and nothing else. Templated does not accept a hosted URL in its place. - Deleting uploads takes repeated ids.
uploads.deletesendsidsonce per upload, not one comma-joined value. - Tags are bare arrays.
templates.addTagsandtemplates.removeTagstake a JSON array of strings as the whole body, not an object with atagskey. - A merge needs hosting.
renders.mergealways asks Templated to host the result, because without that flag the route answers the PDF bytes rather than JSON. - Deletes are permanent. A deleted render loses its file and its URL stops working, and a deleted template cannot be restored.
- 23 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the Templated API key before the first call: More: API Key
pnpm corsair setup --plugin=templated --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
List the first page of templatesWhat’s next
API reference
Every
templated.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.