利用AIstudioProxyAPI突破配额限制的解决方案
针对开发者面临的OpenAI API配额限制问题,可通过AIstudioProxyAPI搭建本地代理服务实现以下操作流程:
- environmental preparation:安装Node.js 16+和Chrome浏览器(需支持Playwright驱动),建议内存4GB+
- 代理部署::
- Cloning Project Warehouse
git clone https://github.com/CJackHwang/AIstudioProxyAPI
- Installation of dependencies
npm install
(自动包含playwright组件) - Starting services
node auto_connect_aistudio.cjs
- Cloning Project Warehouse
- 客户端配置:将原OpenAI API地址替换为
http://localhost:2048
,模型名称设为gemini
该方法本质是通过Playwright自动化技术建立本地转发层,将OpenAI格式请求实时转换为Google AI Studio的Web操作。需注意Chrome实例需保持登录有效状态,建议在个人开发环境中长期运行代理服务。
This answer comes from the articleAIstudioProxyAPI: Unlimited use of the Gemini 2.5 Pro Model APIThe