async: false; v1 generation routes return base64 artifacts. Run the Corsair database migration once before passing the connection to createCorsair; creating a SQLite file does not create Corsair’s tables. Before creating a tenant connect link, mount a Hub delivery handler as described in Connect / OAuth. A call for a tenant with no stored key fails with AuthMissingError, which carries a connect link when Hub is configured.
What you get:
- 26 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 Cloudlayer API key before the first call: More: API Key
pnpm corsair setup --plugin=cloudlayer --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.A call with no stored key fails with AuthMissingError and a connect link when Hub is configured. To skip that, connect the tenant through Hub below or store the key with tenant.cloudlayer.keys.set_api_key(...) first.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 account usageWhat’s next
API reference
Every
cloudlayer.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.