N2API brings multiple API-key upstreams behind one OpenAI-compatible endpoint, with a compact admin UI for accounts, routing, client keys, and request logs. It is inspired by sub2api's workflow and independently implemented for personal self-hosting.
- OpenAI-compatible
/v1/models,/v1/responses, and/v1/chat/completions, with streaming support. - Routing pools, model policies, explicit fallback chains, and sticky sessions.
- Account health checks, rate and concurrency limits, client-key budgets, and request logs.
- PostgreSQL-backed configuration and encrypted credentials.
- Go backend with a SvelteKit + Tailwind CSS admin UI; Docker Compose deployment on
linux/amd64andlinux/arm64.
Follow Getting started for local startup, account setup, and your first client connection. For a VPS, use the production operations guide.
- Wiki — setup, deployment, routing, clients, and troubleshooting.
- Complete manual — configuration and gateway behavior.
- Development guide — local sessions, tests, and cleanup.
- Documentation sources · Operator runbook source · UI design.
N2API supports API-key upstreams only; OAuth upstreams and fingerprint simulation are retired. It targets personal use, without public registration, payments, recharge balances, or platform billing. PostgreSQL is required; Redis and SQLite are not used.