AI methods & callbacks
AI & MCPAI methods & callbacks
What the AI assistant can do, and where each call runs.
generateDesignFromPrompt, build a full design from a prompteditDesign, the conversational assistant (multi-turn edits)rewriteText·generateSubjectLines·generateAltTextgenerateImage, generate an image for the image block
Wire these with a first-party adapter, or route them through your backend with email-craft-sdk so the provider key never reaches the browser.
Through the backend SDK the method names are camelCase (admin.ai("rewriteText", input)). For editDesign the editor sends { message, history, design_summary } and the SDK returns { operations, summary }; the editor applies the operations itself.