๐Ÿ”— Anthonian Mermaid URL Generator (MUG)

Generate a link to view Mermaid.js diagrams by posting to this API endpoint.

๐Ÿ“ฎ Endpoint

POST https://mug.anth.dev/api/generate

๐Ÿ“ฆ Request

Send a JSON body with the Mermaid diagram string:

{
  "mermaid": "<mermaid string here>"
}

โœ… Response

Youโ€™ll get back a JSON object with the sharable viewer link:

{
  "url": "https://mug.anth.dev/view/<encoded>"
}

๐Ÿงช Example (cURL)

You can use curl to generate a shareable URL:

curl -X POST https://mug.anth.dev/api/generate \
  -H "Content-Type: application/json" \
  -d '{"mermaid": "graph TD; A-->B"}'

Example response:

{
  "url": "https://mug.anth.dev/view/eNpLL0osyFAIcbFWcNTVtXMCACboBEE"
}