API reference
What the account has been billed, by day and by feature, and its balance.
/v1/usageusage:readWhat the account was billed between two dates (UTC, both included), in total, per day and per feature, and its balance now. The default is this month so far. Amounts are what the account is charged, in micros (1,000,000 = US$1); the _usd strings are the same amounts rounded to the cent. Only days with usage are listed. At most 366 days per request.
| Name | Type | Description |
|---|---|---|
fromquery | string (date) | First day, YYYY-MM-DD (UTC). Default: the first of this month. |
toquery | string (date) | Last day, YYYY-MM-DD (UTC), included. Default: today. |
| Field | Type | Description |
|---|---|---|
from | string (date) | |
to | string (date) | |
currency | string | |
total_micros | integer | Billed in the window, in micros. |
total_usd | string | The same, in US dollars, rounded to the cent. |
balance_micros | integer | The account's prepaid balance now, in micros. |
balance_usd | string | |
by_day | array of object | |
by_day[].day | string (date) | |
by_day[].micros | integer | |
by_feature | array of object | Largest first. feature is the name Observability shows each line under. |
by_feature[].feature | string | |
by_feature[].micros | integer |
The codes are listed under Errors.
curl "https://api.veragen.ai/v1/usage" \
-H "Authorization: Bearer $VERAGEN_API_KEY"const res = await fetch("https://api.veragen.ai/v1/usage", {
headers: { Authorization: `Bearer ${process.env.VERAGEN_API_KEY}` },
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.veragen.ai/v1/usage",
headers={"Authorization": f"Bearer {os.environ['VERAGEN_API_KEY']}"},
)
data = res.json(){
"from": "2026-10-01",
"to": "2026-10-03",
"currency": "usd",
"total_micros": 2731500,
"total_usd": "2.73",
"balance_micros": 47268500,
"balance_usd": "47.27",
"by_day": [
{
"day": "2026-10-01",
"micros": 912000
},
{
"day": "2026-10-02",
"micros": 1384250
},
{
"day": "2026-10-03",
"micros": 435250
}
],
"by_feature": [
{
"feature": "workflow",
"micros": 1953000
},
{
"feature": "studio_chat",
"micros": 640500
},
{
"feature": "compute",
"micros": 138000
}
]
}