License
License
GET /v1/license
Retrieve your current license information and credit balance. This is a read-only endpoint that does not consume credits.
Headers
| Header | Required | Description |
|---|---|---|
Authorization |
Yes | Bearer <api-key-or-jwt> |
Request
No request body. This is a GET endpoint.
Examples
cURL
Python
curl https://api.quantized.us/v1/license \
-H "Authorization: Bearer sk-quantized-YOUR-KEY"
import httpx
response = httpx.get(
"https://api.quantized.us/v1/license",
headers={"Authorization": "Bearer sk-quantized-YOUR-KEY"},
)
info = response.json()
lifetime = info["budget"]["lifetime"] if info.get("budget") else None
if lifetime:
print(f"Used: {lifetime['used']} micro-credits")
print(f"Remaining: {lifetime['remaining']} micro-credits")
Response
{
"institution_id": "550e8400-e29b-41d4-a716-446655440000",
"license_type_id": "660e8400-e29b-41d4-a716-446655440001",
"license_id": "770e8400-e29b-41d4-a716-446655440002",
"unique_id": "user-123",
"budget": {
"wallet_kind": "credit",
"unit": "micro_credit",
"strategy": "lifetime",
"lifetime": {
"used": 150000,
"limit": 1000000,
"adjustment": 0,
"remaining": 850000,
"window_start_at": null
},
"periods": {}
},
"policy": null
}
Response fields
| Field | Type | Description |
|---|---|---|
institution_id |
string | Your institution’s UUID |
license_type_id |
string | License type UUID |
license_id |
string | Your specific license UUID |
unique_id |
string or null | Caller-supplied unique identifier (e.g. user ID or course enrollment ID) |
budget |
object or null | Credit budget snapshot: used, limit, remaining, and period breakdown for this license. null when no wallet is configured |
policy |
object or null | Policy document controlling endpoint access for this license type. null means unrestricted |
Errors
| Status | Condition |
|---|---|
401 |
Invalid or missing API key |