Mermaid API — Pay Per Call with USDC on Base

mermaid API

Render a Mermaid diagram to an image (PNG or SVG). Returns a base64-encoded image. Options: format (png|svg), theme (default|dark|forest|neutral), scale (1-4, PNG only). Part of the x402 Gateway — $0.005 per call, settled in USDC on Base. No accounts, no API keys: agents pay per request via the x402 protocol.

How payment works

Send a POST to https://x402.freeq.one/tools/mermaid without a payment header and the API replies 402 Payment Required with an x402 challenge (payTo address, USDC amount, Base network). A paying agent signs the USDC payment and retries with the X-PAYMENT header — settlement is verified on-chain in seconds and the API response returns with an X-PAYMENT-RESPONSE receipt.

Example call

curl -X POST https://x402.freeq.one/tools/mermaid \
  -H "Content-Type: application/json" \
  -d '{"{param}": "{value}"}'

Browse every pay-per-call API on the all APIs page, or inspect the machine-readable service card and OpenAPI spec.