ArchDiagram API
Generate architecture and data-flow diagrams from natural-language prompts. Mermaid text output in seconds, or rendered PNG images via an async job. Authenticated with bearer API keys.
Mermaid or image
Sync mermaid text at $0.05, or rendered PNG images at $0.20.
Domain templates
AWS, Azure, GCP, Kubernetes, Snowflake, Databricks, and more.
Edit & iterate
Refine existing diagrams by generation ID or image URL.
Get started
- 1Create a key at API settings. Buy a credit pack ($25 / $50 / $100 / $500) or enable auto-top-up.
- 2Send requests with the key as a Bearer token in the
Authorizationheader. - 3For
type: "image", pollGET /api/v1/jobs/{id}until the job completes.
Example requests
Mermaid example (sync)
curl -X POST https://app.architecturediagram.ai/api/v1/diagrams/generate \
-H "Authorization: Bearer $ARCHDIAGRAM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A user signs up via email, gets verified, and lands on a dashboard",
"type": "mermaid"
}'Image example (async with polling)
# 1. Kick off the async generation
curl -X POST https://app.architecturediagram.ai/api/v1/diagrams/generate \
-H "Authorization: Bearer $ARCHDIAGRAM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A typical SaaS web architecture on AWS with CDN, ALB, ECS, RDS, and S3",
"type": "image",
"diagram_type": "architecture",
"template_id": "aws-architecture"
}'
# → { "id": "<job_id>", "status": "pending", "check_url": "/api/v1/jobs/<job_id>" }
# 2. Poll for the result
curl https://app.architecturediagram.ai/api/v1/jobs/$JOB_ID \
-H "Authorization: Bearer $ARCHDIAGRAM_API_KEY"Edit an existing diagram
curl -X POST https://app.architecturediagram.ai/api/v1/diagrams/edit \
-H "Authorization: Bearer $ARCHDIAGRAM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"generation_id": "gen_abc123",
"prompt": "Add a Redis cache between the ALB and ECS tasks"
}'Core endpoints
POSTGenerate a diagram from a prompt. Body: { prompt, type, diagram_type?, template_id?, model?, reference_urls? }
POSTEdit an existing diagram via generation_id, image_url, or image_base64.
GETPoll an async image job until it completes.
GETCurrent credit balance and last-30-day spend.
GETMachine-readable listing of all available templates.
Pricing
Rate limits
- Per minute60 requests
- Per hour1,000 requests
- Over limitHTTP 429 + Retry-After
- EnterpriseBypasses limits
Templates
Pass a template_id to bias output toward a specific domain. Full machine-readable listing at /api/v1/templates.
Cloud Providers
aws-architectureazure-architecturegcp-architecture
Data Platforms
snowflake-architecturedatabricks-architecturedata-pipeline
DevOps
kubernetes-clusterci-cd-pipeline
AI / ML
ml-pipeline
General
microservicesevent-drivenserverless
Organization
org-chartcompany-structureteam-topology
Product
user-journeyproduct-roadmapfeature-prioritization
HR
onboarding-flowrecruitment-pipelineperformance-review
Building with an LLM or agent?
We publish a self-contained skill file designed to drop into an agent's system prompt or skill registry.
ArchitectureDiagramSkill.md →