部署 AIstudioProxyAPI 需要遵循以下步骤:
- environmental preparation:确保系统已安装 Node.js 环境和 Git 工具。
- Get Code: By
git clone https://github.com/CJackHwang/AIstudioProxyAPI
Cloning Project Warehouse. - Installation of dependencies:进入项目目录后,根据包管理器选择执行
npm install
或等效命令安装依赖项(express, cors, playwright等)。 - Starting services: Run
node auto_connect_aistudio.cjs
,脚本会自动:- 检查环境依赖完整性
- 验证 Chrome 调试端口(默认8848)可用性
- 设置 Chrome 窗口参数(默认460px宽度)
- authentication:在自动打开的 Chrome 窗口中手动登录 Google AI Studio 账户。
注意:服务启动后,默认 API 接口在 http://localhost:2048
提供。如果遇到端口冲突可使用 lsof -i :2048
查找并释放端口。
This answer comes from the articleAIstudioProxyAPI: Unlimited use of the Gemini 2.5 Pro Model APIThe