Four entry points, and when they appear
- AI fix only shows in the error bar (and in the editor's error popup) when the code fails to render.
- AI edit is the first small button next to “Detected: …” in the status line while the code renders fine. Type one sentence saying what should change (see below).
- AI tidy sits right after it. It doesn't change what the diagram says, only how it is written (see below).
- Draw it with AI is for when you have text but no code (see below). When the home page box gets text with no diagram code, it becomes the main button; in the editor, a new blank diagram shows “Describe a diagram” in the middle of the preview and in the status line; and when text pasted into the editor is reported as having no diagram type, the error bar offers it too.
Rendering and export never need either of them, and everything else keeps working offline. Nothing is requested from the AI endpoint when the page loads; only a click does that.
Draw it with AI: when you have no code
Give the AI some text or a description and it writes the Mermaid code for one diagram from it: sequential steps usually become a flowchart, nested points usually become a mind map; if you want another type, say so, for example “as a mind map, …”. Node labels stay as close to your own words as possible.
From the home page or the error bar the request goes out right away; from “Describe a diagram” you write the description first (three examples are one click away) and press “Draw” or ⌘ / Ctrl + Enter. The result is checked locally: if it renders, it goes straight into the editor and the notice offers “Undo”; if it doesn't, nothing is put in automatically and the dialog offers “Try again” or “Use it anyway”, or “Change it” to reword the description.
To adjust the result, use “AI edit” with one sentence, or click and double-click nodes in the preview. The more specific the description (who does what, which condition leads where), the less there is to fix; see the guide No code? Draw a diagram from text for examples.
What AI tidy changes, and what it leaves alone
It may: switch flowchart shapes to match their meaning (stadium for start / end, diamond for decisions, cylinder for databases), pick the direction from the shape of the diagram (TD / LR), group steps that clearly belong to one phase in a subgraph, break very long labels with <br/>, declare sequence diagram participants in order of appearance, and normalise indentation and blank lines. If the code has a syntax error, it fixes that on the way.
It will not: add or remove steps, change the diagram type, translate or reword any text, or write any colours or styling (classDef, style, %%{init}%%). Colours always come from the site's themes, so switching themes keeps working after a tidy-up.
As with a fix, you see the line-by-line diff first and decide whether to apply or discard.
AI edit: change the diagram from one sentence
Once the diagram is on screen, changing its structure does not need any code. Single-step edits (add a step, add a branch, change a shape, delete, edit a link's text) are one click away on the node or link in the preview (see Edit in the preview); for several changes at once, reordering, or a whole series of steps from a description, click “AI edit”, type one sentence such as “swap the approval and payment steps”, “add a logging step after every decision” or “add a Rejected branch to the decision”, and press “Edit”. The AI does only what that sentence says; every other node, label and direction stays as written, and no colours are added. The result comes back as a line-by-line diff, checked locally, for you to apply or discard; “Change it” lets you reword the instruction and try again.
If the instruction cannot be done (asking for a diagram type Mermaid does not have, say), the code comes back unchanged and the dialog says so. To change just one node's text, double-clicking it in the preview is quicker and needs no AI.
What is sent, and whether it is stored
Only when you click “AI fix”, “AI tidy”, “AI edit” or “Draw” is the current code (plus the error message for a fix, or your instruction for an edit; for a drawing, the text or description you gave) sent to the AI engine, once. Nothing is sent otherwise. The server does not store any of it; its logs contain only lengths, timings and the mode. Rendering and export always happen in your browser.
Text goes out and text code comes back — this site uses no image or video generation model of any kind; diagrams are drawn by the Mermaid rendering engine in your browser. The full account is in the Privacy Policy.
Allowance
The free allowance has two parts (with an overall cap per network): AI fix 20 times a month per device, reset on the 1st; AI tidy, AI edit and "Draw it with AI" 2 times a day combined, counted per account when you are signed in and per device when you are not, reset at 00:00 UTC+8. A run where the AI returns the code unchanged does not count. When they are used up the buttons stay, but you get a message saying so; Pro members get 300 credits a month on the advanced engine, shared by fix, tidy, edit and draw; the error message, line number and the one-click local fix still help you fix the code.
The local check before you apply
“The AI says it is done” and “it actually renders” are two different things. When the result comes back, Diagramate parses it in your browser with the same rendering engine and shows either “Checked locally: the code renders” or “Still failing”. The dialog also shows a line-by-line diff; you decide whether to apply or discard.
If it still fails
- Read the line number and hint in the error bar. Most problems are arrows, brackets or full-width punctuation; see Common errors and how to fix them.
- Go back to your assistant, paste the error message, and copy the corrected reply again.