{"uid":"cap_HQFiYpJQpvPzTKVXXaiq9","slug":"agentsvc-io-mermaid-diagram-renderer-6afba0d6","name":"agentsvc.io Mermaid Diagram Renderer","description":"86 APIs for AI agents: web scraping and crawling to Markdown, AI summaries, data extraction and cited answers, screenshots and PDF, PDF, OCR and document conversion, news, paper and developer search and more, paid per call with USDC on Base, Solana, Polygon or Arbitrum via x402. No account, no API key, free sample on every service.","url":"https://agentsvc.io/api/v1/proxy/diagram-render?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"code":{"type":"string","description":"Mermaid diagram source"},"theme":{"enum":["default","dark","neutral","forest","base"],"type":"string","default":"default"},"width":{"type":"integer","default":1200,"maximum":4000,"minimum":200},"format":{"enum":["svg","png","both"],"type":"string","default":"svg"},"background":{"type":"string"}}},"responseSchema":{"type":"json","example":{"data":{"svg":"<svg id=\"dccuoprioa\" width=\"100%\" xmlns=\"http://www.w3.org/2000/svg\" class=\"flowchart\" style=\"max-width: 948.234375px;\" …","theme":"default","format":"svg","svg_bytes":13690,"diagram_type":"flowchart"},"success":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_OqvTJCmjOpmlNqOLihx6_","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Renders Mermaid diagram source code into SVG or PNG images with configurable themes, dimensions, and backgrounds","exampleAgentPrompt":"Can you render this Mermaid diagram code as a PNG using the dark theme at 1600px wide? Here's the code: `graph TD; A-->B; B-->C;`","exampleUseCases":[{"title":"Flowchart visualization for documentation","prompt":"Take this Mermaid flowchart and render it as an SVG with the forest theme at 1200px wide so I can embed it in our README: `graph LR; User-->App; App-->DB; DB-->App;`"},{"title":"Architecture diagram for a presentation","prompt":"Render this Mermaid sequence diagram as a PNG using the neutral theme at 2000px wide with a white background — it's going into a slide deck: `sequenceDiagram; Alice->>Bob: Hello; Bob-->>Alice: Hi;`"},{"title":"Dark-mode diagram for developer portal","prompt":"Convert this Mermaid class diagram to SVG using the dark theme at 1400px wide — I need it for our dark-mode developer docs: `classDiagram; Animal <|-- Duck; Animal <|-- Fish;`"}],"resultDescription":"Returns a JSON object containing the rendered SVG markup string (and/or PNG data), the theme applied, the output format, the size in bytes, and the detected diagram type (e.g. flowchart, sequence).","failureModes":["Invalid or unparseable Mermaid syntax returns an error with no rendered output","Width outside the 200–4000 range is rejected","Unsupported theme enum value causes a validation error","Very large or deeply nested diagrams may time out or produce oversized output","Payment failure via x402 results in a 402 response with no diagram rendered"],"whenToPreferThis":"Choose this endpoint when you need server-side Mermaid rendering without setting up a local rendering environment — ideal for CI pipelines, documentation bots, or AI agents that generate architecture diagrams on the fly. It supports multiple themes and formats (SVG/PNG) in a single call-and-pay model with no API key required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T12:39:14.506Z","isFirstParty":false,"canonicalSlug":"agentsvc-io-mermaid-diagram-renderer-6afba0d6"}