Generate architecture diagrams, analyze repositories, and trigger agent-workflow runs over plain REST. JSON in, JSON out. No SDK required.
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)https://codelit.io/api/runs/triggerTrigger a deployed Agent Team from anywhere. The request body becomes the run's input, so any app that can POST (or Zapier, Make, and n8n) can start a run.
?d=<deployment>&t=<token> · The per-workflow token is the auth. Copy your live URL from a deployment's Schedule dialog or Settings → Webhooks.Your HTTPS webhookAdd a result webhook when scheduling a team. Codelit sends completed, halted, and failed terminal events with a stable delivery id and bounded run output.
X-Codelit-Signature as v1=HMAC-SHA256(secret, timestamp.raw_body). Use X-Codelit-Delivery for idempotency. Transient failures retry with the same id.| Field | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | System description (3-500 chars) |
| apiKey | string | Yes | Your OpenRouter API key, or use an Authorization bearer token |
{
"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" \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-d '{"prompt": "Netflix video streaming architecture"}'const res = await fetch("https://codelit.io/api/generate", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${process.env.OPENROUTER_API_KEY}`
},
body: JSON.stringify({
prompt: "Uber ride matching at scale"
}),
});
const { architecture } = await res.json();
console.log(architecture.title, architecture.nodes.length, "nodes");import os
import requests
res = requests.post("https://codelit.io/api/generate", json={
"prompt": "Spotify music streaming platform"
}, headers={
"Authorization": f"Bearer {os.environ['OPENROUTER_API_KEY']}"
})
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(", ")}`);# Copy your live URL from a deployment's Schedule dialog or Settings -> Webhooks
curl -X POST "https://codelit.io/api/runs/trigger?d=$DEPLOYMENT&t=$TOKEN" \
-H "Content-Type: application/json" \
-d '{"message": "New lead from the website, draft a reply"}'The API uses your OpenRouter key with free model fallback. Rate limits depend on your upstream provider account.
Pass the key as Authorization: Bearer or body apiKey.