QRQR Code Agency
API reference

GET /api/v1/usage/

Read the current month quota and plan limits for an API key, or aggregated for the whole workspace.

GET /api/v1/usage/

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
}
FieldTypeDescription
key_prefixstringFirst 12 chars of the calling key. Useful for logging.
planenumfree, starter, pro, agency, or enterprise
monthly_quotaintegerTotal renders allowed this calendar month
used_this_monthintegerSuccessful renders so far
remainingintegermax(0, monthly_quota - used_this_month)
max_size_inchesnumberLargest size_inches the plan accepts
max_dpiintegerLargest dpi the plan accepts
allow_custom_logoboolWhether logo_file and logo_url are allowed
max_active_dynamic_qrsintegerCap on simultaneously active dynamic QRs
max_bulk_itemsintegerPer-call cap on /generate/bulk/ (0 = disabled)
active_dynamic_qrsintegerCurrently active dynamic QRs counted against the cap
credits_remainingintegerCredit 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_month can exceed monthly_quota (overage). The overage line is invoiced at month close.
  • On Free and Enterprise, exceeding monthly_quota returns 429 Too Many Requests instead.

Examples

cURL

curl https://api.qrstudio.agency/api/v1/usage/ \
-H "X-Api-Key: smk_..."

Python

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")

JavaScript

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`);

See also

On this page