curl "https://api.mor.org/api/v1/billing/spending?year=2026&mode=gross" \
-H "Authorization: Bearer sk-your-api-key"
{
"year": 2026,
"mode": "gross",
"months": [
{ "year": 2026, "month": 1, "amount": "-12.45", "transaction_count": 340 },
{ "year": 2026, "month": 2, "amount": "-8.20", "transaction_count": 210 },
{ "year": 2026, "month": 3, "amount": "0.00", "transaction_count": 0 }
],
"total": "-45.67",
"currency": "USD"
}
Billing
Get Monthly Spending
Get monthly spending rollups for a year
GET
/
api
/
v1
/
billing
/
spending
curl "https://api.mor.org/api/v1/billing/spending?year=2026&mode=gross" \
-H "Authorization: Bearer sk-your-api-key"
{
"year": 2026,
"mode": "gross",
"months": [
{ "year": 2026, "month": 1, "amount": "-12.45", "transaction_count": 340 },
{ "year": 2026, "month": 2, "amount": "-8.20", "transaction_count": 210 },
{ "year": 2026, "month": 3, "amount": "0.00", "transaction_count": 0 }
],
"total": "-45.67",
"currency": "USD"
}
Get monthly spending summaries for a calendar year. Use this endpoint to answer how much you used per month without fetching individual usage line items.
Returns all 12 months, including months with zero spending.
Headers
string
required
API key or Cognito JWT:
Bearer sk-xxxxxxQuery Parameters
integer
Year to retrieve spending for. Defaults to the current year.
string
default:"gross"
How spending is calculated:
gross— Count usage charges onlynet— Include refunds in the calculation
Response
integer
Year covered by this response.
string
Spending calculation mode (
gross or net).array
string
Total spending for the year.
string
Currency code (USD).
curl "https://api.mor.org/api/v1/billing/spending?year=2026&mode=gross" \
-H "Authorization: Bearer sk-your-api-key"
{
"year": 2026,
"mode": "gross",
"months": [
{ "year": 2026, "month": 1, "amount": "-12.45", "transaction_count": 340 },
{ "year": 2026, "month": 2, "amount": "-8.20", "transaction_count": 210 },
{ "year": 2026, "month": 3, "amount": "0.00", "transaction_count": 0 }
],
"total": "-45.67",
"currency": "USD"
}
Use Get Monthly Spending for charts and dashboards. Use List Usage when you need per-request detail.

