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

  1. 1Create a key at API settings. Buy a credit pack ($25 / $50 / $100 / $500) or enable auto-top-up.
  2. 2Send requests with the key as a Bearer token in the Authorization header.
  3. 3For type: "image", poll GET /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

POST
/api/v1/diagrams/generate

Generate a diagram from a prompt. Body: { prompt, type, diagram_type?, template_id?, model?, reference_urls? }

POST
/api/v1/diagrams/edit

Edit an existing diagram via generation_id, image_url, or image_base64.

GET
/api/v1/jobs/{id}

Poll an async image job until it completes.

GET
/api/v1/usage

Current credit balance and last-30-day spend.

GET
/api/v1/templates

Machine-readable listing of all available templates.

Pricing

TypeCostResponse
Mermaid generate$0.05Sync
Image generate$0.20Async
Mermaid edit$0.05Sync
Image edit$0.20Async

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-architecture
  • azure-architecture
  • gcp-architecture

Data Platforms

  • snowflake-architecture
  • databricks-architecture
  • data-pipeline

DevOps

  • kubernetes-cluster
  • ci-cd-pipeline

AI / ML

  • ml-pipeline

General

  • microservices
  • event-driven
  • serverless

Organization

  • org-chart
  • company-structure
  • team-topology

Product

  • user-journey
  • product-roadmap
  • feature-prioritization

HR

  • onboarding-flow
  • recruitment-pipeline
  • performance-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 →