{"slug":"agentsvc-io-api-v1-proxy-diagram-render-4810a6","title":"Render Mermaid diagram code to SVG and/or PNG","host":"agentsvc.io","method":"POST","resource":"https://agentsvc.io/api/v1/proxy/diagram-render","category":"code","description":"Render Mermaid diagram code to SVG and/or PNG: flowchart, sequence, class, state, ER, gantt, pie, mindmap, timeline and more. Invalid syntax returns HTTP 400 with the Mermaid parse error (not charged), so an agent can fix and retry. Params: code (Mermaid source, required), format (svg default, png o","price_listed":0.01,"price_asked":0.01,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":891,"reported_calls_30d":10,"reported_payers_30d":3,"networks":["eip155:137","eip155:42161","eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"code":"flowchart LR\n  A[Agent] -->|HTTP 402| B(agentsvc.io)\n  B --> C{Paid?}\n  C -->|yes| D[JSON result]","format":"svg"},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"properties":{"background":{"type":"string"},"code":{"description":"Mermaid diagram source","type":"string"},"format":{"default":"svg","enum":["svg","png","both"],"type":"string"},"theme":{"default":"default","enum":["default","dark","neutral","forest","base"],"type":"string"},"width":{"default":1200,"maximum":4000,"minimum":200,"type":"integer"}},"required":["code"]},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"properties":{"data":{"properties":{"diagram_type":{"type":"string"},"format":{"type":"string"},"svg":{"type":"string"},"svg_bytes":{"type":"integer"},"theme":{"type":"string"}},"required":["diagram_type","format"],"type":"object"},"success":{"type":"boolean"}},"required":["success","data"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-10-10","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.01,"price_match":true,"latency_ms":891,"error":null}],"description_full":"Render Mermaid diagram code to SVG and/or PNG: flowchart, sequence, class, state, ER, gantt, pie, mindmap, timeline and more. Invalid syntax returns HTTP 400 with the Mermaid parse error (not charged), so an agent can fix and retry. Params: code (Mermaid source, required), format (svg default, png or both), theme (default, dark, neutral, forest, base), width (200 to 4000, default 1200), background.","last_updated":"2026-10-10T09:09:20.267Z","schemes":["exact"]}