Skip to main content
GET
/
me
/
usage
API key usage history + current quota
curl --request GET \
  --url https://api.aegis-kyt.com/v2/me/usage \
  --header 'Authorization: Bearer <token>'
{
  "schema_version": 1,
  "billing": {
    "model": "ledger",
    "balance_usd": "42.500000",
    "monthly_spent_usd": "12.300000",
    "monthly_cap_usd": "500.000000"
  },
  "key": {
    "prefix": "aeg_N0FU",
    "name": "production-backend"
  },
  "rows": [
    {
      "id": "f7e6d5c4-b3a2-4190-8f7e-6d5c4b3a2190",
      "endpoint": "/v2/check-address",
      "address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
      "network": "TRON",
      "provider": "Aegis",
      "risk_level": "sanctioned",
      "risk_score": 100,
      "quota_cost": 0,
      "http_status": 200,
      "elapsed_ms": 1840,
      "created_at": "2026-06-09T14:12:03.512+00:00"
    }
  ],
  "total": 1,
  "page": 1,
  "total_pages": 1
}
Auth: Required · Cost: Free (no quota debit) · Use case: Quota visibility for self-service dashboards + pre-flight checks
Returns the same data shown in your kabinet at app.aegis-kyt.com/account?tab=api. Single source of truth — rows from user_api_usage, billing snapshot from user_billing. Use this endpoint to:
  • Surface “X of Y calls remaining” inside your own admin UI.
  • Detect quota exhaustion before firing a paid call (avoids a 402 round-trip).
  • Audit which addresses your key has screened (CSV / SOC2 reporting).

Request

curl -H "Authorization: Bearer aeg_YOUR_KEY_HERE" \
  "https://api.aegis-kyt.com/v2/me/usage?page=1&limit=20"
Query paramTypeDefaultNotes
pageint ≥ 111-indexed page number
limitint 1–10020Rows per page
sinceISO dateFilter to rows with created_at >= since

Response 200

{
  "schema_version": 1,
  "billing": {
    "monthly_quota":    15,
    "used_this_month":  3,
    "remaining":        12,
    "period_start":     "2026-05-01",
    "period_end":       null
  },
  "key": {
    "prefix": "aeg_x4k2",
    "name":   "production"
  },
  "rows": [
    {
      "id":            842,
      "endpoint":      "/v2/screen",
      "address":       "TScSLnUodZVsgoGchZspDoimDjDB9bwqVv",
      "network":       "TRON",
      "provider":      "Aegis",
      "risk_level":    "medium",
      "risk_score":    50,
      "quota_cost":    1,
      "http_status":   200,
      "elapsed_ms":    90,
      "created_at":    "2026-05-11T14:33:12.481Z"
    }
  ],
  "total":       3,
  "page":        1,
  "total_pages": 1
}

billing object

FieldTypeNotes
monthly_quotaint | nullPlan-level cap. null when the user has no billing row yet (pre-onboarding state)
used_this_monthint | nullQuota units already consumed in the current period
remainingint | nullmax(0, monthly_quota - used_this_month)
period_startISO date | nullStart of the current billing period (UTC)
period_endISO date | nullReserved for future plans with non-monthly cadences
When monthly_quota is null, the user has not been onboarded onto a paid plan yet. Calls will return 402 until the kabinet provisions a plan.

rows[] — usage history

Each row mirrors one entry in user_api_usage.
FieldTypeNotes
idintMonotonic per-user ID
endpointstringPath called (/v2/check-address, etc.)
addressstring | nullLooked-up address. Null for non-screening endpoints
networkstring | nullBSC / ETH / TRON / …
providerstring | nullAegis / provider_b / provider_a / consensus. Null for free probes
risk_levelenum | nullnone / low / medium / high / critical / sanctioned
risk_scoreint 0–100 | nullAggregated score from the provider
quota_costintUnits debited for this call. 0 for free + refunded calls
http_statusintWire status code (200, 402, 502, …)
elapsed_msint | nullServer-side latency
created_atRFC 3339UTC timestamp

Pagination

FieldTypeNotes
totalintTotal matching rows (respecting since)
pageintEcho of the requested page
total_pagesintceil(total / limit) — always ≥ 1

Errors

HTTPcodeWhy
401missing_api_keyNo Authorization: Bearer … header
401invalid_api_keyUnknown / revoked key
422validationpage < 1 / limit out of 1–100 / non-ISO since

Notes

  • This endpoint does not debit quota — call it as often as you like.
  • Best-effort write semantics on user_api_usage: in extremely rare cases (Supabase write fails) a paid call’s row may be missing. Billing is unaffected — it’s computed from consume_quota on the hot path, not from this audit table.
  • For programmatic billing-period detection, also check period_start changes — when it increments, your monthly quota has reset.

See also

Authorizations

Authorization
string
header
required

Your aeg_… API key from the dashboard (Account → API tab).

Query Parameters

page
integer
default:1
Required range: x >= 1
limit
integer
default:20
Required range: 1 <= x <= 100
since
string | null

ISO date; only rows with created_at >= since

Response

Successful Response

The response is of type Response Me Usage Me Usage Get · object.