mrkeyoor.com_
Mon 07 Sept 03:05 UTC
Self-Hostedevaluationupdated 07 Sept 2026

codex2api review

Codex2API turns a pool of Codex accounts into a self-hosted API gateway that speaks OpenAI- and Anthropic-compatible protocols. It gives operators one endpoint, a scheduler, usage controls, and a web dashboard instead of forcing every client to manage accounts, limits, and recovery itself.

trackingstars / 7d
Verdict

Our build completed in 34 seconds, but 3 of 33 test targets failed, so Codex2API is promising rather than ready for blind production adoption. Its account scheduler, compatibility surface, and two deployment shapes make it unusually practical for a specific operator: someone already committed to running a Codex account pool. Trial it in an isolated environment, verify the license and failing tests, and only then entrust it with real tokens.

We ran it

Install✓ · 43s115 packages
Build✓ · 34s
Tests✗ · 359s30 passed · 3 failed of 33 (go test)
Repo1167 files~457,144 lines of source · 24.8 MB · 5 CI workflows · Dockerfile

Answers from our run

Does codex2api build from source?

Dependencies installed in 43 seconds (115 packages), and the build succeeded in 34 seconds. We cloned commit 15ecfba into a clean Debian container with 3 CPUs and no project-specific setup.

Do codex2api's tests pass?

Not all of them: 30 of 33 passed and 3 failed when we ran the project's own test command (go test). Some failures need services or credentials a bare container does not have.

Who should not use codex2api?

Beginners expecting a zero-configuration proxy, because account and secret handling remain operational work

What are the alternatives to codex2api?

LiteLLM, Portkey AI Gateway, One API. Our build completed in 34 seconds, but 3 of 33 test targets failed, so Codex2API is promising rather than ready for blind production adoption.

Setup3/5Install and build passed, but 3 of 33 test targets failed
Docs4/5Clear deployment choices, API scope, screenshots, and warnings
Community4/52,031 stars, 29 open issues, and activity through yesterday
Maturity3/5Broad operations surface, offset by failed tests and unknown license

Who it’s for

Teams already operating multiple Codex accounts and needing one controlled endpoint
Self-hosters who want OpenAI and Anthropic client compatibility in one service
Operators prepared to monitor tokens, quotas, proxies, and account health
Small deployments that value a SQLite mode before moving to PostgreSQL and Redis

Who it’s NOT for

Beginners expecting a zero-configuration proxy, because account and secret handling remain operational work
Organizations that cannot accept an unverified license status
Buyers requiring a clean test run before evaluation, because our sandbox run had 3 failing test targets
Anyone wanting a neutral multi-provider gateway without Codex account-pool management

Setup reality

Our run installed 115 packages in 43 seconds and built successfully in 34 seconds, but the tests failed after 359 seconds: 30 passed and 3 failed out of 33. That is more friction than the README's Docker-ready presentation suggests. The project offers several sensible deployment paths, including SQLite with in-memory cache and PostgreSQL with Redis, but a successful build is not the same as a verified deployment, and the supplied log excerpt ends at FAIL without exposing enough detail to diagnose the three failures.

It is an account operations layer, not merely a proxy

Codex2API is designed for a narrow but real infrastructure problem: several Codex accounts must look like one dependable API service. Instead of making each client understand refresh tokens, account condition, concurrency, cooldowns, and quota, the gateway centralizes those concerns. It exposes OpenAI-style Chat Completions, Responses, Images, Models, and prefixless routes, plus Anthropic Messages and native Codex Responses forwarding. That breadth means Codex CLI, Claude Code, and compatible SDK clients can share a base URL while operators work from one administrative surface.

The README describes 2 scheduling modes, round_robin and remaining_quota, backed by health tiers, scores, dynamic concurrency, cooldown recovery, and recent usage. This is the project's clearest advantage over a thin relay. Per-account cost windows, credit flags, API-key usage tracking, prompt filtering, proxy pools, and request trends turn routing into an operations job with visible controls. The React 19 and Vite 8 dashboard also covers account import and testing, image workflows, scheduler state, settings, and usage, so routine administration does not depend entirely on direct database edits or command-line scripts.

What happened when we ran it

Our run used a fresh unprivileged Debian container with 3 CPUs, 8 GB of RAM, no secrets, and a golang:1.24-bookworm image. The repository at commit 15ecfba contained 1,167 files, about 457,144 lines of source, and occupied 24.8 MB checked out. Installation succeeded in 43 seconds with 115 packages installed, and the build succeeded in another 34 seconds. Those are useful outcomes: the source resolved its dependencies and compiled on our box under the stated constraints. They are not throughput benchmarks, and they do not prove the dashboard or authenticated upstream flows work.

