Lucius API
Usage

Get usage summary

Returns aggregated usage counts, volumes, submitted fees, and rated totals grouped by day, contract, or both. Use this after daily syncs or backfills to verify ingested event counts and catch dropped days automatically.

GET
/v1/billing/usage/summary

Authorization

AuthorizationBearer <token>

API key as Bearer token: Authorization: Bearer luc_live_.... Create keys in the dashboard under Settings > API Keys.

In: header

Query Parameters

from?string

Inclusive start date (YYYY-MM-DD), matched against event date (occurred_at, falling back to service_period_start).

to?string

Inclusive end date (YYYY-MM-DD).

group_by?string

Grouping dimension for buckets. Defaults to day.

contract?string

Filter by contract external ID.

metric?string

Filter by metric name.

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/billing/usage/summary?from=2026-10-01&to=2026-10-31&contract=acme-corp-2026&metric=usd_transaction_volume_processed"
{  "object": "usage_summary",  "group_by": "day",  "from": "2026-10-01",  "to": "2026-10-31",  "totals": {    "event_count": 35,    "total_quantity": 83754740.18,    "total_fee_amount": 4652.7369,    "total_rated_amount": 4652.7369  },  "buckets": [    {      "date": "2026-10-09",      "event_count": 27,      "total_quantity": 74189523.3,      "total_fee_amount": 4270.7591,      "total_rated_amount": 4270.7591    },    {      "date": "2026-10-29",      "event_count": 8,      "total_quantity": 9565216.88,      "total_fee_amount": 381.9778,      "total_rated_amount": 381.9778    }  ]}

{  "error": "Missing API key"}