v1
latestOpenAPI 3.1.02026-07-13121824.2 KBMermaid
Create Mermaid Diagram From Image
Generate a Mermaid flowchart from an uploaded image and auto-save it.
AUTHENTICATION REQUIRED - Must include valid JWT token in Authorization header.
Args: request: FastAPI Request object (required for rate limiting) image: Uploaded image file (PNG, JPG, JPEG) description: Optional text description to supplement image analysis 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_IMAGE_PER_MINUTE env var (default: 5/minute) Note: Lower rate limit than text generation due to higher processing costs.
post/api/generate-mermaid-from-image
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..."
}