Skip to main content
POST
/
v1
/
graphs
/
call
cURL
curl -X POST 'https://api.supermodeltools.com/v1/graphs/call' \
  -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": {
    "generatedAt": "2025-02-05 15:42:10.000000000 Z",
    "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": {
            "file": "src/index.ts"
          }
        },
        {
          "id": "fn:service.ts:handle",
          "labels": [
            "Function"
          ],
          "properties": {
            "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 (job completed)

Async response envelope for code graph 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).