Skip to main content
POST
/
v1
/
graphs
/
call
Call graph
curl --request POST \
  --url https://api.supermodeltools.com/v1/graphs/call \
  --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": "Call graph generated successfully",
  "stats": {
    "filesProcessed": 2,
    "classes": 0,
    "functions": 2,
    "types": 0,
    "processingTimeMs": 8
  },
  "graph": {
    "nodes": [
      {
        "id": "fn:index.ts:init",
        "labels": [
          "Function"
        ],
        "properties": {
          "name": "init"
        },
        "file": "src/index.ts"
      },
      {
        "id": "fn:service.ts:handle",
        "labels": [
          "Function"
        ],
        "properties": {
          "name": "handle"
        },
        "file": "src/service.ts"
      }
    ],
    "relationships": [
      {
        "id": "fn:index.ts:init_calls_fn:service.ts:handle",
        "type": "calls",
        "startNode": "fn:index.ts:init",
        "endNode": "fn:service.ts:handle",
        "properties": {
          "count": 4
        }
      }
    ]
  }
}

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

Call graph

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