{"description":"A service for rendering Graphviz diagrams","endpoints":{"/":{"description":"Serve the web UI","method":"GET","parameters":{"inline":{"description":"Base64 encoded dotfile content to render on page load","required":false,"type":"string"}}},"/api/docs":{"description":"Get API documentation (this endpoint)","method":"GET"},"/generate":{"description":"Generate a Graphviz dotfile using AI","method":"POST","request_body":{"prompt":{"description":"Description of the graph to generate (e.g., 'ETL pipeline graph')","required":true,"type":"string"}},"response":{"dotfile":{"description":"Generated Graphviz dotfile content","type":"string"},"error":{"description":"Error message if generation failed","type":"string"}}},"/graphs":{"description":"Render a new graph","method":"POST","query_parameters":{"format":{"default":"png","description":"Output format for the graph","enum":["png","svg"],"required":false,"type":"string"}},"request_body":{"dotfile":{"description":"Graphviz dotfile content","required":true,"type":"string"}},"response":{"url":{"description":"URL to access the generated graph","type":"string"}}},"/graphs/<filename>":{"description":"Get an existing graph","method":"GET","parameters":{"base64":{"description":"Set to 'true' to get base64 encoded content instead of binary","required":false,"type":"string"},"filename":{"description":"Name of the graph file to retrieve","required":true,"type":"string"}}},"/health":{"description":"Health check endpoint (503 when degraded)","method":"GET"},"/validate":{"description":"Validate DOT syntax without rendering","method":"POST","request_body":{"dotfile":{"description":"Graphviz dotfile content to validate","required":true,"type":"string"}},"response":{"error":{"description":"Reason when invalid","type":"string"},"valid":{"description":"Whether the dotfile is valid","type":"boolean"}}}},"examples":{"curl_generate_ai":"curl -X POST -H 'Content-Type: application/json' -d '{\"prompt\": \"ETL pipeline graph\"}' https://graphviz-provider.rodmena.app/generate","curl_get_base64":"curl 'https://graphviz-provider.rodmena.app/graphs/SHA256_HASH.png?base64=true'","curl_render_png":"curl -X POST -H 'Content-Type: application/json' -d '{\"dotfile\": \"digraph { a -> b }\"}' https://graphviz-provider.rodmena.app/graphs","curl_render_svg":"curl -X POST -H 'Content-Type: application/json' -d '{\"dotfile\": \"digraph { a -> b }\"}' 'https://graphviz-provider.rodmena.app/graphs?format=svg'"},"title":"Graphviz as a Service API","version":"1.0.0"}
