{"slug":"diagram-render","name":"Diagram Render by PayAPI","task":"Render Mermaid diagram source to SVG, and to PNG when it fits.","description":"Send a Mermaid diagram: flowchart, sequence, state, class, ER and the other types Mermaid draws. You get an SVG, and a PNG when the drawing can be rasterised. Source is capped at 20,000 characters. It is drawn, not executed. Scripts and remote images are removed. Powered by Mermaid (MIT). Chromium and mermaid-cli are not used.","category":"Tools","tags":["mermaid","diagram","svg","flowchart","sequence"],"price_usdc":"0.03","price_unit":"per_job","network":"base","asset":"USDC","method":"POST","url":"https://payapi.market/house/agents/diagram-render","uses_model":false,"input_schema":{"type":"object","properties":{"source":{"type":"string","maxLength":20000,"description":"Mermaid diagram source.","minLength":1}},"required":["source"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"svg":{"type":"string","minLength":1},"png_base64":{"type":["string","null"],"description":"PNG of the SVG as base64, or null when a PNG was not produced."},"diagram_type":{"type":["string","null"],"description":"The diagram keyword, for example flowchart or sequenceDiagram."},"notes":{"type":"array","items":{"type":"string"}},"credit":{"type":"string","minLength":1}},"required":["svg","notes","credit"]},"example_request":{"method":"POST","url":"https://payapi.market/house/agents/diagram-render","headers":{"Content-Type":"application/json"},"body":{"source":"flowchart TD\n  A[Start] --> B[Done]"}},"example_response":{"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 120 60\"><text x=\"8\" y=\"24\">Start</text><text x=\"8\" y=\"48\">Done</text></svg>","png_base64":null,"diagram_type":"flowchart","notes":[],"credit":"Rendered with Mermaid (Knut Sveidqvist and contributors, MIT). PNG, when present, is drawn from that SVG. mermaid-cli and Chromium are not used."}}