Self-host a relay so multiple tools share one set of Codex OAuth credentials
Route requests across channels automatically without the client choosing a key
Inspect per-channel usage and audit logs from a Next.js admin UI
Run the whole stack from a Docker Compose file with persistent SQLite volumes
Needs Node.js 24 for the experimental node:sqlite module or a Docker Compose deploy, and the web admin key is shown in logs only once on first launch.
RelayAPI is a self hosted relay service for managing OpenAI compatible and Codex API traffic in one place. The README is written in Chinese and describes the project as a one stop manager for Codex OAuth credentials. It sits between client tools that speak the OpenAI API format and the upstream Codex service, so requests pass through RelayAPI rather than going directly to the provider. The service is built on Next.js using the App Router, and it tracks several things at once: API keys, Codex OAuth credentials, channel routing rules, request logs, and per channel usage data. The README lists automatic channel routing as a feature, meaning the front end does not have to pick which credential to use for each call. Quota refresh for Codex credentials is also handled inside the service. Data is kept in two local SQLite database files, one for configuration and runtime state and one for logs, audit records, and usage counters. The project uses the built in node:sqlite module that ships with Node.js 24, so there is no need to compile a native SQLite binding. The README notes that node:sqlite is still marked experimental in Node, so an experimental warning at startup is expected. The minimum runtime is Node.js 24, and pnpm is listed as the package manager. Image generation requests are explicitly called out as not yet supported. The quick start section shows a Docker Compose file that pulls the sipcink/relay-api:latest image, exposes port 3000, and mounts a named volume at /app/data so the SQLite databases survive container restarts. On first launch RelayAPI prints a generated web access key in the container logs, prefixed with relay_web_. This key is required to open the web admin pages, and once entered the server sets an HTTP only session cookie. The plain key is shown only once. A hashed copy is stored at data/.relay-web-access-key, and if the file is deleted and the service restarted a new key is issued. A fixed key can be supplied through the RELAY_WEB_ACCESS_KEY or WEB_ACCESS_KEY environment variable, in which case the file is not auto created.
Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.