{ }
Generate system architecture diagrams programmatically. One endpoint, JSON in, JSON out.
https://codelit.io/api/generateGenerate a system architecture from a text description. Returns JSON with nodes, edges, and metadata.
https://codelit.io/api/github/analyzeAnalyze a GitHub repository. Returns detected files, tech patterns, directory structure, and source files for architecture generation.
{ owner, repo, branch } · Header: x-github-token (optional for public repos)| Field | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | System description (3-500 chars) |
| apiKey | string | No | Your OpenRouter API key (optional) |
{
"architecture": {
"title": "Netflix Video Streaming Architecture",
"description": "Video streaming with CDN...",
"nodes": [
{ "id": "cdn", "label": "CDN", "type": "cdn", "description": "..." },
{ "id": "api", "label": "API Gateway", "type": "backend", "description": "..." }
],
"edges": [
{ "from": "cdn", "to": "api", "label": "HTTPS", "dataFlow": "high" }
]
},
"model": "nvidia/nemotron-3-super-120b-a12b:free",
"usage": { "prompt_tokens": 300, "completion_tokens": 800 }
}curl -X POST https://codelit.io/api/generate \
-H "Content-Type: application/json" \
-d '{"prompt": "Netflix video streaming architecture"}'const res = await fetch("https://codelit.io/api/generate", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
prompt: "Uber ride matching at scale"
}),
});
const { architecture } = await res.json();
console.log(architecture.title, architecture.nodes.length, "nodes");import requests
res = requests.post("https://codelit.io/api/generate", json={
"prompt": "Spotify music streaming platform"
})
arch = res.json()["architecture"]
print(f"{arch['title']} — {len(arch['nodes'])} nodes")curl -X POST https://codelit.io/api/github/analyze \
-H "Content-Type: application/json" \
-d '{"owner": "vercel", "repo": "next.js", "branch": "canary"}'const res = await fetch("https://codelit.io/api/github/analyze", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
owner: "vercel", repo: "next.js", branch: "canary"
}),
});
const { files, patterns, totalFiles } = await res.json();
console.log(`${totalFiles} files, detected: ${patterns.join(", ")}`);The API uses free AI models with automatic fallback. Rate limits depend on upstream model providers.
For higher limits, pass your own apiKey (OpenRouter key).