v1
latestOpenAPI 3.1.02026-07-13121824.2 KBMermaid
Create Mermaid Diagram
Generate a Mermaid flowchart from a natural language description and auto-save it.
AUTHENTICATION REQUIRED - Must include valid JWT token in Authorization header.
Args: diagram_request: DiagramRequest containing the description request: FastAPI Request object (required for rate limiting) current_user: Authenticated user (injected by Auth0 middleware) db: Database session
Returns: MermaidResponse with Mermaid syntax code and saved diagram ID
Rate limit: Configurable via RATE_LIMIT_PER_MINUTE env var (default: 10/minute)
post/api/generate-mermaid
Request body
Example request
{
"description": "User login flow with authentication and error handling",
"diagram_type": "flowchart"
}Response
Successful Response
Example response
{
"mermaidCode": "flowchart TB\n start([Start])\n finish([End])\n start --> finish",
"savedDiagramId": 123,
"title": "User login flow with authentication..."
}