Lucius API

Authentication

How to authenticate requests to the Lucius Billing API.

All Billing API endpoints require authentication via an API key. Keys are scoped to your company account.

Creating an API key

  1. Log in to the Lucius dashboard
  2. Go to Settings > API Keys
  3. Click Create Key and give it a name
  4. Copy the full key — it's only shown once

Keys follow the format luc_live_ followed by 32 hex characters:

luc_live_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4

Sending the key

Include your API key in every request using one of two methods:

curl https://api.lucius.finance/v1/billing/contracts \
  -H "Authorization: Bearer luc_live_YOUR_KEY"

X-Api-Key header

curl https://api.lucius.finance/v1/billing/contracts \
  -H "X-Api-Key: luc_live_YOUR_KEY"

Both methods are equivalent. Use whichever fits your HTTP client.

Key security

  • Store keys securely — use environment variables, not source code
  • Rotate regularly — create a new key, migrate your integration, then revoke the old one
  • One key per environment — use separate keys for development and production
  • Keys are stored as SHA-256 hashes — Lucius cannot retrieve a key after creation

Error responses

StatusErrorMeaning
401Missing API keyNo Authorization or X-Api-Key header found
401Invalid API keyKey doesn't match any active key
401API key expiredKey has passed its expiration date
{
  "error": "Invalid API key"
}

Revoking a key

Revoke a key from the dashboard under Settings > API Keys. Revoked keys are rejected immediately. Existing in-flight requests may still complete.

On this page