REST API

Endpoint reference

Every Brunel REST API endpoint with its parameters, types, constraints and a curl example. Generated from the same definitions the API runs on.

Every endpoint below is generated from the definitions the API itself uses, and matches the OpenAPI document. Paths are relative to https://api.brunel.cloud.

GET /v1/me

Your account

The account behind the key, its plan and the key's scope. Returns 200. Same tool as MCP: whoami (read-only keys allowed).

curl
curl "https://api.brunel.cloud/v1/me" \
  -H "Authorization: Bearer $BRUNEL_API_KEY"

GET /v1/projects

List projects

Your projects, most recent first. Returns 200. Same tool as MCP: list_projects (read-only keys allowed).

Query parameters

NameTypeDescription
limitintegermin 1, max 100, default 20
curl
curl "https://api.brunel.cloud/v1/projects" \
  -H "Authorization: Bearer $BRUNEL_API_KEY"

POST /v1/projects

Analyze a repository

Read a GitHub repository: facts with file evidence, services, a security check and a suggested context. Waits for the result (5 to 60 seconds). Returns 201 when the work is done. Same tool as MCP: analyze_repository (needs a read and write key).

JSON body

NameTypeDescription
repoUrlrequiredstringGitHub URL or owner/repo≥ 1 chars, ≤ 500 chars
refstringBranch, tag or commit (default branch when omitted)≤ 200 chars
curl
curl -X POST "https://api.brunel.cloud/v1/projects" \
  -H "Authorization: Bearer $BRUNEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "repoUrl": "https://github.com/acme/shop" }'

GET /v1/projects/{id}

Get a project

A project's state and, once designed, its four priced tiers. Returns 200. Same tool as MCP: get_architecture (read-only keys allowed).

Path: id is the project id (conversationId in list results).

curl
curl "https://api.brunel.cloud/v1/projects/c_8Hk2…" \
  -H "Authorization: Bearer $BRUNEL_API_KEY"

POST /v1/projects/{id}/design

Design the infrastructure

Design four priced tiers. Missing context fields come from the suggested context. Waits for the result. Returns 200 when the work is done. Same tool as MCP: design_infrastructure (needs a read and write key).

Path: id is the project id (conversationId in list results).

JSON body

NameTypeDescription
contextobjectpeakRps, monthlyActiveUsers, dataVolumeGb, monthlyBudgetEur, opsSkill (none|basic|strong), availability (99|99.9|99.95), compliance (gdpr, health, pci…), providers (aws|scaleway), region
curl
curl -X POST "https://api.brunel.cloud/v1/projects/c_8Hk2…/design" \
  -H "Authorization: Bearer $BRUNEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /v1/projects/{id}/messages

Ask or change

Ask a question or request a change; a change creates a new version. Waits for the result. Returns 200 when the work is done. Same tool as MCP: refine_architecture (needs a read and write key).

Path: id is the project id (conversationId in list results).

JSON body

NameTypeDescription
messagerequiredstring≥ 1 chars, ≤ 4000 chars
focusTier"starter" | "growth" | "scale" | "enterprise"default "growth"
curl
curl -X POST "https://api.brunel.cloud/v1/projects/c_8Hk2…/messages" \
  -H "Authorization: Bearer $BRUNEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "message": "Use a managed Redis instead of self-hosting it" }'

GET /v1/projects/{id}/files

Get the generated files

The generated files of a tier; with `path`, one file's content. Returns 200. Same tool as MCP: get_files (read-only keys allowed).

Path: id is the project id (conversationId in list results).

Query parameters

NameTypeDescription
tier"starter" | "growth" | "scale" | "enterprise"default "growth"
versionintegermin 1, max 9007199254740991
pathstring≤ 300 chars
curl
curl "https://api.brunel.cloud/v1/projects/c_8Hk2…/files" \
  -H "Authorization: Bearer $BRUNEL_API_KEY"

Context fields

POST /v1/projects/{id}/design accepts an optional context. Omitted fields come from the context Brunel suggested after the analysis.

FieldTypeValues
peakRpsnumberPeak requests per second
monthlyActiveUsersnumberMonthly active users
dataVolumeGbnumberData held, in GB
monthlyBudgetEurnumberMonthly cloud budget, in euros
opsSkillstringnone, basic, strong
availabilitystring99, 99.9, 99.95
compliancestring[]gdpr, eu-residency, health, pci
providersstring[]aws, scaleway (as your plan allows)
regionstringRegion family, e.g. eu-west
Endpoint reference · Brunel Docs