renders.create queues the render and returns a render id at once; renders.get reports progress until status is done or failed. Templates store an edit with placeholders, AI generation and file ingestion poll the same way, and the Serve API returns the durable CDN URLs.
- Keys. Create an account at app.shotstack.io and open API Keys. Each account gets a Production key (the
/edit/v1,/ingest/v1,/serve/v1paths) and a free Sandbox key (the/stagepaths, watermarked output). Store either one. Set the account’senvironmenttov1orstage(or theenvironmentplugin option); left unset, the plugin tries production first, switches to the sandbox when production refuses the key, and remembers the answer. - Credits. Production renders spend credits: new accounts get 10 free credits (about 10 minutes of video). Sandbox renders are free but watermarked and still need a credit balance on the account. AI generation is charged on the sandbox too: quote it first with
generations.quote. - Callbacks. Pass
callbackonrenders.createorsources.fetch, or put it in the saved edit of a template (template.callbackontemplates.create/templates.update) fortemplates.render, and Shotstack POSTs the result there: therender,sourceandserve(hosted copy ready) webhooks. Shotstack does not sign callbacks, so the plugin looks each one up with the account’s key and answers with the API’s own status and URL; a callback for an id the account doesn’t have is refused.verifyWebhooks: falseturns the lookup off. - The render URL expires.
renders.getreturnsresponse.url, a temporary download link that dies 24 hours after the render. For a permanent link, read the CDN URL fromassets.getByRenderId(orhttps://cdn.shotstack.io/...). - Long jobs.
renders.create,templates.render,generations.createandsources.fetchstart work that runs after the call returns. Poll the matching get operation until the status isdone(orreadyfor sources) orfailed. Shotstack sends no cancel operation, and a render cannot be deleted once queued. A render takes roughly 20 seconds per minute of output video. - Retries. Rate limits are per key in a fixed 60-second window: edit 300 requests per minute, serve 600, ingest 300 (halved on sandbox). Over the limit the API answers 429, and the plugin waits for the window to reset (Retry-After when sent, otherwise 60 seconds) and retries once. 5xx answers are replayed only for reads, and for
generations.createwhen anidempotencyKeywas sent: retrying with the same key returns the job it first created instead of generating and billing again. - Merged renders.
renders.getsendsdata: falseby default; passdata: trueto include the full timeline echo inresponse.data, andmerged: truewith it to include the merged edit. - Uploads.
uploads.createreturns a signed S3 URL; PUT the bytes to it within one hour and the file appears as an ingest source. The binary upload goes to S3 directly, not through the plugin. - Responses. Output fields are typed from Shotstack’s OpenAPI spec (v1.27.0) and checked against live sandbox calls. Fields Shotstack adds pass through, and status values it adds are kept as strings.
templates.updateanswers with a message only (no id), and Shotstack refuses an update without the edit, sotemplateis required. - Deletes.
templates.delete,sources.deleteandassets.deleteare permanent; there is no undo and no trash.
- 23 typed API operations
- 3 incoming webhook event types
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 Shotstack API key before the first call: More: API Key
pnpm corsair setup --plugin=shotstack --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
Check where a render standsWebhooks
This plugin registers 3 webhook event types. Configure the provider to POST to your Corsair HTTP handler, then usewebhookHooks on the plugin factory.
See Webhooks for every event path and payload shape, and Webhooks concept for routing.
What’s next
API reference
Every
shotstack.api.* operation with input and output types.Webhooks
Event paths, payloads, and
webhookHooks examples.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.