x-api-key header.
A wrong key returns 400, not 401. Renderform answers {"msg":"Incorrect API Key","status":400}, so the plugin identifies an auth failure by the message as well as the status — otherwise a bad key would look like a malformed body and a caller would keep retrying it.
Rendering, in practice:
- A render costs a credit unless it is cached. An identical request for the same
versionreturns the file from the render cache, costs nothing and reportscached: true.cache: falseforces a fresh render and the cost. Reuseversiondeliberately, or leave it off and accept the spend. - A video render is asynchronous. An image render is synchronous and
hrefis ready. A video format needs a template made in the Advanced Editor and answers202withstatus: "pending", sohrefis not usable yet: pollresults.getwith therequestIduntil the status isdoneorfailed. A video costs 5 credits per started second. datais keyed by merge fields, not field names. A field looks likemy-text.text: the component name, a dot, then the property.templates.contentreturns thesampleDataa template was previewed with, which is the fastest way to learn the exact keys.fpsis a string. The spec types it as"24","25"or"30"rather than a number, and it is sent that way.durationandrecordDurationare numbers in milliseconds, between 1000 and 30000.- Two API versions are in use. Templates, renders and results are on
/api/v2;usageandfontsare on/api/v1. Both are kept as they are. templates.listanswers a bare array, not a page, whileresults.listanswers a Spring-style page whose rows are incontent. The two models differ accordingly.templates.updatereplaces the tag set. Sendingtagsswaps the whole list rather than merging into it, and updating metadata is a separate route from updating content:templates.updateContentis the one that changes HTML and CSS, and only anhtml-editortemplate has any.- A
402is an exhausted credit balance, not a bad request; readusagebefore a bulk render loop.
- 15 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)
No setup required yet. When you make your first request as a tenant, Corsair prompts for the API key.More: API Key
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
Read credits used and the planWhat’s next
API reference
Every
renderform.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.