API key injection for self-hosted docs

Self-hosted deployments support API key injection via environment variables. Enable FERN_API_KEY_INJECTION_ENABLED to show a Login button in the API Explorer without requiring login for the entire site. Use FERN_AUTH_ALLOWLIST and FERN_AUTH_DENYLIST to control page-level access.

Learn more about self-hosted authentication.

Multiple API keys and per-environment keys

API key injection supports multiple API keys and per-environment credentials. Provide multiple keys as a JSON-encoded array in bearer_token, and use env_state to set different credentials per environment with substring matching.