OpenAI/Anthropic-compatible reverse proxy. Forked from tiantianGPU/replit2api2,
extended with additional OpenAI/Codex/Gemini models and a Gemini routing path
that prefers same-host /integrations/google-gemini-* (Anything-platform style)
and falls back to the OpenAI client (Replit / Vertex OpenAI compat) on 404.
- Anthropic (via
AI_INTEGRATIONS_ANTHROPIC_*): claude-opus-4-7, claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5 - OpenAI (via
AI_INTEGRATIONS_OPENAI_*): gpt-5.5, gpt-5.4, gpt-5.2, gpt-5-mini, gpt-5-nano, gpt-5-codex, codex-mini-latest, o4-mini, o3 - Gemini (same-host
/integrations/google-gemini-{ver}first, fallback to OpenAI client): gemini-3.1-pro-preview, gemini-2.5-pro, gemini-2.5-flash
GET /v1/modelsPOST /v1/chat/completions(OpenAI-compatible, supports tool calls + streaming)POST /v1/messages(Anthropic native, byte-preserving transparent proxy)GET /Portal UI
Bearer token via PROXY_API_KEY env, or auto-generated and stored in
.proxy-key at build time (also baked into the Portal as VITE_PROXY_API_KEY).
- Fork / import this repo into a Replit workspace
- Enable Anthropic + OpenAI AI Integrations so Replit injects the
AI_INTEGRATIONS_*env vars - Run — root
package.jsonbuild + start
For Anything-style platforms, the same code works as long as the host serves
/integrations/google-gemini-{ver} paths (Gemini routing) and the
OpenAI/Anthropic integrations inject the same env names.