/api/orgs/{org_id}/usage/by-keyRoll up usage per API key
Provisioning key only: an inference key gets 403, because the rollup reveals every key's spend. Nano-USD fields are decimal strings.
認証: AuthorizationヘッダーにBearer形式のAPIキー
パスパラメータ
org_idstring必須Your organization id (uuid).
GET /api/whoamireturns it.
クエリパラメータ
windowenumLookback window ending now.
24hbuckets hourly,7dand30ddaily.
レスポンス
200Per-key rollup.
レスポンス
report_kindstring必須windowenum必須keysarray<object>必須Highest all-in spend first.
keys
api_key_idstring | null必須Null only when the key was hard-deleted before the request settled.
key_labelstring | null必須Null when the key has since been deleted; history is kept.
modelsarray<object>必須models
modelstring必須request_countinteger必須Every finished request, errors and pre-dispatch refusals included.
error_countinteger必須Subset whose terminal state was not
completed.input_tokensinteger必須output_tokensinteger必須cost_usdnumber必須Charged platform credits, dollars.
estimated_cost_usdnumber必須Never-charged BYOK estimate at list price, dollars.
free_usdnumber必須List-price value of promotion-funded usage, dollars (never charged).
paid_nano_usdstring必須Charged part, nano-USD as a decimal string.
byok_nano_usdstring必須BYOK list-price estimate, nano-USD as a decimal string.
free_nano_usdstring必須Free list value, nano-USD as a decimal string.
spend_nano_usdstring必須All-in: paid + BYOK + free, nano-USD as a decimal string.
totalsobject必須totals
request_countinteger必須Every finished request, errors and pre-dispatch refusals included.
error_countinteger必須Subset whose terminal state was not
completed.input_tokensinteger必須output_tokensinteger必須cost_usdnumber必須Charged platform credits, dollars.
estimated_cost_usdnumber必須Never-charged BYOK estimate at list price, dollars.
free_usdnumber必須List-price value of promotion-funded usage, dollars (never charged).
paid_nano_usdstring必須Charged part, nano-USD as a decimal string.
byok_nano_usdstring必須BYOK list-price estimate, nano-USD as a decimal string.
free_nano_usdstring必須Free list value, nano-USD as a decimal string.
spend_nano_usdstring必須All-in: paid + BYOK + free, nano-USD as a decimal string.
last_used_atstring必須
400Unknown window.
レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
401Missing, unknown or revoked API key.
レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
403The key is not a provisioning key (inference keys are refused, reads included), or it is a customer-plan key.
レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
404Unknown organization, or not the key's own organization.
レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
422The window holds too many rows to summarize live; use a shorter window or the usage export.
レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
429The shared analytics read slots are busy. Retry after
Retry-After.レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
503Usage analytics are temporarily unavailable. Retry shortly.
レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
リクエスト
curl https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/usage/by-key?window=24h \
-H "Authorization: Bearer YOUR_API_KEY"レスポンス
{
"report_kind": "live_usage_summary",
"window": "7d",
"keys": [
{
"api_key_id": "6b1d2f4e-3c8a-4f0e-9a21-7e5c0d9b4a33",
"key_label": "support-bot",
"models": [
{
"model": "gpt-6-luna",
"request_count": 912,
"error_count": 7,
"input_tokens": 3804410,
"output_tokens": 290112,
"cost_usd": 4.812,
"estimated_cost_usd": 0,
"free_usd": 0.31,
"paid_nano_usd": "4812000000",
"byok_nano_usd": "0",
"free_nano_usd": "310000000",
"spend_nano_usd": "5122000000"
}
],
"totals": {
"request_count": 912,
"error_count": 7,
"input_tokens": 3804410,
"output_tokens": 290112,
"cost_usd": 4.812,
"estimated_cost_usd": 0,
"free_usd": 0.31,
"paid_nano_usd": "4812000000",
"byok_nano_usd": "0",
"free_nano_usd": "310000000",
"spend_nano_usd": "5122000000"
},
"last_used_at": "2026-11-18T14:32:07.481Z"
}
]
}https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/usage/by-key?window=24h