Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

810 B
Raw Blame
import type { RegistryEntry } from "../../shared.ts";

// g4f.space/api/gemini — optional-auth remote Gemini gateway (gpt4free, issue #6650).
// Unlike gemini-web's browser cookie, anonymous requests use proof-of-work cake credits;
// a member API key is the alternative. The wire format is standard OpenAI-compatible HTTP.
export const g4f_geminiProvider: RegistryEntry = {
  id: "g4f-gemini",
  alias: "g4fgem",
  format: "openai",
  executor: "default",
  baseUrl: "https://g4f.space/api/gemini/v1/chat/completions",
  modelsUrl: "https://g4f.space/api/gemini/v1/models",
  authType: "optional",
  authHeader: "bearer",
  passthroughModels: true,
  models: [
    { id: "models/gemini-2.5-flash", name: "Gemini 2.5 Flash (g4f)" },
    { id: "models/gemini-2.5-pro", name: "Gemini 2.5 Pro (g4f)" },
  ],
};