Skip to main content

1. Generate and preview a screen

The most common workflow: generate a screen (creating the file in the same step), then view the result.
Omitting fileId creates a new file automatically. Pass an existing fileId to add screens to that file instead. Prompt to your AI assistant:
Generate a Flowstep design: a mobile sign-in screen for a developer tool with email/password and a Google SSO button in dark theme, then show me the image.

2. Visualise a React component

Upload a .jsx or .tsx file as an attachment and ask Flowstep to generate a matching design. Flowstep reads the source and produces a screen — no need to run the app.
Prompt to your AI assistant:
Read src/components/settings/ApiKeys.tsx, upload it as an attachment, and generate a Flowstep screen that matches the component layout. Show me the rendered image.

3. Iterate on an MCP-generated screen

edit-design and regenerate-design require design context that is only present on screens generated with a designs array. For screens generated without one, the workaround is to render the screen as an attachment and call create-new-design with the image.
For screens that do have design context, call edit-design directly with the change in message and the screen in targets.

4. Expand a screen to a full flow

Add follow-on screens to an existing design.
Repeat step 2 with operationVariant: "error_state" or "empty_state" to add edge-case screens.
operationVariant is a required parameter for expand-design. The base screen must also have been generated with a designs array (design context) — for screens without it, use the attachment workaround from Example 3.

5. Audit quota before a batch job

Check remaining capacity before kicking off multiple generations.
If daily is low, schedule the batch for after 00:00 UTC when it resets.