One API
One API 是一款开源的大语言模型(LLM)API 管理与聚合工具,旨在将多种 AI 大模型服务统一转换为 OpenAI 兼容接口格式。其核心功能包括:支持 OpenAI、Azure、Claude、文心一言、通义千问等国内外主流大模型的接入与转发,提供统一的 API 密钥管理、负载均衡及用量统计,便于开发者在单一接口下灵活切换和调用不同模型服务。
Core Facts
Open-source projects such as LiteLLM and OneAPI also provide similar unified interface layers.
One API is an open-source large model API aggregation and management platform on GitHub that can unify the APIs of multiple large model service providers into a single platform.
One API's backend is written in Go, the frontend uses React, and it compiles into a single executable file while also providing an official Docker image.
Timeline (last 90 days)
Anthropic has its own Messages API format, while intermediary services such as LiteLLM and One API provide format conversion functionality.
All Facts (20)
Open-source projects such as LiteLLM and OneAPI also provide similar unified interface layers.
75%VerifiedOne API is an open-source large model API aggregation and management platform on GitHub that can unify the APIs of multiple large model service providers into a single platform.
70%VerifiedOne API's backend is written in Go, the frontend uses React, and it compiles into a single executable file while also providing an official Docker image.
65%VerifiedThe core concept of One API is unified entry point and multi-model distribution.
65%VerifiedOne API provides an API Key secondary distribution mechanism, allowing administrators to configure original API Keys and then generate new access tokens to distribute to team members or downstream users.
65%UnverifiedOne API的GitHub仓库地址为 https://github.com/songquanpeng/one-api
95%UnverifiedOne API 编译后只有一个二进制文件,不依赖额外运行环境,并提供官方 Docker 镜像
90%UnverifiedOne API 支持创建子令牌,可单独设置配额上限、过期时间、IP 白名单等策略
90%UnverifiedOne API 内置多渠道负载均衡和故障转移机制,当检测到 HTTP 429 响应时会自动切换到备用渠道
90%UnverifiedOne API 通过「倍率」机制将不同厂商的计费单位归一化,为每个模型设定相对于基准模型的价格倍率
90%UnverifiedOne API 采用 SQLite 或 MySQL 数据库存储所有租户数据,通过令牌 ID 进行逻辑隔离
90%UnverifiedChatGPT-Next-Web、LobeChat、Chatbox 等 OpenAI 生态工具可以直接接入 One API,无需任何改造
90%UnverifiedOne API 的额度系统默认以 1:500000 的比例将美元换算为内部额度单位,实现跨模型的成本核算
90%UnverifiedOne API提供官方Docker镜像,支持一条命令完成部署
90%UnverifiedOne API项目以JavaScript编写
90%Unverified自2022年ChatGPT发布以来,GitHub上涌现出大量降低AI使用门槛的开源项目,包括Ollama、LM Studio、One API、NewAPI等
90%UnverifiedOne API部署仅需1核1G内存的VPS即可运行
90%UnverifiedOne API本质上是一个面向大语言模型的API网关(API Gateway),支持流式响应(Server-Sent Events,SSE)透传和基于Token数量的计量计费
90%UnverifiedOne API的故障转移机制借鉴了微服务领域的断路器(Circuit Breaker)模式,当渠道返回429或5xx状态码时自动标记为临时不可用
85%UnverifiedLangChain、ChatGPT-Next-Web、LobeChat、Dify等开源项目原生支持自定义OpenAI API端点,可与One API协同使用
85%