mp_ API key (Magic Patterns > Settings > API Keys). Most operations take an osId from projects.list (the id in magicpatterns.com/os/<osId>); read projects.guide before writing to a project. Pass the same short conversation name on every call of one task so Magic Patterns counts it as one writer. magicos.ask, images.generate and the legacy prompt operations spend the workspace’s Magic Patterns credits. legacy.* operations are for designs made in the old editor (magicpatterns.com/c/<id>), which Magic Patterns has deprecated.
What you get:
- 47 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 Magic Patterns API key before the first call: More: API Key
pnpm corsair setup --plugin=magicpatterns --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 files in a projectWhat’s next
API reference
Every
magicpatterns.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.