Archway turns natural-language and diagram-as-code descriptions into rendered architecture diagrams. The platform exposes two surfaces: a typed DSL for authoring diagrams, and a versioned REST API for managing them programmatically.
These two pages are the source of truth for the public developer surface. They are generated against the same code that runs in production.
Most integrations only need three things: an API key, a diagram ID, and the DSL string for that diagram.
ak_) issued fromDashboard → API Keys.POST /api/v1/diagrams with either a dslSource string (deterministic) or a prompt string (AI generation).GET and PATCH /api/v1/diagrams/[id].GET /api/v1/diagrams/[id]/export.Beyond authoring DSL by hand, Archway can derive a diagram from several upstream artifacts. Each path produces the same canonical ArchModel shape for cloud-arch and C4, so a diagram's downstream views and edits work the same regardless of how it was created.
POST /api/v1/diagrams with a prompt field.schema.prisma, Drizzle db/schema.ts, or SQL DDL) → deterministically parsed into an Entity Relationship Diagram in under a second. No AI call. Surfaced on the scan page when the scanner detects one of these files.POST /api/ai/image with a multipart form.Archway DSL is a brace-delimited text format. A minimal cloud architecture diagram looks like this:
diagram "Hello Archway" {
zone "Edge" color blue {
node cdn "CDN" icon aws/cloudfront
}
zone "Origin" color teal {
node api "API" icon aws/lambda
}
connect cdn -> api "HTTPS"
}The full grammar — including all seven diagram types, valid keywords, color palette, and edge styles — lives in the DSL Reference.
The /api/v1 namespace follows additive versioning: new optional fields and new endpoints may appear without a version bump; breaking changes ship as /api/v2. The DSL parser is permissive about whitespace and comments but strict about keywords; unknown tokens raise a ParseError with line and column information.
Bug reports and feature requests:contact@archdiagram.dev. Security disclosures follow the policy on theSecurity page.