API reference
GET /api/v1/usage/
Read the current month quota and plan limits for an API key, or aggregated for the whole workspace.
Read your API key's current month usage and plan limits. Useful for
showing a "calls remaining" widget in your UI, or for triggering an
upgrade prompt before customers hit a hard 429.
Per-key usage
GET /api/v1/usage/
X-Api-Key: smk_...No body, no query parameters.
Response: 200 OK
{
"key_prefix": "smk_aBc12dEf",
"plan": "starter",
"monthly_quota": 500,
"used_this_month": 12,
"remaining": 488,
"max_size_inches": 8,
"max_dpi": 300,
"allow_custom_logo": true,
"max_active_dynamic_qrs": 10,
"max_bulk_items": 50,
"active_dynamic_qrs": 3,
"credits_remaining": 0
}| Field | Type | Description |
|---|---|---|
key_prefix | string | First 12 chars of the calling key. Useful for logging. |
plan | enum | free, starter, pro, agency, or enterprise |
monthly_quota | integer | Total renders allowed this calendar month |
used_this_month | integer | Successful renders so far |
remaining | integer | max(0, monthly_quota - used_this_month) |
max_size_inches | number | Largest size_inches the plan accepts |
max_dpi | integer | Largest dpi the plan accepts |
allow_custom_logo | bool | Whether logo_file and logo_url are allowed |
max_active_dynamic_qrs | integer | Cap on simultaneously active dynamic QRs |
max_bulk_items | integer | Per-call cap on /generate/bulk/ (0 = disabled) |
active_dynamic_qrs | integer | Currently active dynamic QRs counted against the cap |
credits_remaining | integer | Credit pack balance, consumed before subscription quota |
401 Unauthorized
Missing or invalid X-Api-Key.
Workspace usage
Aggregate usage across every key in the workspace. Useful for the dashboard's "this month" tile.
GET /api/v1/usage/me/
Authorization: Bearer <jwt>Response: 200 OK
{
"plan": "starter",
"monthly_quota": 500,
"used_this_month": 217,
"remaining": 283,
"credits_remaining": 0,
"active_dynamic_qrs": 7,
"max_active_dynamic_qrs": 10,
"by_key": [
{
"id": 7,
"name": "production",
"key_prefix": "smk_aBc12dEf",
"used_this_month": 198
},
{
"id": 12,
"name": "marketing",
"key_prefix": "smk_zYxWvUtS",
"used_this_month": 19
}
]
}by_key lists per-key consumption so you can spot which integration is
spending the budget.
Quota counter behavior
- Resets to 0 on the 1st of every month at 00:00 UTC.
- Increments only on successful 200 responses. Errors are free.
- Cache hits count: you got a deliverable.
- Bulk renders count one per item.
- On Starter, Pro, and Agency,
used_this_monthcan exceedmonthly_quota(overage). The overage line is invoiced at month close. - On Free and Enterprise, exceeding
monthly_quotareturns429 Too Many Requestsinstead.
Examples
curl https://api.qrstudio.agency/api/v1/usage/ \
-H "X-Api-Key: smk_..."r = requests.get(
"https://api.qrstudio.agency/api/v1/usage/",
headers={"X-Api-Key": "smk_..."},
)
usage = r.json()
print(f"{usage['remaining']} / {usage['monthly_quota']} left")const r = await fetch("https://api.qrstudio.agency/api/v1/usage/", {
headers: { "X-Api-Key": "smk_..." },
});
const usage = await r.json();
console.log(`${usage.remaining} / ${usage.monthly_quota} left`);