curl https://api.naga.ac/v1/account/activity?days=30 \
-H "Authorization: Bearer $NAGA_PROVISIONING_KEY"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));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))
}{
"period_days": 30,
"total_stats": {
"total_requests": 1284,
"total_cost": "3.7412",
"total_input_tokens": 481233,
"total_output_tokens": 92014
},
"daily_stats": [
{
"date": "2026-08-23",
"total_requests": 58,
"total_cost": "0.1642",
"total_input_tokens": 21044,
"total_output_tokens": 4103
}
],
"top_models": [
{
"model_name": "gpt-4o-mini",
"request_count": 902,
"total_cost": "1.8120",
"total_input_tokens": 301122,
"total_output_tokens": 60553
}
],
"api_key_usage": [
{
"api_key_id": 42,
"api_key_name": "production",
"request_count": 1284,
"total_cost": "3.7412",
"total_input_tokens": 481233,
"total_output_tokens": 92014
}
]
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"message": "Invalid provisioning key."
}
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}Get account activity
Returns the account’s usage over a recent window, aggregated four ways. Requires a provisioning key.
curl https://api.naga.ac/v1/account/activity?days=30 \
-H "Authorization: Bearer $NAGA_PROVISIONING_KEY"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));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))
}{
"period_days": 30,
"total_stats": {
"total_requests": 1284,
"total_cost": "3.7412",
"total_input_tokens": 481233,
"total_output_tokens": 92014
},
"daily_stats": [
{
"date": "2026-08-23",
"total_requests": 58,
"total_cost": "0.1642",
"total_input_tokens": 21044,
"total_output_tokens": 4103
}
],
"top_models": [
{
"model_name": "gpt-4o-mini",
"request_count": 902,
"total_cost": "1.8120",
"total_input_tokens": 301122,
"total_output_tokens": 60553
}
],
"api_key_usage": [
{
"api_key_id": 42,
"api_key_name": "production",
"request_count": 1284,
"total_cost": "3.7412",
"total_input_tokens": 481233,
"total_output_tokens": 92014
}
]
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"message": "Invalid provisioning key."
}
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}Authorizations
An account provisioning key. Send it as Authorization: Bearer <key>. Provisioning keys manage the account and cannot reach a model.
Query Parameters
How many days back the report reaches, from 1 to 30; anything else draws a 400.
x >= 0Response
The usage report for the requested window: the per-day rows, the totals, and the breakdowns by model and by API key.
What the account used, cut four ways. The answer is cached for five minutes.
The window these numbers cover, in days back plus today.
x >= 0The whole window in one row.
Hide child attributes
Hide child attributes
How many requests the account made in the window, failed ones included.
What the window cost in credits, as a decimal string.
Input tokens summed over the window.
Output tokens summed over the window.
One row per day that saw traffic, newest first.
Hide child attributes
Hide child attributes
The day these totals are for, as YYYY-MM-DD.
How many requests the account made that day, failed ones included.
What those requests cost in credits, as a decimal string.
Input tokens summed over those requests.
Output tokens summed over those requests.
The ten most-used models of the window, by request count.
Hide child attributes
Hide child attributes
The model these requests named, or Unknown when the log had none.
How many requests named this model, failed ones included.
What they cost in credits, as a decimal string.
Input tokens summed over those requests.
Output tokens summed over those requests.
One row per key that saw traffic, most-used first, uncapped.
Hide child attributes
Hide child attributes
Which key made these requests, by the id /v1/account/keys reports.
The name that key carried over the counted window.
How many requests this key made, failed ones included.
What they cost in credits, as a decimal string.
Input tokens summed over those requests.
Output tokens summed over those requests.