Keys and authentication

Create keys in Settings, send them as a bearer token, keep them secret.

Owners and admins of a studio create keys in Settings → API. A key looks like luce_sk_live_AbC1… (live) or luce_sk_test_AbC1… (test). We show the full key once, when you create it, and store only a hash, so copy it then.

Authorization: Bearer luce_sk_live_AbC1dEf2GhI3.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Keep keys secret

  • Call the API from your server, never from a browser or a mobile app, where the key can be read.
  • Keep keys in an environment variable or a secrets manager, not in your code.
  • Use one key per app or environment, so you can revoke one without stopping the others.
  • If a key leaks, revoke it in Settings → API. Calls with it stop working within a minute.

Permissions

A key carries scopes: generate (start and cancel jobs), read (jobs, modes, prices, balance, quotes), files (uploads) and webhooks. New keys get all four. A call outside a key's scopes fails with scope_missing.

Who can use the API

The API is switched on per studio while we roll it out. A call to a studio without it fails with api_not_enabled. A suspended account fails with team_suspended.