Pro and Pro Max

Animated explainers

Turn a topic or a flowchart into a short GIF or video that explains it step by step, such as “how the Databricks lakehouse works”. The diagram builds in a few steps, each with a caption, and ends on a takeaway. Writing a story with AI is part of Pro and Pro Max and uses 2 AI credits (see AI credits). A story the diagram already has plays and exports on any plan, with no AI.

From a topic

Use this when you have a subject but no diagram yet. The AI draws the diagram and writes its story in one go.

  1. Open any diagram in the editor. The explainer is saved as a new diagram in the same project, so the open one isn’t changed.
  2. Click AI in the top bar, then choose Animated explainer.
  3. Name a topic or system (3 to 2,000 characters), for example “How a checkout payment is approved, from cart to receipt”.
  4. Click Create explainer, or press Ctrl + Enter. The button says Writing… while the AI works.
  5. The AI draws a flowchart and splits it into 2 to 8 steps, each with a caption, plus a title and a takeaway. It opens as a new diagram named after the title, and the panel says how many steps it has.
  6. Click Export GIF or video. The export opens on Animation › Story, with the story ready to play (see How it plays).
  • Credits: each explainer uses 2 AI credits. Your balance shows beside the button; when too few are left, the button is off and Buy credits appears. If Mermaid can’t read the AI’s diagram, it is fixed once for free. If the AI fails, the credits are given back.
  • Plans: signed out, the panel offers Sign in; on Free, See Pro.
  • Your data: your request is sent to Anthropic to answer it. The new diagram is saved like any other: to your account when you’re signed in, with version history.
  • If it doesn’t work: “Too many requests” means wait a minute and try again. If the diagram isn’t what you wanted, delete it, or change it with the AI assistant or by hand; the story’s steps can be edited too.
Click AI, choose Animated explainer, name a topic and click Create explainer. The new diagram opens; Export GIF or video opens the story export.

From your diagram

Use this to explain a flowchart or state diagram you already have. The AI only writes the story; your diagram stays as it is.

  1. Open the diagram and click Export.
  2. Choose Animation, then Story.
  3. Click Write the story with AI. The AI splits the diagram into captioned steps, with a title and a takeaway, and the preview starts to play.
  4. Edit the Title, each step’s caption, and the Takeaway (it’s optional) right there. The preview plays again as you type.
  5. To change which boxes each step shows, click Edit boxes and steps. Each step gets a Boxes field: type node ids separated by commas, such as A, B. Remove a step with its × (a story keeps at least 2), or click Add a step (up to 8).
  6. Download it, or close the dialog: your edits are kept either way.
  • Saved with the diagram: the story is saved in the diagram’s code, on a %% flowgraph-story line, which also lists the boxes each step shows. Next time you open Export, it’s there again, ready to play, with no AI. Other Mermaid tools ignore the line.
  • Boxes: an id that isn’t in the diagram is flagged Not in the diagram. Boxes in no step are listed under In no step; they show with the step of a box they connect to.
  • When the diagram changes: if you add, remove or rename a box or a connection after the story was written, the dialog says the story might not match. Choose Edit the story to check the steps, or Write it again with AI; you can also export it as it is. Moving boxes doesn’t count as a change.
  • Rewrite with AI writes a new story for another 2 credits; the speed you chose stays.
  • Limits: a title of up to 70 characters, captions of up to 140, a takeaway of up to 120, and up to 40 boxes a step.
  • Which diagrams: flowcharts and state diagrams. For any other kind, the dialog says “Stories work with flowcharts and state diagrams.”
  • Your data: the diagram’s code is sent to Anthropic to write the story, without its saved positions or an earlier story.
In Export, choose Animation and Story, then Write the story with AI. Edit a caption, and Edit boxes and steps shows the boxes each step reveals.

How it plays

The title shows above the diagram first. Then each step builds its boxes along the arrows while its caption shows below the diagram; a soft highlight marks the current step’s boxes, and earlier steps stay as they are. It ends on the whole diagram with the takeaway. Each step stays long enough to read its caption.

  1. Open the diagram, click Export, and choose Animation. A diagram with a story starts on Story, and the preview plays it.
  2. Under File type, choose GIF, MP4 or WebM.
  3. Under Resolution, choose 1× or 2×.
  4. Under Speed, choose 0.5×, 1×, 1.5× or 2×. The line under the preview shows the size in pixels and the length in seconds.
  5. Click Download GIF (or MP4 or WebM). Change the file name first if you like.
  • Which file type: GIF plays anywhere (READMEs, docs, chat and email), but files are larger and have up to 256 colours. MP4 is small and sharp, and suits LinkedIn, slides and other social posts. WebM is small and sharp, for web pages.
  • Speed is saved with the story, so the next export uses it too. 1× suits most readers; 0.5× gives more time for long captions.
  • Your data: the file is made in your browser; nothing is uploaded. Exporting saves your story edits and marks the story as matching the diagram as it is now.
  • Other ways to show it: Interactive HTML in Export makes one web page with the diagram and a step-by-step walkthrough of its story. Mermaid code can keep the story line or leave it out (Style, positions and story). Build-up and Flowing lines are animations without captions (see Canvas and export).
  • If it doesn’t work: MP4 and WebM are made with your browser’s video encoder. If it can’t make one at that size, the dialog says so and the button is off: choose GIF or 1×, or use a recent Chrome, Edge or Safari.
  • Guides: Animate a Mermaid diagram as a short technical explanation and Explain a flowchart step by step.
In Export, choose Animation: a diagram with a story starts on Story. Choose MP4, the resolution and the speed, then download.