Lucius API

Metric catalog

Company event names for usage billing. Apply appends missing metrics — it does not rename live slugs.

The metric catalog is the company list of usage event names. Parser, contract create, and POST /v1/billing/usage all use these slugs.

Usage still validates per contract. A catalog row is not billable until that contract’s pricing program has a usage rule with the same metric. After apply, GET /v1/billing/contracts → metrics[] includes the catalog ids.

Dashboard: Settings → Metrics. On contract upload review, usage lines pick from this list.

List the catalog

curl https://api.lucius.finance/v1/billing/metric-catalog \
  -H "Authorization: Bearer luc_live_YOUR_KEY"
{
  "object": "list",
  "data": [
    { "metric": "WIRE_DOMESTIC_INCOMING_POSTED", "label": "Incoming domestic wire" },
    { "metric": "VIRTUAL_ACCOUNT_CREATED", "label": "Virtual account creation" }
  ]
}

Replace the catalog

curl -X PUT https://api.lucius.finance/v1/billing/metric-catalog \
  -H "Authorization: Bearer luc_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "metrics": [
      { "metric": "WIRE_DOMESTIC_INCOMING_POSTED", "label": "Incoming domestic wire" },
      { "metric": "VIRTUAL_ACCOUNT_CREATED", "label": "Virtual account creation" }
    ]
  }'

PUT replaces the whole list. Metric ids are immutable after events have been sent against them.

Apply to contracts

curl -X POST https://api.lucius.finance/v1/billing/metric-catalog/apply \
  -H "Authorization: Bearer luc_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Pass external_contract_id to apply one contract.

Apply appends missing catalog metrics as $0 flat usage rules. It does not rename existing slugs. Remapping would reject already-accepted events and rewrite historical invoice lines. Set the unit price on the contract (dashboard review or PUT /v1/billing/contracts/{id}/pricing-rules/{rule_id}).

New contracts

Create and PDF upload merge the catalog automatically. Parsed usage lines snap to a catalog id only on an exact label match. Otherwise pick the metric on review.

Sending events

metric on POST /v1/billing/usage must be an exact catalog id that is also on that contract’s metrics[].

curl -X POST https://api.lucius.finance/v1/billing/usage \
  -H "Authorization: Bearer luc_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "events": [{
      "external_contract_id": "acme-corp-2026",
      "event_id": "wire-in-001",
      "metric": "WIRE_DOMESTIC_INCOMING_POSTED",
      "quantity": 1,
      "fee_amount": 15,
      "timestamp": "2026-10-27T15:00:00Z"
    }]
  }'

fee_amount is the invoice amount when you already computed the fee. Otherwise Lucius uses the contract rule (unit_price × quantity for flat usage).

See Usage events.

On this page