Skip to content
KnowSky404 edited this page Nov 9, 2026 · 2 revisions

N2API Wiki

N Sources, One API. N2API is a personal, self-hosted AI API gateway that brings API-key upstreams behind an OpenAI-compatible endpoint.

Manage accounts, model availability, routing pools, fallback chains, client keys, limits, and request logs from a compact web dashboard. The Go backend serves a static SvelteKit + Tailwind CSS UI and stores configuration and encrypted credentials in PostgreSQL. Docker Compose is the primary deployment path, supporting linux/amd64 and linux/arm64.

Start Here

Goal Guide
Start locally and connect a client Getting started
Deploy or upgrade a VPS instance Production operations
Configure networking, secrets, metrics, or alerts Complete manual
Configure accounts, pools, and client keys Provider accounts and routing
Connect Codex CLI Downstream Codex CLI
Diagnose gateway errors and limits Gateway runtime limits
Develop, test, or clean up a local session Development lifecycle
Prepare a release Release checklist
Record a real-backup restore drill Restore drill record
Review intended repository checks Repository protections

Scope And Compatibility

N2API is independently implemented and inspired by sub2api's workflow. It targets personal self-hosting, without public registration, payments, recharge balances, or platform billing. PostgreSQL is required; Redis and SQLite are not used.

Upstream accounts use API keys. OAuth authorization, token refresh, and fingerprint simulation are retired. Existing OAuth rows remain archived for backup compatibility and cannot serve requests; replace their routing-pool memberships with API-key accounts. Downstream Codex clients still connect through a client API key. See the upgrade scope.

Documentation Version

This Wiki describes the current main branch. A published image may predate these changes; match its release notes and source revision before upgrading.

Repository · Releases · Documentation sources

Clone this wiki locally