Anokha Web Tools

POST /v1/diagram

Render a Graphviz DOT diagram (flowcharts, architecture, graphs, org charts) to SVG, PNG or PDF. Returns a public URL (30 days).

Price: $0.01 per call, paid in USDC on Base via x402. No API key or signup.

Example call

npx x402-fetch -X POST -H 'Content-Type: application/json' -d '{"dot": "digraph { rankdir=LR; User -> API -> DB }", "format": "svg"}' https://tools.anokha.space/v1/diagram

Example response

{
  "url": "https://tools.anokha.space/f/abc123def456.svg",
  "bytes": 20480,
  "expires": "2026-10-25T00:00:00Z",
  "content_type": "image/svg+xml"
}

How payment works

The first request returns HTTP 402 with a PAYMENT-REQUIRED header. An x402 client signs a USDC authorization and retries with a PAYMENT-SIGNATURE header. You are charged only when the call succeeds.