curl https://api.60db.ai/memory/usage?period=current_month \
-H "Authorization: Bearer your-api-key"
const res = await fetch('https://api.60db.ai/memory/usage?period=current_month', {
headers: { 'Authorization': 'Bearer your-api-key' },
});
const { data } = await res.json();
import requests
res = requests.get(
'https://api.60db.ai/memory/usage',
params={'period': 'current_month'},
headers={'Authorization': 'Bearer your-api-key'},
)
data = res.json()['data']
{
"success": true,
"data": {
"period": "current_month",
"workspace_id": 24,
"billing_owner": {
"id": 33,
"name": "Kapil Karda",
"current_balance_usd": 9.46304021
},
"total": {
"net_spend_usd": 0.002779,
"operations": 10,
"refunds": 1
},
"by_service": {
"MEMORY_EXTRACT": {
"net_spend_usd": 0.00000169,
"gross_units": 592,
"operation_count": 2,
"refund_count": 0
},
"MEMORY_EXTRACT_REFUND": {
"net_spend_usd": -0.00000010,
"gross_units": 0,
"operation_count": 0,
"refund_count": 1
},
"MEMORY_INGEST": {
"net_spend_usd": 0.00007110,
"gross_units": 711,
"operation_count": 2,
"refund_count": 0
},
"MEMORY_RECALL": {
"net_spend_usd": 0.00270000,
"gross_units": 9,
"operation_count": 9,
"refund_count": 0
}
}
}
}
Memory & RAG
Get Memory Usage
Monthly (or custom-period) spend breakdown for the workspace’s memory operations
GET
/
memory
/
usage
curl https://api.60db.ai/memory/usage?period=current_month \
-H "Authorization: Bearer your-api-key"
const res = await fetch('https://api.60db.ai/memory/usage?period=current_month', {
headers: { 'Authorization': 'Bearer your-api-key' },
});
const { data } = await res.json();
import requests
res = requests.get(
'https://api.60db.ai/memory/usage',
params={'period': 'current_month'},
headers={'Authorization': 'Bearer your-api-key'},
)
data = res.json()['data']
{
"success": true,
"data": {
"period": "current_month",
"workspace_id": 24,
"billing_owner": {
"id": 33,
"name": "Kapil Karda",
"current_balance_usd": 9.46304021
},
"total": {
"net_spend_usd": 0.002779,
"operations": 10,
"refunds": 1
},
"by_service": {
"MEMORY_EXTRACT": {
"net_spend_usd": 0.00000169,
"gross_units": 592,
"operation_count": 2,
"refund_count": 0
},
"MEMORY_EXTRACT_REFUND": {
"net_spend_usd": -0.00000010,
"gross_units": 0,
"operation_count": 0,
"refund_count": 1
},
"MEMORY_INGEST": {
"net_spend_usd": 0.00007110,
"gross_units": 711,
"operation_count": 2,
"refund_count": 0
},
"MEMORY_RECALL": {
"net_spend_usd": 0.00270000,
"gross_units": 9,
"operation_count": 9,
"refund_count": 0
}
}
}
}
Return the wallet owner’s spend on memory operations over a given period, broken down by operation type. Unbilled — calling this endpoint is always free and works even when the wallet is empty.
Use this endpoint to:
- Power a “Memory spend” widget in your own dashboard
- Alert on daily/monthly spend thresholds
- Reconcile refunds against original charges
Request
Headers
string
required
Bearer token with your API key
Query parameters
string
default:"current_month"
Time window to aggregate over. One of:
current_month— from midnight on the 1st of the current monthlast_30_days— rolling 30-day window ending nowall_time— all history (since the transaction log was created)
Response
boolean
true on success.object
Show properties
Show properties
string
Echoes back the requested
period.integer
The workspace this usage belongs to.
object
object
object
Per-service-type breakdown. Keys are
MEMORY_INGEST, MEMORY_EXTRACT,
MEMORY_RECALL, MEMORY_CONTEXT, and the corresponding *_REFUND
entries when refunds have occurred.Each value contains:net_spend_usd— after refundsgross_units— total units used (chars for ingest, bytes for extract, queries for recall/context)operation_count— positive operations onlyrefund_count— refunded operations only
Example
curl https://api.60db.ai/memory/usage?period=current_month \
-H "Authorization: Bearer your-api-key"
const res = await fetch('https://api.60db.ai/memory/usage?period=current_month', {
headers: { 'Authorization': 'Bearer your-api-key' },
});
const { data } = await res.json();
import requests
res = requests.get(
'https://api.60db.ai/memory/usage',
params={'period': 'current_month'},
headers={'Authorization': 'Bearer your-api-key'},
)
data = res.json()['data']
{
"success": true,
"data": {
"period": "current_month",
"workspace_id": 24,
"billing_owner": {
"id": 33,
"name": "Kapil Karda",
"current_balance_usd": 9.46304021
},
"total": {
"net_spend_usd": 0.002779,
"operations": 10,
"refunds": 1
},
"by_service": {
"MEMORY_EXTRACT": {
"net_spend_usd": 0.00000169,
"gross_units": 592,
"operation_count": 2,
"refund_count": 0
},
"MEMORY_EXTRACT_REFUND": {
"net_spend_usd": -0.00000010,
"gross_units": 0,
"operation_count": 0,
"refund_count": 1
},
"MEMORY_INGEST": {
"net_spend_usd": 0.00007110,
"gross_units": 711,
"operation_count": 2,
"refund_count": 0
},
"MEMORY_RECALL": {
"net_spend_usd": 0.00270000,
"gross_units": 9,
"operation_count": 9,
"refund_count": 0
}
}
}
}
Notes
- Refunds appear as separate service types (
MEMORY_EXTRACT_REFUND,MEMORY_INGEST_REFUND, etc.) with negativenet_spend_usd. This preserves an auditable distinction between “a charge that happened and was reversed” vs “no charge at all”. - The
billing_owner.current_balance_usdreflects the live wallet — it is not period-scoped, it’s always the current balance regardless of whichperiodyou requested. - For a full operation-level audit trail (every single row in
transaction_log), use the dashboard — this endpoint is an aggregated summary.
Related
- Pricing & Billing — rates, refund policy, header reference
- Memory feature overview