Create a new pattern
Creates a new design pattern based on the provided prompt, design system, and styling preferences. Optionally, an image can be included in the request to influence the design.
Authorizations
Body
The prompt for the new pattern.
The design system to use for creating the pattern.
html
, shadcn
, chakraUi
The styling approach to apply to the pattern.
tailwind
, inline
, customTailwind
An optional image to inspire or guide the pattern creation.
Whether to wait for all generations to complete before responding.
Whether to request a summary of UI decisions that were made. Must be used in conjunction with shouldAwaitGenerations=true.
The number of generations to process for the pattern. Must be at least 1.
Response
The unique ID of the created pattern.
This is the main 'editor' URL, which shows multiple generations at a time.
A summary of the UI decisions that were made, if requested by requestSummary=true and shouldAwaitGenerations=true.
This is an iframe of purely the 'active' generation. By default the "export to figma" button will show. Use the dontShowFigma query param to hide the Figma button. Example - https://www.magicpatterns.com/iframe/123456?dontShowFigma=true. You can also use the generationId query param to point to a specific generation. Example - https://www.magicpatterns.com/iframe/123?generationId=abc.
Was this page helpful?