一键导入
gemini-web2api
Convert Google Gemini web into an OpenAI-compatible API. Zero auth, single file, drop-in replacement.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Convert Google Gemini web into an OpenAI-compatible API. Zero auth, single file, drop-in replacement.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | gemini-web2api |
| description | Convert Google Gemini web into an OpenAI-compatible API. Zero auth, single file, drop-in replacement. |
| version | 1.0.0 |
| author | Hermes Agent |
| license | MIT |
| platforms | ["linux","macos","windows"] |
| metadata | {"hermes":{"tags":["llm","api","gemini","openai","proxy","free-tier"],"related_skills":["llama-cpp","serving-llms-vllm"]}} |
Convert Google Gemini's web interface into an OpenAI-compatible API endpoint. No API keys needed — uses your Gemini web session.
pip install gemini-web2api
# Start the server
gemini-web2api --port 8080
# Test with curl
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"gemini","messages":[{"role":"user","content":"Hello!"}]}'
GEMINI_SESSION — Gemini web session token (auto-extracted if not set)PORT — Server port (default: 8080)HOST — Bind address (default: 0.0.0.0)import openai
client = openai.OpenAI(
base_url="http://localhost:8080/v1",
api_key="not-needed" # Any string works
)
response = client.chat.completions.create(
model="gemini",
messages=[{"role": "user", "content": "Explain quantum computing"}]
)
export OPENAI_API_BASE=http://localhost:8080/v1
export OPENAI_API_KEY=not-needed
# Now any OpenAI-compatible tool works
python my_script.py
Add to config.yaml:
providers:
- name: gemini-free
base_url: http://localhost:8080/v1
api_key: not-needed
models:
- gemini
stream = client.chat.completions.create(
model="gemini",
messages=[{"role": "user", "content": "Write a story"}],
stream=True
)
for chunk in stream:
print(chunk.choices[0].delta.content, end="")
model: "gemini" in requests. The server maps this to the appropriate Gemini model.# Test server is running
curl -s http://localhost:8080/v1/models | python3 -m json.tool
# Test completion
curl -s http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"gemini","messages":[{"role":"user","content":"Say hello"}]}' \
| python3 -m json.tool
In-process vector database for AI applications — embed vector search, hybrid retrieval, and full-text search directly into your application without managing a separate server.
LLM-powered knowledge extraction CLI — transform unstructured text into structured knowledge (graphs, hypergraphs, spatio-temporal graphs) with a single command.
Give your AI agent one-click internet access — Twitter, Reddit, YouTube, GitHub, Bilibili, and more. Zero API fees.
Generate token-efficient CLIs for AI agents by reading API docs and studying community patterns. Prints Go binaries + Claude Code skills + MCP servers.
Terminal AI coding agent with video input, subagents, MCP support, and ACP editor integration
AI-powered code review CLI — deterministic pipelines + LLM agent, battle-tested at Alibaba scale