Skip to main content
POST
/
v1
/
analysis
/
circular-dependencies
cURL
curl -X POST 'https://api.supermodeltools.com/v1/analysis/circular-dependencies' \
  -H 'Idempotency-Key: <idempotency-key>' \
  -H 'X-Api-Key: <api-key>' \
  -F 'file=@/path/to/your/repo-snapshot.zip;type=application/zip'
{
  "status": "completed",
  "jobId": "abc-123-def",
  "result": {
    "metadata": {
      "totalFiles": 142,
      "totalImports": 487,
      "cycleCount": 7,
      "analysisMethod": "tarjan_scc",
      "analysisStartTime": "2026-02-09T12:00:00Z",
      "analysisEndTime": "2026-02-09T12:00:05Z"
    },
    "cycles": [
      {
        "id": "cycle-1",
        "severity": "high",
        "files": [
          "src/services/billingService.ts",
          "src/services/orderService.ts",
          "src/services/userService.ts"
        ],
        "edges": [
          {
            "source": "src/services/userService.ts",
            "target": "src/services/orderService.ts",
            "importedSymbols": [
              "getOrders",
              "OrderStatus"
            ]
          },
          {
            "source": "src/services/orderService.ts",
            "target": "src/services/billingService.ts",
            "importedSymbols": [
              "calculateTotal"
            ]
          },
          {
            "source": "src/services/billingService.ts",
            "target": "src/services/userService.ts",
            "importedSymbols": [
              "getUserDiscount"
            ]
          }
        ],
        "breakingSuggestion": "src/services/billingService.ts -> src/services/userService.ts"
      }
    ],
    "summary": {
      "totalCycles": 7,
      "filesInCycles": 18,
      "highSeverityCount": 2,
      "mediumSeverityCount": 3,
      "lowSeverityCount": 2
    }
  }
}

Authorizations

X-Api-Key
string
header
required

API key issued by the control plane for accessing data plane resources.

Headers

Idempotency-Key
string
required

Unique identifier for this request for idempotency and tracing.

Body

multipart/form-data
file
file
required

Zipped repository archive containing the code to analyze.

Response

Circular dependency analysis (job completed)

Async response envelope for circular dependency analysis operations.

status
enum<string>
required

Current status of the job.

Available options:
pending,
processing,
completed,
failed
jobId
string
required

Unique identifier for the job.

retryAfter
integer<int32>

Recommended seconds to wait before polling again.

error
string

Error message (present when status is failed).

result
object

The result (present when status is completed).