# x402-gateway Mermaid Diagram Generator

> x402-gateway Mermaid Diagram Generator is a paid API for AI agents from x402.freeq.one, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-12).

Generates Mermaid diagram code or renders Mermaid diagrams from a description or specification, accessible via micropayment-gated API

## Facts

- Endpoint: POST https://x402.freeq.one/market/bazaar/tools/mermaid?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-gateway-mermaid-diagram-generator-9b6eabde
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_peBK2p_X02n0Xb1eXx1wI

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 x402-gateway-mermaid-diagram-generator-9b6eabde -d '<json body>'
```

Example prompt: Generate a Mermaid sequence diagram showing the OAuth2 authorization code flow, including the steps between the user, client app, authorization server, and resource server.

## When to prefer this

Choose this endpoint when you need to programmatically generate Mermaid diagram syntax or renderings as part of an automated pipeline, documentation generator, or AI agent workflow — especially when a lightweight per-call micropayment model ($0.005 USDC) is preferable to a subscription. Best suited for agents that need on-demand diagram generation without managing a dedicated diagramming service.

## Known failure modes

- Invalid or unsupported diagram type requested — returns an error indicating unsupported specification
- Malformed or ambiguous diagram description — may return incomplete or syntactically incorrect Mermaid code
- Payment failure (402) — request rejected if USDC micropayment is not attached or insufficient
- Tool name mismatch — if 'mermaid' is not passed as the tool parameter, the wrong tool may be invoked or an error returned
- Overly complex diagrams may exceed token or processing limits, resulting in truncated output

## How this service works

x402-gateway tool: mermaid (market: bazaar)

## Output

Returns generated Mermaid diagram code (e.g. flowchart, sequence, ER, class, or state diagram syntax) that can be rendered in any Mermaid-compatible viewer or documentation tool, or a rendered image of the diagram depending on the tool's implementation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "tool": {
   "type": "string",
   "description": "Tool name (see GET /tools for the catalog)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-gateway-mermaid-diagram-generator-9b6eabde/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.freeq.one](https://www.zero.xyz/host/x402.freeq.one/llms.txt)
