社区讨论LinuxDo 最新
gemini-web2api不让用了吗?
首先感谢站里的佬: [开源推广]无鉴权调用gemini 3.7flash 爽用gemini 3.7 - 开发调优 - LINUX DO [开源推广] Gemini网页端 3.6-flash 模型 匿名调用, 免费调用API - 开发调优 / 开发调优, Lv1 - LINUX DO 爽用了几个月的GEMINI,用美国大豆包替代了日常 除了不能发图片,做对话还好 今天发现发了消息没回音,看后台是429 gemini-web2api v1.1.0 Listening: http://0.0.0.0:8081 Base…
内容摘要
作者:#mark
板块:#开发调优
首先感谢站里的佬:
[开源推广]无鉴权调用gemini 3.7flash 爽用gemini 3.7 - 开发调优 - LINUX DO
[开源推广] Gemini网页端 3.6-flash 模型 匿名调用, 免费调用API - 开发调优 / 开发调优, Lv1 - LINUX DO
爽用了几个月的GEMINI,用美国大豆包替代了日常
除了不能发图片,做对话还好
今天发现发了消息没回音,看后台是429
gemini-web2api v1.1.0
Listening: http://0.0.0.0:8081
Base URL: http://localhost:8081/v1
Models: gemini-3.7-flash, gemini-3.6-flash, gemini-3.5-flash, gemini-3.5-flash-thinking, gemini-3.1-pro, gemini-auto, gemini-3.5-flash-thinking-lite, gemini-flash-lite
Cookie: none (anonymous)
Proxy: none (uses system env HTTP_PROXY/HTTPS_PROXY)
Retry: 3x / 2s
BL: boq_assistant-bard-web-server_20260907.07_p3
Temporary: no
[08:30:07] 127.0.0.1 "GET /v1/models HTTP/1.1" 200 -
[08:30:38] 127.0.0.1 "POST /v1/chat/completions HTTP/1.1" 200 -
[08:30:41] Stream error: Redirect response '302 Found' for url 'https://gemini.google.com/_/BardChatUi/data/assistant.lamda.BardFrontendService/StreamGenerate?bl=boq_assistant-bard-web-server_20260907.07_p3&hl=en&_reqid=173038&rt=c'
Redirect location: 'https://www.google.com/sorry/index?continue=https://gemini.google.com/_/BardChatUi/data/assistant.lamda.BardFrontendService/StreamGenerate%3Fbl%3Dboq_assistant-bard-web-server_20260907.07_p3%26hl%3Den%26_reqid%3D173038%26rt%3Dc&hl=en&q=EgQmL3Z7GLa6ktUGIjBvBXJz6fu7KrSw8IHbK891mNH_YCWCIH9E0YMIJMzggo-ea2wiFVTUOjeeYlOPKm4yAnJSWgFD'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302
[08:31:04] 127.0.0.1 "POST /v1/chat/completions HTTP/1.1" 200 -
[08:31:16] Stream error: Redirect response '302 Found' for url 'https://gemini.google.com/_/BardChatUi/data/assistant.lamda.BardFrontendService/StreamGenerate?bl=boq_assistant-bard-web-server_20260907.07_p3&hl=en&_reqid=173073&rt=c'
Redirect location: 'https://www.google.com/sorry/index?continue=https://gemini.google.com/_/BardChatUi/data/assistant.lamda.BardFrontendService/StreamGenerate%3Fbl%3Dboq_assistant-bard-web-server_20260907.07_p3%26hl%3Den%26_reqid%3D173073%26rt%3Dc&hl=en&q=EgQmL3Z7GNm6ktUGIjAgjE7y0FgM4kgw9dcanMVbivPQtAUuaHroBa6DlDRefYK20mOsM-iYJG9mRMjRSY0yAnJSWgFD'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302
[08:31:23] 127.0.0.1 "POST /v1/chat/completions HTTP/1.1" 200 -
[08:31:26] Stream error: Redirect response '302 Found' for url 'https://gemini.google.com/_/BardChatUi/data/assistant.lamda.BardFrontendService/StreamGenerate?bl=boq_assistant-bard-web-server_20260907.07_p3&hl=en&_reqid=173083&rt=c'
Redirect location: 'https://www.google.com/sorry/index?continue=https://gemini.google.com/_/BardChatUi/data/assistant.lamda.BardFrontendService/StreamGenerate%3Fbl%3Dboq_assistant-bard-web-server_20260907.07_p3%26hl%3Den%26_reqid%3D173083%26rt%3Dc&hl=en&q=EgQmL3Z7GOO6ktUGIjAqTYRFSnKkAv-JmKHdC5dasiU1Dt4VguQQMnIjaOHeoTK7A0IVwryQ3fwidttSx8UyAnJSWgFD'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302
DS分析如下:
这是 **gemini-web2api** 这个项目的运行日志。它本质上是一个“反向代理”,把 Google Gemini 网页端的接口包装成了 OpenAI 兼容的 API 格式,方便你用 `/v1/chat/completions` 这样的方式调用 Gemini。
日志大概意思是:
---
### 启动信息正常
gemini-web2api v1.1.0
Listening: http://0.0.0.0:8081
Models: ...
Cookie: none (anonymous)
Proxy: none
Retry: 3x / 2s
- 服务已经在本机 `8081` 端口启动了。
- 当前是 **匿名模式**,没有提供 Gemini 网页版登录 Cookie。
- 没有配置代理。
- 请求失败会重试 3 次,间隔 2 秒。
---
### 请求日志
08:30:38 POST /v1/chat/completions HTTP/1.1" 200 -
这一行表示你的本地 API 请求**成功到达了服务端**,服务端也向外转发请求了,所以返回了 200。
---
### 真正的问题在这:
Stream error: Redirect response '302 Found' for url
' https://gemini.google.com/.../StreamGenerate ...'
Redirect location: ' https://www.google.com/sorry/index ?...'
这是重点。
`302` 跳转到了:
https://www.google.com/sorry/index
这是 **Google 的“反滥用验证”页面**,也就是通常说的:
> Google 检测到你的 IP / 请求模式异常,于是把你拦截了,要求你进行人机验证,或者直接拒绝访问。
为什么会这样?
- 你用的是 **匿名模式**,没有提供 Gemini 网页版 Cookie,Google 对匿名请求限制很严格。
- 你的 IP 可能是 **机房 IP / 数据中心 IP**,或者被 Google 标记为“可疑”。
-
资讯来源
LinuxDo