# Tanod pdfpeek Mermaid Renderer

> Tanod pdfpeek Mermaid Renderer is a paid API for AI agents from tanod.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-30).

Renders Mermaid diagram source code into an SVG or PNG image using a sandboxed, offline browser.

## Facts

- Endpoint: POST https://tanod.dev/v1/render/mermaid?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tanod-pdfpeek-mermaid-renderer-0b524b34
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_t1DEf5LHIqQtd-FtRbR0z

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability tanod-pdfpeek-mermaid-renderer-0b524b34 -d '<json body>'
```

Example prompt: 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;`

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tanod-pdfpeek-mermaid-renderer-0b524b34/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tanod.dev](https://www.zero.xyz/host/tanod.dev/llms.txt)
