API key usage history + balance
curl --request GET \
--url https://api.aegis-kyt.com/v2/me/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aegis-kyt.com/v2/me/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aegis-kyt.com/v2/me/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"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
}{
"detail": [
{
"loc": [
"body",
"address"
],
"msg": "Field required",
"type": "missing"
}
]
}V2 Public API
GET /v2/me/usage
Current credit balance + paginated call history for the authenticated key.
GET
/
me
/
usage
API key usage history + balance
curl --request GET \
--url https://api.aegis-kyt.com/v2/me/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aegis-kyt.com/v2/me/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aegis-kyt.com/v2/me/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"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
}{
"detail": [
{
"loc": [
"body",
"address"
],
"msg": "Field required",
"type": "missing"
}
]
}Auth: Required · Cost: Free (no charge) · Use case: Balance
visibility for self-service dashboards + pre-flight checks
user_api_usage, billing snapshot
from the same ledger as GET /v2/balance.
Use this endpoint to:
- Surface “X credits remaining” inside your own admin UI.
- Detect an empty balance or a monthly cap about to bite 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 param | Type | Default | Notes |
|---|---|---|---|
page | int ≥ 1 | 1 | 1-indexed page number |
limit | int 1–100 | 20 | Rows per page |
since | ISO date | — | Filter to rows with created_at >= since |
Response 200
{
"schema_version": 1,
"billing": {
"model": "ledger",
"currency": "USD",
"balance_usd": 42.5,
"monthly_spent_usd": 7.5,
"monthly_cap_usd": 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
| Field | Type | Notes |
|---|---|---|
model | string | Always ledger |
currency | string | Always USD (legacy; kept for compatibility) |
balance_usd | number | null | Remaining balance, in credits (1 credit = 1 USDT of top-up) |
monthly_spent_usd | number | null | Month-to-date spend in credits, resets on the 1st |
monthly_cap_usd | number | null | Optional monthly ceiling in credits. null means no cap |
*_usd fields. For the same numbers with the
*_credits twins and unit: "credits", call
GET /v2/balance.
rows[] — usage history
Each row mirrors one entry in user_api_usage.
| Field | Type | Notes |
|---|---|---|
id | int | Monotonic per-user ID |
endpoint | string | Path called (/v2/check-address, etc.) |
address | string | null | Looked-up address. Null for non-screening endpoints |
network | string | null | BSC / ETH / TRON / … |
provider | string | null | Aegis. Null for free probes. (Older rows may carry values from the multi-provider tier removed 2026-06-01.) |
risk_level | enum | null | none / low / medium / high / critical / sanctioned |
risk_score | int 0–100 | null | Aggregated score from the provider |
quota_cost | int | Deprecated — legacy unit count from the retired quota model; not the amount charged |
http_status | int | Wire status code (200, 402, 502, …) |
elapsed_ms | int | null | Server-side latency |
created_at | RFC 3339 | UTC timestamp |
Pagination
| Field | Type | Notes |
|---|---|---|
total | int | Total matching rows (respecting since) |
page | int | Echo of the requested page |
total_pages | int | ceil(total / limit) — always ≥ 1 |
Errors
| HTTP | code | Why |
|---|---|---|
| 401 | missing_api_key | No Authorization: Bearer … header |
| 401 | invalid_api_key | Unknown / revoked key |
| 422 | validation | page < 1 / limit out of 1–100 / non-ISO since |
Notes
- This endpoint is free — 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 the balance ledger on the hot path, not from this audit table.
See also
- V2 API key (auth) — how to issue + rotate
- V2 introduction — billing (credits) + refund semantics
- POST /v2/screen
— the typical paid call you’ll see in
rows[]
Authorizations
Your aeg_… API key from the dashboard (Account → API tab).
Query Parameters
Required range:
x >= 1Required range:
1 <= x <= 100ISO date; only rows with created_at >= since
Response
Successful Response
The response is of type Response Me Usage Me Usage Get · object.

