curl http://127.0.0.1:2048/health返回 200 表示核心状态正常;503 时请关注 details 字段中的 browser/page/worker 状态。
curl http://127.0.0.1:2048/v1/modelscurl -X POST http://127.0.0.1:2048/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model":"gemini-2.5-pro",
"messages":[{"role":"user","content":"请总结今天的任务"}],
"temperature":0.8
}'curl -X POST http://127.0.0.1:2048/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model":"gemini-2.5-pro",
"stream":true,
"messages":[{"role":"user","content":"写一段 100 字短文"}]
}' --no-buffer当密钥文件中存在有效 key 时,/v1/*(除公开白名单)将开启鉴权。
支持两种请求头:
Authorization: Bearer <token>(推荐)X-API-Key: <token>(兼容)
管理接口:
GET /api/keys:查询密钥POST /api/keys:新增密钥POST /api/keys/test:测试密钥DELETE /api/keys:删除密钥
GET /v1/queue:查看排队请求、等待时长、是否被取消POST /v1/cancel/{req_id}:取消排队中的请求
示例:
curl http://127.0.0.1:2048/v1/queue
curl -X POST http://127.0.0.1:2048/v1/cancel/abc1234GET /api/infoGET /api/server/statusPOST /api/server/restartGET/POST /api/proxy/configPOST /api/proxy/testGET/POST /api/helper/configGET/POST /api/ports/configGET /api/ports/statusPOST /api/ports/killGET /api/auth/filesGET /api/auth/activePOST /api/auth/activateDELETE /api/auth/deactivateGET /api/model-capabilitiesGET /api/model-capabilities/{model_id}WS /ws/logs
这些接口主要为内置管理 UI 服务;若你要对外暴露,请在网关层做访问控制。