# DiagramForge Render

> DiagramForge Render is a paid API for AI agents from diagramforge.slatespark.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-13).

Renders text-based diagram source code (Mermaid, PlantUML, Graphviz, D2, and 20+ other languages) into SVG or PNG images via a pay-per-use API.

## Facts

- Endpoint: POST https://diagramforge.slatespark.workers.dev/render?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/diagramforge-render-38c31830
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hVtDVUusDhf4K4cjY7TYK

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 diagramforge-render-38c31830 -d '<json body>'
```

Example prompt: Can you render this Mermaid diagram as a PNG image? Here's the source: 'graph TD; A[Start] --> B{Decision}; B -->|Yes| C[Do it]; B -->|No| D[Skip];'

## When to prefer this

Use DiagramForge when you need to convert text-based diagram code (Mermaid, PlantUML, Graphviz, D2, etc.) into a visual image (SVG or PNG) without needing an account or API key. Ideal for AI agents that generate diagram source code and need to produce shareable image output on-demand, paying per render with USDC on Base via x402.

## Known failure modes

- Invalid or unsupported diagram language type returns an error
- Malformed diagram source code causes a rendering parse error
- Unsupported output format for a given diagram language (e.g. jpeg only for graphviz)
- Payment failure or insufficient USDC balance blocks the request
- Missing required fields (type or source) returns a validation error

## How this service works

Pay-per-render diagram API for AI agents. Renders Mermaid, PlantUML, Graphviz, D2 and 20+ other text-to-diagram languages to SVG/PNG images. x402 payments (USDC on Base), no accounts or API keys.

## Output

Returns an SVG or PNG image (as a string) of the rendered diagram. The output format depends on the requested format field (svg by default, or png/jpeg for graphviz).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "type",
  "source"
 ],
 "properties": {
  "type": {
   "enum": [
    "mermaid",
    "plantuml",
    "graphviz",
    "d2",
    "c4plantuml",
    "erd",
    "dbml",
    "nomnoml",
    "svgbob",
    "wavedrom",
    "vegalite",
    "vega",
    "pikchr",
    "ditaa",
    "blockdiag",
    "seqdiag",
    "actdiag",
    "nwdiag",
    "packetdiag",
    "rackdiag",
    "bytefield",
    "structurizr",
    "excalidraw",
    "bpmn",
    "tikz",
    "wireviz"
   ],
   "type": "string",
   "description": "Diagram language"
  },
  "format": {
   "enum": [
    "svg",
    "png",
    "jpeg",
    "txt"
   ],
   "type": "string",
   "description": "Output format: svg (default) or png (jpeg for graphviz)"
  },
  "source": {
   "type": "string",
   "description": "Diagram source code, e.g. 'graph TD; A-->B;' for mermaid"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "string"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/diagramforge-render-38c31830/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from diagramforge.slatespark.workers.dev](https://www.zero.xyz/host/diagramforge.slatespark.workers.dev/llms.txt)
