All graph generation endpoints are asynchronous. When you submit a request, the API creates a background job and returns immediately with a job status. You then poll for results by re-submitting the same request with the sameDocumentation Index
Fetch the complete documentation index at: https://docs.supermodeltools.com/llms.txt
Use this file to discover all available pages before exploring further.
Idempotency-Key.
How It Works
Job Statuses
| Status | HTTP Code | Description |
|---|---|---|
pending | 202 | Job is queued, waiting to be processed |
processing | 202 | Job is actively being analyzed |
completed | 200 | Job finished successfully, result field contains the graph |
failed | 200 | Job encountered an error, error field contains the message |
Response Envelope
All graph endpoints return a consistent envelope:status- Current job statejobId- Unique identifier for the jobretryAfter- Recommended seconds to wait before the next poll (only present for pending/processing)result- The graph data (only present when completed)error- Error description (only present when failed)
Polling with cURL
Store theIdempotency-Key in a variable and re-use it for polling:
Using the SDK
The@supermodeltools/sdk package handles polling automatically. Install it with:
Basic Usage
Configuring Polling Behavior
Available Methods
| Method | Endpoint |
|---|---|
client.generateDependencyGraph(file) | /v1/graphs/dependency |
client.generateCallGraph(file) | /v1/graphs/call |
client.generateDomainGraph(file) | /v1/graphs/domain |
client.generateParseGraph(file) | /v1/graphs/parse |
client.generateSupermodelGraph(file) | /v1/graphs/supermodel |
Error Handling
If a job fails, the response will havestatus: "failed" with an error message:
| Error | Resolution |
|---|---|
| Nested archives | Exclude .zip/.tar files from your archive using .gitattributes with export-ignore |
| File exceeds size limits | Exclude large binary files from the archive |
| Blob expired | Job waited too long in the queue; retry with a new idempotency key |
Idempotency Key Behavior
TheIdempotency-Key scopes a job to your API key. Key behaviors:
- Same key, same user: Returns the existing job (no duplicate processing)
- Same key, different user: Creates independent jobs (no conflict)
- New key, same file: Creates a new job (useful for re-analysis after code changes)
Completed jobs are retained for 24 hours. After that, submitting the same idempotency key will create a new job.