Skip to content
Fourohtwo

Mermaid Diagram Renderer

x402.freeq.one/tools/mermaid

Mermaid Diagram Renderer: Render a Mermaid diagram to an image (PNG or SVG). Returns a base64-encoded image (MCP content type image). Options: format (png|svg), theme (default|dark|forest|neutral), scale (1-4, PNG only). Pay per call in USDC on Base via x402 — POST https://x402.freeq.one/tools/mermaid.

BaseUnchecked
POSThttps://x402.freeq.one/tools/mermaid

UptimeNot checked yet

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://x402.freeq.one/tools/mermaid", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"code":"graph TD\n  A[Client] -->|402| B[x402 Gateway]\n  B -->|settle| C[USDC on Base]\n  B -->|forward| D[Upstream API]","scale":2,"theme":"default","format":"png"}),
});
console.log(await res.json());

Example input

{
  "code": "graph TD\n  A[Client] -->|402| B[x402 Gateway]\n  B -->|settle| C[USDC on Base]\n  B -->|forward| D[Upstream API]",
  "scale": 2,
  "theme": "default",
  "format": "png"
}

More from x402-gateway