Get account activity
curl --request GET \
--url https://api.naga.ac/v1/account/activity \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.naga.ac/v1/account/activity"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.naga.ac/v1/account/activity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.naga.ac/v1/account/activity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.naga.ac/v1/account/activity"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.naga.ac/v1/account/activity")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.naga.ac/v1/account/activity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"api_key_usage": [
{
"api_key_id": 12,
"api_key_name": "Production",
"request_count": 320,
"total_cost": "9.11",
"total_input_tokens": 620441,
"total_output_tokens": 201210
}
],
"daily_stats": [
{
"date": "2026-03-30",
"total_cost": "0.44",
"total_input_tokens": 41122,
"total_output_tokens": 13201,
"total_requests": 21
}
],
"period_days": 30,
"top_models": [
{
"model_name": "gpt-4o-mini",
"request_count": 211,
"total_cost": "4.81",
"total_input_tokens": 315201,
"total_output_tokens": 99004
}
],
"total_stats": {
"total_cost": "13.24",
"total_input_tokens": 914221,
"total_output_tokens": 307554,
"total_requests": 482
}
}{
"error": {
"message": "The request body is invalid.",
"type": "invalid_request_error"
}
}{
"error": {
"message": "The request body is invalid.",
"type": "invalid_request_error"
}
}{
"error": {
"message": "The request body is invalid.",
"type": "invalid_request_error"
}
}{
"error": {
"message": "The request body is invalid.",
"type": "invalid_request_error"
}
}{
"error": {
"message": "The request body is invalid.",
"type": "invalid_request_error"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": {
"message": "The request body is invalid.",
"type": "invalid_request_error"
}
}{
"error": {
"message": "The request body is invalid.",
"type": "invalid_request_error"
}
}{
"error": {
"message": "The request body is invalid.",
"type": "invalid_request_error"
}
}Account
Get account activity
Return request counts, token usage, costs, top models, and per-key usage for a configurable lookback window.
GET
/
v1
/
account
/
activity
Get account activity
curl --request GET \
--url https://api.naga.ac/v1/account/activity \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.naga.ac/v1/account/activity"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.naga.ac/v1/account/activity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.naga.ac/v1/account/activity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.naga.ac/v1/account/activity"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.naga.ac/v1/account/activity")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.naga.ac/v1/account/activity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"api_key_usage": [
{
"api_key_id": 12,
"api_key_name": "Production",
"request_count": 320,
"total_cost": "9.11",
"total_input_tokens": 620441,
"total_output_tokens": 201210
}
],
"daily_stats": [
{
"date": "2026-03-30",
"total_cost": "0.44",
"total_input_tokens": 41122,
"total_output_tokens": 13201,
"total_requests": 21
}
],
"period_days": 30,
"top_models": [
{
"model_name": "gpt-4o-mini",
"request_count": 211,
"total_cost": "4.81",
"total_input_tokens": 315201,
"total_output_tokens": 99004
}
],
"total_stats": {
"total_cost": "13.24",
"total_input_tokens": 914221,
"total_output_tokens": 307554,
"total_requests": 482
}
}{
"error": {
"message": "The request body is invalid.",
"type": "invalid_request_error"
}
}{
"error": {
"message": "The request body is invalid.",
"type": "invalid_request_error"
}
}{
"error": {
"message": "The request body is invalid.",
"type": "invalid_request_error"
}
}{
"error": {
"message": "The request body is invalid.",
"type": "invalid_request_error"
}
}{
"error": {
"message": "The request body is invalid.",
"type": "invalid_request_error"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": {
"message": "The request body is invalid.",
"type": "invalid_request_error"
}
}{
"error": {
"message": "The request body is invalid.",
"type": "invalid_request_error"
}
}{
"error": {
"message": "The request body is invalid.",
"type": "invalid_request_error"
}
}Authorizations
Provisioning key required for account management endpoints under /v1/account.
Query Parameters
Number of days to look back (1-30)
Required range:
1 <= x <= 30Response
Successful Response
Complete activity response
Lookback window used to aggregate the activity response.
Example:
30
Total aggregated statistics model
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I