Skip to main content
GET
/
memory
/
usage
curl https://api.60db.ai/memory/usage?period=current_month \
  -H "Authorization: Bearer your-api-key"
{
  "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

Authorization
string
required
Bearer token with your API key

Query parameters

period
string
default:"current_month"
Time window to aggregate over. One of:
  • current_month — from midnight on the 1st of the current month
  • last_30_days — rolling 30-day window ending now
  • all_time — all history (since the transaction log was created)

Response

success
boolean
true on success.
data
object

Example

curl https://api.60db.ai/memory/usage?period=current_month \
  -H "Authorization: Bearer your-api-key"
{
  "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 negative net_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_usd reflects the live wallet — it is not period-scoped, it’s always the current balance regardless of which period you requested.
  • For a full operation-level audit trail (every single row in transaction_log), use the dashboard — this endpoint is an aggregated summary.