Skip to main content
The gateway supports three auth schemes. Which one to use depends on where the request originates.

Schemes at a glance


Bearer (OIDC)

OIDC authentication is in Alpha. Full self-serve configuration is coming soon. Contact us if you need OIDC support today.
Pass the user’s JWT from your OIDC provider directly.

GatelitSigned

Your backend issues a short-lived HMAC-signed token. The token encodes the subject and optional constraints (model, org, max tokens). The gateway verifies the signature without a DB call.
Generate tokens with the SDK:
When to use: Frontend apps where you need per-user model restrictions with short-lived tokens. The short TTL means leaked tokens expire quickly.
GATELIT_SIGNING_SECRET must match the same value in both your backend and the gateway’s environment.

GatelitKey

A long-lived service key created in the dashboard.
Create keys in Settings → Service Keys. Each key can optionally be scoped to a specific org. When to use: Backend-to-backend, scripts, CI pipelines, or any server-side code where managing token expiry is inconvenient.
Never use a service key in browser/frontend code. It cannot be expired quickly and has no per-request TTL.

Org-scoped provider keys

When your token includes an orgId (either via the JWT claims or a GatelitSigned token), the gateway uses that org’s provider keys configured in the dashboard. This lets each org bring their own provider keys (BYOK) while falling back to your gateway’s default keys.