ApiGateway
Features How It Works FAQ GitHub
Open Source · Free to use

Your API Gateway Lightweight & Fast

輕量的 OpenAI 格式 API 閘道,支援多 key 輪詢、故障轉移、多供應商路由、可自由配置路由對應、金鑰管理與簡易的儀表板。Node.js 原生執行,無需第三方套件或資料庫。

A lightweight OpenAI-compatible API gateway featuring multi-key polling, failover, multi-provider routing, custom route mapping, key management, and a simple dashboard. Runs on bare Node.js with zero dependencies.

Download GitHub
ApiGateway Console Dashboard Screenshot

Easy config and monitoring dashboard

Everything You Need

Zero dependencies. Deploy anywhere in seconds.

Multi-Provider Routing

Route to OpenAI, DeepSeek, Mistral, Groq, or any OpenAI-compatible provider from a single endpoint.

Key Management

A simple JSON-formatted key list for easy configuration and backup.

Easy Dashboard

Metrics: request rate, latency, error codes, provider health. Built-in console served from memory.

Log Analytics

Track request usage and errors.

Provider Health Probes

Continuous health checks with visual status indicators. Automatic provider degradation detection.

Rate Limit

Support per-key RPM and model context size limits.

Fast Setup

Need Node or Bun JS runtime, download repository code, write a config JSON file, run NPM script.

  1. 1
    Download repository for your platform.
  2. 2
    Configure providers, keys, and routes in one JSON file.
  3. 3
    Run the NPM script. That's it. The dashboard is at http://localhost:3000/console.
// config.json
{
  "port": 3000,
  "providers": {
    "openai": {
      "apiKeys": ["sk-...KeyA", "sk-...KeyB"],
      "baseUrl": "https://api.openai.com"
    }
  },
  "models": {
    "gpt-4": "openai"
  }
}

FAQ

Quick answers to common questions.

This project is free and open-source, but whether your API keys incur charges depends on your provider.
OpenAI, DeepSeek, Mistral, and any OpenAI-compatible endpoint. Add custom providers via the config file — no code changes needed.
No. Everything runs in-memory with optional file-based persistence for stats. No PostgreSQL, no Redis, no external dependencies.
Yes. The dashboard runs on a configurable base path (e.g. http://your.host/console). Works with nginx, Caddy, Cloudflare Tunnel, or any reverse proxy.

More details

Star on GitHub, download the repository, or contribute.