One API

Original self-hosted LLM API gateway that puts many model providers behind one OpenAI-style key, with quotas and token management.

Stale (no commit in 180+ days) LLM gateway & observability MIT (with attribution requirement)

Quick answer

One API is an original self-hosted LLM API gateway that puts many model providers behind one OpenAI-style key, with quotas and token management, listed under LLM gateway & observability. A typical small-business use: give each employee or tool its own API key with a spending quota while the company holds the provider keys. The project publishes no official RAM figure, so we do not estimate a monthly server cost. License: MIT (with attribution requirement), which allows internal business use. Activity is low: the last commit was on Feb 21, 2025.

Last updated · facts verified against official docs on · sources

Low recent activity. The last commit on the default branch was 616 days ago (Feb 21, 2025). Check the gotchas below before deploying.
GitHub stars37.3k
Forks6.9k
Latest releasev0.6.10Feb 2, 2025
Last commitFeb 21, 2025
Est. server cost—

Activity data comes from GitHub and was last refreshed Oct 31, 2026.

What is One API?

One API is a single Go binary (or Docker container) that lets you register API keys from many model providers, including OpenAI, Azure OpenAI, Anthropic Claude, Google Gemini, Chinese providers such as Baidu, Alibaba, Zhipu and DeepSeek, and local Ollama, then hand out its own tokens through one OpenAI-style API. A web console manages channels with load balancing and retries, tokens with quotas, expiry, IP and model limits, user and channel groups with different price ratios, redeem codes and usage details. It runs on SQLite by default or MySQL for larger deployments. New API, also listed here, is a more actively developed fork.

Where it fits in a 10–200 person business

  • Give each employee or tool its own API key with a spending quota while the company holds the provider keys
  • Route requests across several providers or keys with load balancing and automatic retries
  • Keep one internal endpoint stable while switching the upstream model provider

These use cases are our editorial suggestions, not claims made by the project.

Can a business use One API? (license)

LicenseMIT (with attribution requirement)
TypeCustom / conditional: Apache- or BSD-based with extra conditions (branding, multi-tenant SaaS, derivatives).
Internal business useAllowed under the license text
What to watchMIT, but the README adds that the attribution and link to the project at the bottom of the page must be kept unless you get the author's permission. Internal and commercial use allowed.

This is a plain-English summary of the license text, not legal advice. Third-party models you run with it have their own licenses.

Data & compliance: does One API phone home?

Telemetry (usage data sent to the vendor) Not documented
Other calls home by default (updates, marketplaces, default cloud services) Not documented
Single sign-on (OIDC / SAML / LDAP) Free with limits

Email sign-up, GitHub OAuth, Feishu (Lark) OAuth and WeChat Official Account login are built in; OIDC, SAML and LDAP are not documented.

Source: github.com/songquanpeng/one-api#功能

Audit log Not documented
Role-based access control (RBAC) Not documented
Data residency / GDPR notes from the project Not documented

Checked against the project's own docs and repository on . "Not documented" means we could not find the answer in official sources; it does not mean the feature is missing or that no data is sent. Third-party services you connect (model APIs, vector databases, search engines) have their own data policies. Compare all apps.

What hardware does One API need?

The project does not publish a minimum CPU/RAM figure, so we leave the official value blank rather than guess.

GPU: No. It forwards requests to model APIs you configure.

No official CPU, RAM or disk figure is published. SQLite is used by default; MySQL (via SQL_DSN) is required for high concurrency or multiple nodes.

Source: github.com/songquanpeng/one-api#基于-docker-进行部署

How much does it cost to host One API per month?

The project publishes no RAM figure we could verify, so we do not estimate a cost.

How to deploy One API

Method: Docker (single container, SQLite)

docker run --name one-api -d --restart always \
  -p 3000:3000 \
  -e TZ=Asia/Shanghai \
  -v /home/ubuntu/data/one-api:/data \
  justsong/one-api
# Open http://localhost:3000 and log in as root / 123456, then change the password

From the official instructions: github.com/songquanpeng/one-api#基于-docker-进行部署. Always check the source for the current version before you run it.

Known gotchas when self-hosting One API

  • The initial account is root with password 123456. Change it immediately after first login. source
  • With high concurrency you must set SQL_DSN to use MySQL instead of the default SQLite. source
  • Multi-node deployments need the same SESSION_SECRET on every server and must all use one shared MySQL database. source
  • The README warns that offering unregistered generative AI services to the public in mainland China is not allowed; use it as an internal gateway unless you have the required filings. source
  • The last release, v0.6.10, came out in February 2025. New API is the more actively maintained fork if you need newer providers. source

Alternatives in LLM gateway & observability

  • LiteLLM AI gateway that puts 100+ LLM providers behind one OpenAI-compatible API with keys and budgets.
  • New API Self-hosted AI API gateway (One API fork) that puts many model providers behind one key, with quotas, usage logs and cost tracking.
  • Langfuse LLM observability with tracing, prompt management, evaluations and cost tracking.
  • Opik Open-source LLM observability and evaluation platform for tracing, evals, prompt management and monitoring.
  • Phoenix Free self-hosted LLM tracing, evaluation, datasets and prompt management from Arize.

One API FAQ

How much RAM does One API need?

One API does not publish an official RAM figure, so we do not state one. SQLite is used by default; MySQL (via SQL_DSN) is required for high concurrency or multiple nodes.

Does One API need a GPU?

No. It forwards requests to model APIs you configure.

How much does it cost to self-host One API?

The software is free to download. The project publishes no official RAM figure, so we do not estimate a monthly server cost.

Is One API free for commercial use?

One API is licensed under MIT (with attribution requirement) (Custom / conditional). Internal business use is allowed under the license text. MIT, but the README adds that the attribution and link to the project at the bottom of the page must be kept unless you get the author's permission. Internal and commercial use allowed. This is a summary, not legal advice.

What are common problems when self-hosting One API?

The initial account is root with password 123456. Change it immediately after first login. With high concurrency you must set SQL_DSN to use MySQL instead of the default SQLite. Multi-node deployments need the same SESSION_SECRET on every server and must all use one shared MySQL database. The README warns that offering unregistered generative AI services to the public in mainland China is not allowed; use it as an internal gateway unless you have the required filings. The last release, v0.6.10, came out in February 2025. New API is the more actively maintained fork if you need newer providers.

Is One API still maintained?

Activity is low (no commit in 180+ days). Last commit: Feb 21, 2025. Latest release: v0.6.10 (Feb 2, 2025). Checked Oct 31, 2026.

How do I install One API?

The official method is Docker (single container, SQLite). The exact commands are in the "How to deploy" section above and in the official instructions: https://github.com/songquanpeng/one-api#基于-docker-进行部署

What are self-hosted alternatives to One API?

Other apps in LLM gateway & observability: LiteLLM, New API, Langfuse, Opik, Phoenix.

Sources

Facts on this page were checked against the project's own repository and docs on 2026-10-31. Spotted something out of date? Tell us.