The key management endpoints let you create and administer the API keys used to authenticate calls toDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/arjunkshah/supercompress/llms.txt
Use this file to discover all available pages before exploring further.
/v1/compress. All six endpoints require a Firebase ID token — not an API key — because they operate on behalf of a signed-in user and are the same routes the dashboard UI calls.
Authentication
All requests on this page must include:SC_AUTH_DEV=1) you can pass a synthetic token such as dev:my-uid:me@dev.local instead of a real Firebase token.
GET /api/me
Returns the Firebase uid and email address for the currently authenticated user. This is a lightweight liveness check for the auth layer and is also used by the dashboard on first load.Example request
Response fields
The Firebase user ID.
The email address associated with the Firebase account. May be
null for anonymous or OAuth-only accounts.Example response
GET /api/keys
Lists all active (non-revoked) API keys for the authenticated user, together with a per-key usage summary.Example request
Example response
POST /api/keys
Creates a new API key for the authenticated user. Returns the key record and the full secret value. The secret is derived from a cryptographically random 24-byte token and is shown only once — it is not stored, only its SHA-256 hash is.Body parameters
A human-readable label for the key. Maximum 80 characters. Whitespace-only names are stored as
"Untitled key".Example request
Example response
PATCH /api/keys/
Renames an existing key. Only the display name is changed; the key secret, prefix, and usage history are unaffected.Path parameter
| Parameter | Type | Description |
|---|---|---|
key_id | string | UUID of the API key |
Body parameters
New display name. Between 1 and 80 characters. Whitespace-only values are ignored and the existing name is preserved.
Example request
Example response
404 if the key does not exist or does not belong to the authenticated user.
DELETE /api/keys/
Permanently revokes an API key. The key is immediately removed from the hash lookup index, so any in-flight requests using it will start failing with401 within milliseconds.
Path parameter
| Parameter | Type | Description |
|---|---|---|
key_id | string | UUID of the API key |
Example request
Example response
Revocation is permanent and immediate. The key hash is removed from the lookup index, and the key record is marked
"revoked": true. There is no undo — create a new key if access needs to be restored.404 if the key does not exist or does not belong to the authenticated user.
GET /api/keys//usage
Returns a usage snapshot for a single key, broken down by calendar day (UTC).Path parameter
| Parameter | Type | Description |
|---|---|---|
key_id | string | UUID of the API key |
Example request
Response fields
Total number of successful
/v1/compress calls made with this key.Cumulative input token count across all requests (tokens before compression).
Cumulative output token count across all requests (tokens after compression).
Cumulative tokens saved:
total_tokens_in − total_tokens_out. This directly maps to KV-cache reduction.A map from UTC date strings (
"YYYY-MM-DD") to per-day usage records. Each record contains key_id, requests, tokens_in, tokens_out, and tokens_saved for that day.Example response
404 if the key does not exist or does not belong to the authenticated user.