GET
/
api
/
v1
/
project
/
usage
# To use the Python SDK, install the package:
# pip install memobase

from memobase import Memobase

memobase = Memobase(project_url='PROJECT_URL', api_key='PROJECT_TOKEN')

usage = memobase.get_daily_usage(days=7)
{
  "data": [
    {
      "date": "<string>",
      "total_insert": 0,
      "total_success_insert": 0,
      "total_input_token": 0,
      "total_output_token": 0
    }
  ],
  "errno": 0,
  "errmsg": ""
}

Get the daily usage statistics of a project over the last N days.

This endpoint provides detailed usage metrics including:

  • Total blob insertions per day
  • Successful blob insertions per day
  • Input tokens consumed per day
  • Output tokens consumed per day

The data is returned as a time series for the specified number of days, allowing you to track usage patterns and project activity over time.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

last_days
integer
default:7

The number of days to get

Response

200
application/json

Successful Response

The response is of type object.