GET /v1/usage

Returns compute unit consumption and cache performance metrics for your API key.

Request

bash
GET https://api.memcone.com/v1/usage
Authorization: Bearer mem_live_...
GET https://api.memcone.com/v1/usage
Authorization: Bearer mem_live_...

No request body.

Response

json
{
  "units": 1240,
  "hits": 84,
  "misses": 31,
  "tokensSaved": 6720,
  "avgLatencyMs": 48,
  "hitRate": 0.73,
  "estimatedBillDollars": 0.00
}
{
  "units": 1240,
  "hits": 84,
  "misses": 31,
  "tokensSaved": 6720,
  "avgLatencyMs": 48,
  "hitRate": 0.73,
  "estimatedBillDollars": 0.00
}

| Field | Type | Description | |---|---|---| | units | number | Total compute units consumed | | hits | number | Cache hits on /v1/context calls | | misses | number | Cache misses on /v1/context calls | | tokensSaved | number | Total tokens saved by memory compression | | avgLatencyMs | number | Average server-side latency across all calls | | hitRate | number | hits / (hits + misses) — 0 to 1 | | estimatedBillDollars | number | Estimated charge for units above the trial allowance |

Compute units

Each call type consumes a different number of units:

| Call | Units | |---|---| | POST /v1/context (cache hit) | 1 | | POST /v1/context (cache miss) | 3 | | POST /v1/context?mode=fresh | 5 | | POST /v1/remember | 3 | | POST /v1/recall | 1 |

New accounts include 200 trial units. Once exhausted, upgrade at memcone.com/dashboard/billing — paid usage is billed at $0.80 per 1,000 units. MCP tool calls are blocked when the trial runs out; REST /v1/* usage in the dashboard shares the same meter.

Example

typescript
const res = await fetch('https://api.memcone.com/v1/usage', {
  headers: { 'Authorization': `Bearer ${process.env.MEMCONE_API_KEY}` },
})
const usage = await res.json()

console.log(`Units used: ${usage.units}`)
console.log(`Cache hit rate: ${(usage.hitRate * 100).toFixed(0)}%`)
console.log(`Tokens saved: ${usage.tokensSaved.toLocaleString()}`)
const res = await fetch('https://api.memcone.com/v1/usage', {
  headers: { 'Authorization': `Bearer ${process.env.MEMCONE_API_KEY}` },
})
const usage = await res.json()

console.log(`Units used: ${usage.units}`)
console.log(`Cache hit rate: ${(usage.hitRate * 100).toFixed(0)}%`)
console.log(`Tokens saved: ${usage.tokensSaved.toLocaleString()}`)

Notes

  • Metrics are tracked per API key, not per scope
  • Hit/miss counts only include /v1/context calls (remember and recall do not have a cache)
  • estimatedBillDollars is 0 until you exceed the 200 trial units
  • Usage resets at the start of each billing period