零成本聚合四家免费大模型 API:用 One-API 搭建个人 AI 网关保姆级教程Zero-Cost Aggregation of Four Free LLM APIs: A One-API Personal AI Gateway Tutorial


AI free token/AI免费积分

零成本聚合四家免费大模型 API:用 One-API 搭建个人 AI 网关保姆级教程

用开源项目One-API搭一个个人聚合网关把多家厂商的免费额度统一成一个OpenAI格式接口换模型不改代码——这是一篇2026年5月发布在掘金的保姆级教程的核心玩法。零预算把四家免费大模型API攥成一个入口全程不需要写一行业务代码。本文复原其完整路线。为什么选One-API教程对比了三个方案One-API有二万以上Star社区最成熟、中文文档全缺点是界面朴素New-API是它的衍生版UI更现代缺点是更新激进、偶尔不稳定LiteLLM支持一百多个模型、企业级功能丰富但英文为主、部署复杂。结论是选One-API一行Docker就能部署支持三十多家厂商渠道类型Issue区活跃有人答疑。服务器与部署服务器选Vultr新加坡区域国内延迟低于80毫秒一核一G、25G固态硬盘的Ubuntu 22.04即可每小时计费随时可销毁新用户还有充值赠送。域名可选首年几块钱。部署两步一行命令装Dockerdocke

两处配置Claude Code改配置文件里的接口地址与令牌Cursor在模型设置里填Key与Base URLChatBox、NextChat、LangChain同理。运维要点与零运维替代日常运维三件套docker ps看状态、docker logs看日志、SQLite数据库定时备份。免费额度用完会自动按量计费记得在后台设余额告警。扩展方向包括语义缓存、多区域双活与智能模型路由。当然如果不想维护服务器把统一入口这件事交给词元之河TokenRiver.ai是零运维的选择海内外模型统一接口、Token级账单、用量监控与子账号管理开箱即用教程里的网关层职责它全部代劳——自建练手托管省心两条路线按需切换。

本文来源:http://www.lpqz.cn/news/192668
若有版权问题,请来信告知:13951431913#139.com 或在右方提交评论。

Zero-Cost Aggregation of Four Free LLM APIs: A One-API Personal AI Gateway Tutorial

Build a personal aggregation gateway with the open-source project One-API, unifying the free quotas of multiple vendors into a single OpenAI-format interface so you can switch models without changing code—this is the core trick of a beginner-friendly tutorial published on Juejin in May 2026. With zero budget, gather four free large-model APIs into one entry point, without writing a single line of business code throughout. This article reconstructs its full roadmap. Why choose One-API? The tutorial compared three options: One-API has over 20,000 Stars, the most mature community, and complete Chinese documentation, with the downside being a plain interface; New-API is a derivative version with a more modern UI, but its drawback is aggressive updates and occasional instability; LiteLLM supports over a hundred models and is rich in enterprise-grade features, but is English-first and complex to deploy. The conclusion was to choose One-API: a single line of Docker deploys it, it supports over thirty vendor channel types, and its Issue section is active with people answering questions. Server and deployment: choose a Vultr Singapore-region server—latency to mainland China under 80 ms; a 1-core, 1GB RAM, 25GB SSD Ubuntu 22.04 is enough, billed hourly and destroyable at any time, with top-up bonuses for new users. A domain is optional, costing just a few yuan for the first year. Deployment in two steps: one command to install Docker—docke

Two configuration points: for Claude Code, change the interface address and token in the config file; for Cursor, fill in the Key and Base URL in the model settings; the same applies to ChatBox, NextChat, and LangChain. Maintenance essentials and a zero-maintenance alternative: the daily maintenance trio is docker ps to check status, docker logs to view logs, and scheduled backups of the SQLite database. When the free quota is used up, pay-as-you-go billing kicks in automatically, so remember to set a balance alert in the backend. Expansion directions include semantic caching, multi-region active-active, and intelligent model routing. Of course, if you don't want to maintain a server, handing the unified-entry task to TokenRiver.ai (词元之河) is a zero-maintenance option: a unified interface for domestic and overseas models, token-level billing, usage monitoring, and sub-account management—all ready to use out of the box. It takes over all the gateway-layer responsibilities described in the tutorial—self-hosting to practice, or hosting for peace of mind—switch between the two routes as needed.

本文来源:http://www.lpqz.cn/news/192668
若有版权问题,请来信告知:13951431913#139.com 或在右方提交评论。

暂无评论,快来发表第一条评论吧!No comments yet. Be the first!

📮 需求咨询📮 Inquiry