Skip to main content
POST
/
v1
/
graphs
/
dependency
cURL
curl -X POST 'https://api.supermodeltools.com/v1/graphs/dependency' \
  -H 'Idempotency-Key: <idempotency-key>' \
  -H 'X-Api-Key: <api-key>' \
  -F 'file=@/path/to/your/repo-snapshot.zip;type=application/zip'
{
  "generatedAt": "2025-02-05 15:42:10.000000000 Z",
  "message": "Graph generated successfully",
  "stats": {
    "filesProcessed": 2,
    "classes": 0,
    "functions": 0,
    "types": 0,
    "processingTimeMs": 15
  },
  "graph": {
    "nodes": [
      {
        "id": "src/main.js",
        "labels": [
          "File"
        ],
        "properties": {
          "path": "src/main.js",
          "name": "main.js"
        }
      },
      {
        "id": "src/math.js",
        "labels": [
          "File"
        ],
        "properties": {
          "path": "src/math.js",
          "name": "math.js"
        }
      }
    ],
    "relationships": [
      {
        "id": "src/main.js_imports_src/math.js",
        "type": "imports",
        "startNode": "src/main.js",
        "endNode": "src/math.js",
        "properties": {}
      }
    ]
  }
}

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

Dependency graph

graph
object
required
generatedAt
string<date-time>
message
string
stats
object