Skip to content
REST API

Limits and good practice

Quotas, timeouts and long-running calls in the Brunel REST API, plus practical advice for CI pipelines and agents.

Quotas

API calls count against your plan exactly like the app: tracked projects, analyses per month and AI actions per month. See Plans and limits. When a quota is used up, calls answer upgrade_required (402) until the next month or an upgrade.

Long calls

EndpointTypical duration
POST /v1/projects (analysis)5 to 60 seconds, depending on the repository
Everything elsewell under a second

This call waits for the result instead of returning a job id. Set your client timeout to at least 120 seconds, and do not retry a call that is still running.

Good practice

  • Reuse analyses. Read an existing analysis with GET /v1/projects/{id}; analyze again only when the code changed.
  • One key per program, read-only when it only reads.
  • Log x-request-id with every call you make.
  • Handle errors by code and back off on 5xx.
Limits and good practice · Brunel Docs