Skip to main content
POST
/
v1
/
graphs
/
dependency
Dependency graph
curl --request POST \
  --url https://api.supermodeltools.com/v1/graphs/dependency \
  --header 'Content-Type: multipart/form-data' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --header 'X-Api-Key: <api-key>' \
  --form file='@example-file'
{
  "generatedAt": "2025-02-05T15:42:10.000Z",
  "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