{"uid":"cap_t1DEf5LHIqQtd-FtRbR0z","slug":"tanod-pdfpeek-mermaid-renderer-0b524b34","name":"Tanod pdfpeek Mermaid Renderer","description":"pdfpeek (Tanod) Mermaid render: diagram code drawn as an SVG or PNG image in a sandboxed browser with no network. Use when an agent must turn Mermaid diagram code into an SVG or sharp PNG image for a report or README.","url":"https://tanod.dev/v1/render/mermaid?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"code":{"type":"string","maxLength":20000,"minLength":1,"description":"Mermaid diagram source (flowchart, sequence, class, state, ER, gantt, pie, git graph, mindmap, timeline and the other types of mermaid 11.4.1), 1-20,000 characters. Fenced ``` lines are not needed. A syntax error is a 422 with the line number."},"scale":{"type":"number","default":2,"maximum":4,"minimum":1,"description":"PNG pixel density, 1-4 (default 2, sharp when zoomed). Lowered automatically so the longest side stays at 8,000 px. Ignored for svg."},"theme":{"enum":["default","dark","forest","neutral","base"],"type":"string","default":"default","description":"Mermaid theme. dark gives a dark background in PNG; the others a white one."},"format":{"enum":["svg","png"],"type":"string","default":"svg","description":"svg (default, scalable, plain text labels) or png."},"output":{"enum":["base64","url"],"type":"string","default":"base64","description":"base64 (default): inline. url: stored for 24 hours; link, metadata."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_DLRrP4yY2_b8HKk2OA5rv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","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 an SVG or PNG image using a sandboxed, offline browser.","exampleAgentPrompt":"Can you render this Mermaid flowchart as a sharp PNG at scale 3 using the dark theme and give me a hosted URL I can embed in my report? Here's the code: `graph TD; A-->B; B-->C; C-->D;`","exampleUseCases":[{"title":"README diagram for open-source project","prompt":"Take this Mermaid sequence diagram and render it as an SVG with the default theme — I want to embed it directly in my GitHub README. Here's the code: `sequenceDiagram; Alice->>Bob: Hello; Bob-->>Alice: Hi back;`"},{"title":"High-res PNG for a client report","prompt":"Render this Mermaid ER diagram as a PNG at scale 4 using the forest theme and give me a hosted URL that lasts 24 hours so I can drop it into my PDF report. Here's the diagram code: `erDiagram; CUSTOMER ||--o{ ORDER : places; ORDER ||--|{ LINE-ITEM : contains;`"},{"title":"Dark-themed architecture diagram for a slide deck","prompt":"I have a Mermaid flowchart I need as a dark-themed PNG at scale 2 — can you render it and return it as a base64 image so I can embed it in my slide deck? Code: `graph LR; API-->ServiceA; API-->ServiceB; ServiceB-->DB;`"}],"resultDescription":"Returns either a base64-encoded image string (default) or a hosted URL valid for 24 hours, along with metadata. Output is an SVG (scalable vector, plain text labels) or a raster PNG (up to 8000px on the longest side, pixel density 1–4x). Syntax errors yield a 422 with the offending line number.","failureModes":["422 Unprocessable Entity with line number if Mermaid syntax is invalid","Input code exceeds 20,000 character limit — request rejected","Scale value out of range (must be 1–4)","Unsupported theme or format enum value — validation error","Requested PNG would exceed 8000px on longest side — scale auto-reduced","Hosted URL expires after 24 hours — link becomes unavailable"],"whenToPreferThis":"Choose this endpoint when an agent needs to convert raw Mermaid diagram source code into a visual image (SVG or PNG) with no external network calls from the renderer — ideal for security-sensitive pipelines. Prefer over client-side rendering when the agent environment has no browser or JavaScript runtime, or when a reproducible, server-side rendered image at a known pixel density is required for embedding in reports, READMEs, or slide decks.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-30T18:43:40.647Z","isFirstParty":false,"canonicalSlug":"tanod-pdfpeek-mermaid-renderer-0b524b34"}