# One API

> Access all LLM through the standard OpenAI API format, easy to deploy & use

Source: https://talira.ai/catalog/one-api-d8mv61ah
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Web app, API
- Categories: [ai / llm / gateways](https://talira.ai/categories/ai/llm/gateways), [self hosted](https://talira.ai/categories/self-hosted)
- Platforms: web, linux, macos, windows, docker[^3][^6]
- Licence: MIT[^3][^4]
- Pricing: Free and open source[^2][^4]
- Pricing notes: Free, MIT licensed. You pay the upstream providers for the keys you add. Donations through the author's site.
- Free tier: yes[^2][^4]
- Self-hostable: yes[^3]
- API: yes[^2][^5]
- Creator: JustSong (songquanpeng)

One API is a self-hosted LLM API management and key redistribution system: you add your own upstream API keys as channels (OpenAI and Azure OpenAI, Anthropic [Claude](https://talira.ai/catalog/claude-w14d0j2d.md) including AWS, Google [Gemini](https://talira.ai/catalog/gemini-api-r5x8ntes.md), Mistral, DeepSeek, xAI, Groq, Cohere, [Ollama](https://talira.ai/catalog/ollama-gr2tx5nn.md), [Cloudflare Workers](https://talira.ai/catalog/cloudflare-workers-s91ye39z.md) AI and many Chinese providers such as Baidu ERNIE, Alibaba Qwen, Zhipu ChatGLM, Moonshot and ByteDance Doubao), and it exposes them through one OpenAI-compatible API, translating requests for providers with other formats. Users get access tokens with expiry, quota, allowed IP ranges and models; quota is charged by group and model multipliers on token counts, with redemption codes to top up balances, invite rewards and a recharge link, and channels are load balanced, retried on failure and tested automatically. It's a single Go binary with a web UI and [Docker](https://talira.ai/catalog/docker-engine-9442r3nw.md) images, using [SQLite](https://talira.ai/catalog/sqlite-cys3nt23.md) or [MySQL](https://talira.ai/catalog/mysql-dy4scprm.md), with [Redis](https://talira.ai/catalog/redis-v917j45s.md) and multi-machine deployment for scale. It's MIT licensed with a required footer attribution, and [New API](https://talira.ai/catalog/new-api-c7b0h9w9.md) is built on it; its last release was v0.6.10 in February 2025.

## Links

- Website: https://oneapi.justsong.cn/
- GitHub: https://github.com/songquanpeng/one-api

## Ways to install

### Hosted for you

- [Railway](https://talira.ai/catalog/railway-mczwyt8g.md): <https://railway.com/deploy/one-api>[^1]

## Problems it solves

- give my team one OpenAI-compatible endpoint that routes to OpenAI, Claude, Gemini and DeepSeek
- hand out API keys to colleagues with their own quotas without sharing our real OpenAI key
- self-hosted LLM API gateway that load balances across several provider keys
- use Chinese models like Qwen, ERNIE and ChatGLM from apps that only speak the OpenAI API
- track how many tokens each user of our internal AI service has used
- set different prices per model and per user group for an AI API I resell
- issue redemption codes that top up users' balances on my AI API site
- restrict an AI API key to certain models and to our office IP range
- fail over to another provider key automatically when a request errors
- test all my LLM provider keys on a schedule and disable the ones that fail
- run an AI API key management system as one binary or Docker container with SQLite
- point ChatGPT Next Web at my own AI key distribution server instead of an OpenAI key

## Features

- OpenAI-compatible API in front of OpenAI, Azure OpenAI, Anthropic Claude (incl. AWS), Google Gemini, Mistral, DeepSeek, xAI, Groq, Cohere, Ollama and Cloudflare Workers AI
- Chinese providers: Baidu ERNIE, Alibaba Qwen, Zhipu ChatGLM, iFlytek Spark, Tencent Hunyuan, Moonshot, Baichuan, MiniMax, ByteDance Doubao and SiliconCloud
- request and response translation for providers whose API isn't OpenAI-format
- channel management with bulk creation, model lists, groups and load balancing
- pick a channel per request by appending its ID to the token
- access tokens with expiry, quota, allowed IP ranges and allowed models
- quota by group and model multipliers on prompt and completion tokens, shown in USD if wanted
- redemption codes generated and exported in bulk to top up balances
- user invite rewards, announcements, recharge link and initial balance for new users
- model mapping, automatic retry on failure and scheduled channel tests and balance updates
- image generation endpoint and Cloudflare AI Gateway support
- management API with system access tokens
- email, GitHub, Feishu and WeChat Official Account login; Cloudflare Turnstile
- custom system name, logo, footer, home and about pages, and themes
- SQLite by default, MySQL or PostgreSQL (PostgreSQL support still being adapted), Redis cache and multi-machine deployment
- single binary for Linux, macOS and Windows, Docker images

## Limitations

- Footer attribution required: the README requires a credit and link to One API at the bottom of the page, also in derivative projects, unless you get permission[^2][^3]
- Not for unfiled public AI services in China: the README says not to offer generative AI services that haven't been filed under China's Interim Measures to the public in China[^2]

## Capabilities

- Has an API: plan not known

## Trust

Overall: 0.28 out of 1.
Signals: backing 0.20, extensibility 0.20.

- created by JustSong (songquanpeng)

Warnings:

- GitHub activity not fetched yet

## Forks

- [New API](https://talira.ai/catalog/new-api-c7b0h9w9.md): An AI gateway for models, applications, and agents. Its own project since 2023.

## Alternatives

- [LiteLLM](https://talira.ai/catalog/litellm-dcj2btwh.md): The AI Gateway for platform teams.
- [Bifrost](https://talira.ai/catalog/bifrost-vwd1keba.md): Open-source, high-performance AI gateway that works as your LLM gateway, MCP gateway and agent gateway.
- [New API](https://talira.ai/catalog/new-api-c7b0h9w9.md): An AI gateway for models, applications, and agents
- [Portkey AI Gateway](https://talira.ai/catalog/portkey-ai-gateway-0jcyxmse.md): A blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
- [CLIProxyAPI](https://talira.ai/catalog/cliproxyapi-sg34tvnz.md): Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code and Devin as an OpenAI/Gemini/Claude/Codex compatible API service
- [OmniRoute](https://talira.ai/catalog/omniroute-v3a86e5b.md): The free AI gateway: one endpoint for hundreds of providers, with quota-aware fallback

## Sources

[^1]: https://railway.com/deploy/one-api (checked 20 Nov 2026)
[^2]: https://github.com/songquanpeng/one-api/blob/main/README.md (checked 20 Nov 2026)
[^3]: https://github.com/songquanpeng/one-api/blob/main/README.en.md (checked 20 Nov 2026)
[^4]: https://github.com/songquanpeng/one-api/blob/main/LICENSE (checked 20 Nov 2026)
[^5]: https://github.com/songquanpeng/one-api/blob/main/docs/API.md (checked 20 Nov 2026)
[^6]: https://github.com/songquanpeng/one-api/releases/tag/v0.6.10 (checked 20 Nov 2026)
