← BreakpointAIAPI Documentation

API Reference

BreakpointAI REST API v1. All endpoints require an API key.

Authentication

Include your API key in every request using one of these methods:

# Header (recommended)
Authorization: Bearer bp_your_key_here

# Alternative header
X-API-Key: bp_your_key_here

# Query parameter
?api_key=bp_your_key_here

Get an API Key

POST/api/v1/keys

Create a new API key. No authentication required.

curl -X POST https://breakpointai.avipilcer.com/api/v1/keys \
  -H "Content-Type: application/json" \
  -d '{"tier": "free"}'

# Response:
{
  "apiKey": "bp_abc123...",
  "tier": "free",
  "message": "Save this key securely.",
  "usage": { "analysisLimit": 5, "period": "month" }
}

Analyze a Diff

POST/api/v1/analyze/diff

Submit a unified diff for semantic regression analysis.

Request Body

FieldTypeRequiredDescription
diffstringYesUnified diff (git diff output)
filenamestringNoSource filename for language detection
contextstringNoSurrounding code for enhanced analysis
curl -X POST https://breakpointai.avipilcer.com/api/v1/analyze/diff \
  -H "Authorization: Bearer bp_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "diff": "--- a/auth.ts\n+++ b/auth.ts\n@@ -1,5 +1,3 @@...",
    "filename": "auth.ts"
  }'

# Response:
{
  "analysisId": "bp_abc123",
  "summary": {
    "totalIssues": 3,
    "critical": 1,
    "high": 1,
    "medium": 1,
    "low": 0,
    "regressionScore": 48,
    "verdict": "warn"
  },
  "issues": [...],
  "functionsChanged": [...],
  "generatedTests": [...]
}

Generate Tests

POST/api/v1/analyze/generate-tests

Generate test cases for changed functions in a diff.

curl -X POST https://breakpointai.avipilcer.com/api/v1/analyze/generate-tests \
  -H "Authorization: Bearer bp_your_key" \
  -H "Content-Type: application/json" \
  -d '{"diff": "...", "filename": "auth.ts"}'

List Reports

GET/api/v1/reports

List your recent analysis reports.

Check Usage

GET/api/v1/usage

Check your current API usage and limits.

GitHub Webhook

POST/api/v1/webhooks/github

Configure as a GitHub webhook to automatically analyze PRs. Set content type to application/json and trigger on pull_request events.

Rate Limits

PlanAnalyses/monthPrice
Free5$0
Starter50$99/mo
Pro500$299/mo

Questions? Email avi@ultradeep.tech