← Back to Docs
Recipe

Sequence diagram writer from API flow

Generate Mermaid sequence diagrams by describing an API interaction in plain language.

Input

POST /api/recipes/sequence-diagram
Content-Type: application/json

{
  "flow": "User clicks login, POST /auth with email+password,
           server validates, returns JWT, client stores token,
           redirects to dashboard"
}

Output

sequenceDiagram
  participant Client
  participant Server
  Client->>Server: POST /auth {email, password}
  Server-->>Client: 200 {jwt}
  Client->>Client: store token
  Client->>Server: GET /dashboard (Authorization: Bearer)
  Server-->>Client: 200 dashboard.html

Parameters

FieldTypeDescription
flowstringNatural language description of the API interaction
stylestringDiagram theme: mermaid, plantuml (default: mermaid)

Usage

Describe any multi-step API flow — OAuth handshakes, payment pipelines, WebSocket negotiations — and receive a ready-to-render sequence diagram. Paste the output directly into Mermaid Live or your documentation.