Panicly’s gateway is not a thin proxy. It is an auth layer, quota layer, rules layer, control layer, logging layer, and provider-forwarding layer.
The client sends a request to /v1/chat/completions, /v1/responses, /v1/embeddings, /v1/completions, /v1/models, or a provider namespace such as /v1/openrouter/*.
The gateway accepts a key through Authorization or x-panicly-key, then verifies it against stored key prefix and SHA-256 hash.
The gateway checks workspace plan tier, included monthly volume, credit-backed capacity, and any configured usage offset.
Network Controls, Region Rules, model rules, Sentry Mode, burst protection, abuse detection, token guard, and loop guard can block before upstream spend.
Use Bearer pk_live_... or Bearer pk_test_....
Alternative direct key header for applications that cannot easily set a bearer token.
Provider model identifier, such as openrouter/auto or a connected provider-specific model.
The repository currently has gateway logic in both apps/api/src/routes/gateway.ts and apps/web/src/app/v1/[...path]/route.ts. Treat behavior as duplicated until the active deployment path is verified.