Self-hosted gateway that exposes many LLM providers (OpenAI, Anthropic, Gemini, Vertex, Azure, AWS and more) behind one OpenAI-compatible API with load balancing.
fruitbars/simple-one-api
A self-hosted gateway that exposes multiple LLM providers behind OpenAI, Responses and Anthropic-compatible endpoints, shipped as a single executable.
Open-source alternative to:OpenRouter
- Stars
- 2,344
- Forks
- 209
- Open issues
- 47
- Last commit
- last month
What is it?
simple-one-api is a gateway that sits between your client tools and several large language model providers. Clients talk to one endpoint using OpenAI Chat Completions, OpenAI Responses or Anthropic Messages protocols, while the gateway routes requests to configured providers such as Qianfan, iFlytek Spark, Tencent Hunyuan, MiniMax and DeepSeek.
Each provider can hold multiple API keys in a pool. The gateway estimates token cost per request, tracks a rolling 60-second capacity window per key and model, and switches to another key when an upstream returns 429, with cooldown and recovery times shown in the admin console. Rate limits can be set at provider, provider-model, key and key-model levels.
The project ships as one binary with an embedded React web chat, a configuration console backed by SQLite, a usage statistics view and a Wails desktop app that runs a local gateway on loopback. It is distributed as GitHub Release archives and a multi-architecture Docker image.
Key features
- 01Exposes OpenAI Chat Completions, Responses and Anthropic Messages endpoints from one gateway.
- 02Pools multiple API keys per provider with round-robin, preferred, random and hash routing.
- 03Estimates per-key token capacity and fails over to another key on upstream 429 responses.
- 04Applies layered QPS, QPM, RPM, TPM and concurrency limits.
- 05Includes an embedded web chat and a configuration console with live key status.
- 06Stores configuration in SQLite and provides usage statistics without saving prompt or response bodies.
Use cases
- Sharing one gateway key across several local clients such as Codex or Claude Code.
- Spreading heavy traffic over multiple upstream keys to reduce 429 errors.
- Running a private, self-hosted entry point to several Chinese LLM providers.
- Giving a small team a single OpenAI-compatible endpoint with usage visibility.
Quick start
- 1
Build the single executable from source
./quick_build.sh - 2
Run the gateway; no config.json is needed for first-time setup
./simple-one-api - 3
Open http://localhost:9090/ in a browser and finish the /setup wizard
Things to know
- Building from source requires Go 1.25+, Node.js and pnpm.
- Pricing, free quotas and model details come from upstream providers and may change, so the README asks you to check their official docs.
In collections
Topics
FAQ
- What is simple-one-api?
- A self-hosted gateway that exposes multiple LLM providers behind OpenAI, Responses and Anthropic-compatible endpoints, shipped as a single executable. simple-one-api is a gateway that sits between your client tools and several large language model providers. Clients talk to one endpoint using OpenAI Chat Completions, OpenAI Responses or Anthropic Messages protocols, while the gateway routes requests to configured providers such as Qianfan, iFlytek Spark, Tencent Hunyuan, MiniMax and DeepSeek.
- Is simple-one-api free to use? What license does it have?
- simple-one-api is open source under the MIT license. Check the license terms before using it in commercial products.
- Is simple-one-api still maintained?
- Updated within 6 months. The last commit to simple-one-api was on Sep 29, 2026.
- What can I use simple-one-api for?
- Sharing one gateway key across several local clients such as Codex or Claude Code. Spreading heavy traffic over multiple upstream keys to reduce 429 errors. Running a private, self-hosted entry point to several Chinese LLM providers. Giving a small team a single OpenAI-compatible endpoint with usage visibility.
- How do I install simple-one-api?
- Build the single executable from source: ./quick_build.sh Run the gateway; no config.json is needed for first-time setup: ./simple-one-api Open http://localhost:9090/ in a browser and finish the /setup wizard
- Where can I get simple-one-api?
- The source code and installation instructions are on GitHub: https://github.com/fruitbars/simple-one-api
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A self-hosted gateway that merges multiple AI relay sites (New API, One API, Sub2API and others) into one API key and endpoint with smart routing.
An open source unified LLM gateway that exposes Anthropic, OpenAI, Gemini and other vendor models behind one endpoint and API key.
Self-hostable MIT AI gateway that exposes one OpenAI-compatible endpoint to hundreds of model providers, with quota-aware auto-fallback and token compression.
A self-hosted LLM API gateway for individuals that aggregates multiple provider channels behind one endpoint with failover and cost tracking.
Open-source AI gateway giving one OpenAI-compatible API across 23+ LLM providers, with failover, load balancing, semantic caching and virtual keys.