Get chat analytics for dashboard
Get chat analytics for dashboard
GET
/
v3
/
analytics
/
chat
Copy
Ask AI
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.supermemory.ai/v3/analytics/chat', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
Copy
Ask AI
{
"overview": {
"7d": {
"totalTokensSaved": {
"current": 123,
"previousPeriod": 123
},
"tokensProcessed": {
"current": 123,
"previousPeriod": 123
},
"tokensSent": {
"current": 123,
"previousPeriod": 123
},
"amountSaved": {
"current": 123,
"previousPeriod": 123
}
},
"30d": {
"totalTokensSaved": {
"current": 123,
"previousPeriod": 123
},
"tokensProcessed": {
"current": 123,
"previousPeriod": 123
},
"tokensSent": {
"current": 123,
"previousPeriod": 123
},
"amountSaved": {
"current": 123,
"previousPeriod": 123
}
},
"90d": {
"totalTokensSaved": {
"current": 123,
"previousPeriod": 123
},
"tokensProcessed": {
"current": 123,
"previousPeriod": 123
},
"tokensSent": {
"current": 123,
"previousPeriod": 123
},
"amountSaved": {
"current": 123,
"previousPeriod": 123
}
},
"lifetime": {
"totalTokensSaved": {
"current": 123,
"previousPeriod": 123
},
"tokensProcessed": {
"current": 123,
"previousPeriod": 123
},
"tokensSent": {
"current": 123,
"previousPeriod": 123
},
"amountSaved": {
"current": 123,
"previousPeriod": 123
}
}
},
"analytics": {
"usage": {
"currentDay": "Sun",
"tokensByDay": {
"Sun": 123,
"Mon": 123,
"Tue": 123,
"Wed": 123,
"Thu": 123,
"Fri": 123,
"Sat": 123
}
},
"latency": {
"current": 123,
"unit": "<string>",
"trend": [
123
]
},
"apiUsage": {
"current": 123,
"limit": 123
}
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Response
200
application/json
Chat analytics data
The response is of type object
.
Was this page helpful?
Copy
Ask AI
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.supermemory.ai/v3/analytics/chat', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
Copy
Ask AI
{
"overview": {
"7d": {
"totalTokensSaved": {
"current": 123,
"previousPeriod": 123
},
"tokensProcessed": {
"current": 123,
"previousPeriod": 123
},
"tokensSent": {
"current": 123,
"previousPeriod": 123
},
"amountSaved": {
"current": 123,
"previousPeriod": 123
}
},
"30d": {
"totalTokensSaved": {
"current": 123,
"previousPeriod": 123
},
"tokensProcessed": {
"current": 123,
"previousPeriod": 123
},
"tokensSent": {
"current": 123,
"previousPeriod": 123
},
"amountSaved": {
"current": 123,
"previousPeriod": 123
}
},
"90d": {
"totalTokensSaved": {
"current": 123,
"previousPeriod": 123
},
"tokensProcessed": {
"current": 123,
"previousPeriod": 123
},
"tokensSent": {
"current": 123,
"previousPeriod": 123
},
"amountSaved": {
"current": 123,
"previousPeriod": 123
}
},
"lifetime": {
"totalTokensSaved": {
"current": 123,
"previousPeriod": 123
},
"tokensProcessed": {
"current": 123,
"previousPeriod": 123
},
"tokensSent": {
"current": 123,
"previousPeriod": 123
},
"amountSaved": {
"current": 123,
"previousPeriod": 123
}
}
},
"analytics": {
"usage": {
"currentDay": "Sun",
"tokensByDay": {
"Sun": 123,
"Mon": 123,
"Tue": 123,
"Wed": 123,
"Thu": 123,
"Fri": 123,
"Sat": 123
}
},
"latency": {
"current": 123,
"unit": "<string>",
"trend": [
123
]
},
"apiUsage": {
"current": 123,
"limit": 123
}
}
}
Assistant
Responses are generated using AI and may contain mistakes.