Testing was the weak point. The test command ran for 359 seconds and exited with failure: 30 targets passed and 3 failed out of 33. The supplied tail shows successful packages including database, proxy, proxy/wsrelay, security, and security/promptfilter, then a final FAIL. It does not show which 3 targets failed or why, so blaming missing services, timing, networking, or code defects would be guesswork. The fair conclusion is simpler: our build was reproducible, but our test result was not clean and needs investigation before production use.

The deployment choices match different risk levels

The project offers 2 credible shapes. A lightweight single-node deployment combines SQLite with an in-memory cache, while the production-oriented stack uses PostgreSQL and Redis. There are prebuilt-image Compose files, local-source Compose variants for both storage modes, and a local development path using go run . with npm run dev. SQLite binding to 127.0.0.1 by default is a thoughtful security choice. The repository also contains a Dockerfile, a Compose file, and 5 CI workflow files, although the measured inventory found no top-level tests directory.

That convenience should not obscure the security model. This service handles refresh tokens, access tokens, API keys, OAuth PKCE flows, proxy configuration, prompt filters, and detailed request usage. A compromise would therefore expose more than a normal stateless reverse proxy. The public demo uses the password codex2api, and the README correctly warns visitors not to upload real secrets. For an actual deployment, put the service behind strong access controls, isolate its databases, restrict the dashboard, rotate credentials, and inspect logging behavior before sending sensitive prompts or tokens through it.

Its strongest features also increase operational complexity

The scheduler is valuable because accounts do not fail uniformly: one can be cooling down while another has remaining quota or a healthier score. Codex2API claims to route around those conditions automatically and supports per-account 5-hour and 7-day USD cost windows. The built-in usage dashboard, scheduler board, request logs, and trend charts could spare a small team from building its own control plane. Image-to-image, text-to-image, and Grok Imagine video endpoints further widen the clients that can sit behind the same gateway.

The rough edge is scope. With 1,167 files and roughly 457,144 source lines, this is not a tiny proxy that an operator can understand in an afternoon. Each compatibility endpoint and dashboard workflow expands the testing surface, while account import, billing flags, proxies, and filtering create configuration that must be backed up and audited. The supplied repository metadata also lists the license as unknown. Until the actual license terms are verified, businesses should treat redistribution, modification, and internal deployment rights as unresolved rather than assuming that public source automatically grants them.

Activity is fresh, but one release cannot prove cadence

Project health looks active today. The repository has 2,031 stars and 29 open issues, its last push was September 6, 2026 at 20:10 UTC, and version v2.9.3 followed about 6 minutes later. That pairing is stronger evidence of current maintenance than an old tag viewed alone. Still, one release timestamp cannot establish a steady cadence, and the provided community excerpt is only a GitHub Trending mention with 5 additional stars, not evidence that maintainers answer issues quickly or that many production operators depend on it.

It belongs behind your private boundary

In a real stack, Codex2API fits between trusted internal clients and upstream model services. Put TLS, identity controls, network restrictions, and perhaps an existing edge gateway in front of it; keep PostgreSQL and Redis private behind it. Start with the SQLite mode for a limited evaluation, reproduce the 33 test targets, exercise account cooldown and failover behavior with non-sensitive credentials, and inspect logs for prompt or token exposure. Move to the larger stack only when multiple replicas, durable state, or shared cache behavior justify the extra services.

The decision is therefore specific. If you already run a Codex account pool and need compatible endpoints plus scheduling, Codex2API packages an unusually relevant set of controls into one service. If you mainly need provider-neutral routing, a broader gateway such as LiteLLM or Portkey may be easier to place. Version v2.9.3 deserves a serious lab trial, but the 3 failed test targets and unverified license are release gates, not footnotes.

Alternatives

ProjectWhat it isPick it when
LiteLLM gh↗A broad OpenAI-compatible proxy and SDK for routing across many model providers.pick this instead when provider breadth and established gateway integrations matter more than Codex account-pool operations.
Portkey AI GatewayAn open-source AI gateway focused on routing, fallbacks, observability, and policy controls.pick this instead when you need a general gateway layer rather than refresh-token account scheduling.
One APIA self-hosted interface for aggregating and distributing access to multiple AI APIs.pick this instead when channel aggregation and key distribution are the main job, not Codex-specific health scoring.

What people are saying

  1. [github-trending] james-6-23/codex2api

Sources

  1. Codex2API GitHub repository
  2. Codex2API live demo

More self-hosted reviews

hydra · codex-lb · qBittorrent · livekit · harbor · go2rtc · the whole board →