| title | Authentication |
|---|---|
| description | How to authenticate your API requests |
| icon | key |
The Supermodel API uses API keys to authenticate requests. You can view and manage your API keys in the Supermodel Dashboard.
**Using the API Playground**: The interactive playground in this documentation connects to our production API. Generate an API key from the [Supermodel Dashboard](https://dashboard.supermodeltools.com/) to test endpoints directly from these docs.Authentication to the Data Plane API is performed via the X-Api-Key header.
X-Api-Key: smsk_live_...All API requests require an Idempotency-Key header. This is a unique value (such as a UUID) that you generate for each request. It serves three purposes:
- Job identity: The key identifies your graph generation job. Re-submitting the same key returns the existing job status rather than creating a duplicate.
- Polling: You poll for results by re-submitting the same request with the same idempotency key. See Async Polling for details.
- Request tracing: The key is echoed back in the
X-Request-Idresponse header for debugging and support purposes.
Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000You can generate a UUID in most languages or use command-line tools like uuidgen.
Here's how to include the headers in a cURL request:
curl --request POST \
--url https://api.supermodeltools.com/v1/graphs/dependency \
--header "Idempotency-Key: $(uuidgen)" \
--header 'X-Api-Key: <your-api-key>' \
--header 'Content-Type: multipart/form-data' \
--form file='@./repo.zip'