[{"data":1,"prerenderedAt":349},["ShallowReactive",2],{"navigation":3,"\u002Fintegrations\u002Fgemini-cli":117,"\u002Fintegrations\u002Fgemini-cli-surround":344},[4,28,36,63,96],{"title":5,"path":6,"stem":7,"children":8,"icon":27},"快速开始","\u002Fgetting-started","1.getting-started\u002F1.index",[9,12,17,22],{"title":10,"path":6,"stem":7,"icon":11},"概览","i-lucide-house",{"title":13,"path":14,"stem":15,"icon":16},"零基础使用指南","\u002Fgetting-started\u002Fbeginner-guide","1.getting-started\u002F2.beginner-guide","i-lucide-list-checks",{"title":18,"path":19,"stem":20,"icon":21},"创建 API Key","\u002Fgetting-started\u002Fapi-key","1.getting-started\u002F3.api-key","i-lucide-key-round",{"title":23,"path":24,"stem":25,"icon":26},"第一条请求","\u002Fgetting-started\u002Ffirst-request","1.getting-started\u002F4.first-request","i-lucide-send","i-lucide-rocket",{"title":29,"path":30,"stem":31,"children":32,"icon":35},"软件下载","\u002Fdownloads","2.downloads\u002F1.index",[33],{"title":34,"path":30,"stem":31,"icon":35},"ChatGPT 与 CC Switch 下载","i-lucide-download",{"title":37,"icon":38,"path":39,"stem":40,"children":41,"page":62},"开发工具","i-lucide-terminal-square","\u002Fintegrations","2.integrations",[42,47,52,57],{"title":43,"path":44,"stem":45,"icon":46},"Claude Code","\u002Fintegrations\u002Fclaude-code","2.integrations\u002F1.claude-code","i-simple-icons-anthropic",{"title":48,"path":49,"stem":50,"icon":51},"Codex","\u002Fintegrations\u002Fcodex","2.integrations\u002F2.codex","i-simple-icons-openai",{"title":53,"path":54,"stem":55,"icon":56},"Gemini CLI","\u002Fintegrations\u002Fgemini-cli","2.integrations\u002F3.gemini-cli","i-simple-icons-google",{"title":58,"path":59,"stem":60,"icon":61},"OpenCode","\u002Fintegrations\u002Fopencode","2.integrations\u002F4.opencode","i-lucide-code-xml",false,{"title":64,"icon":65,"path":66,"stem":67,"children":68,"page":62},"API 参考","i-lucide-braces","\u002Fapi-reference","3.api-reference",[69,74,79,83,87,91],{"title":70,"path":71,"stem":72,"icon":73},"API 概览","\u002Fapi-reference\u002Foverview","3.api-reference\u002F1.overview","i-lucide-map",{"title":75,"path":76,"stem":77,"icon":78},"身份验证","\u002Fapi-reference\u002Fauthentication","3.api-reference\u002F2.authentication","i-lucide-shield-check",{"title":80,"path":81,"stem":82,"icon":51},"OpenAI 兼容 API","\u002Fapi-reference\u002Fopenai-compatible","3.api-reference\u002F3.openai-compatible",{"title":84,"path":85,"stem":86,"icon":46},"Anthropic Messages API","\u002Fapi-reference\u002Fanthropic","3.api-reference\u002F4.anthropic",{"title":88,"path":89,"stem":90,"icon":56},"Gemini API","\u002Fapi-reference\u002Fgemini","3.api-reference\u002F5.gemini",{"title":92,"path":93,"stem":94,"icon":95},"错误处理","\u002Fapi-reference\u002Ferrors","3.api-reference\u002F6.errors","i-lucide-triangle-alert",{"title":97,"icon":98,"path":99,"stem":100,"children":101,"page":62},"账户与计费","i-lucide-wallet-cards","\u002Faccount","4.account",[102,107,112],{"title":103,"path":104,"stem":105,"icon":106},"套餐与模型价格","\u002Faccount\u002Fmodels-pricing","4.account\u002F1.models-pricing","i-lucide-tags",{"title":108,"path":109,"stem":110,"icon":111},"计费与用量","\u002Faccount\u002Fbilling-usage","4.account\u002F2.billing-usage","i-lucide-receipt-text",{"title":113,"path":114,"stem":115,"icon":116},"常见问题","\u002Faccount\u002Ffaq","4.account\u002F3.faq","i-lucide-circle-help",{"id":118,"title":53,"body":119,"description":337,"extension":338,"links":339,"meta":340,"navigation":341,"path":54,"seo":342,"stem":55,"__hash__":343},"docs\u002F2.integrations\u002F3.gemini-cli.md",{"type":120,"value":121,"toc":328},"minimark",[122,126,131,217,221,250,253,256,287,294,300,302,307,314,317,324],[123,124,125],"p",{},"Gemini CLI 可以通过环境变量使用自定义网关。",[127,128,130],"h2",{"id":129},"macos-和-linux","macOS 和 Linux",[132,133,139],"pre",{"className":134,"code":135,"filename":136,"language":137,"meta":138,"style":138},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export GOOGLE_GEMINI_BASE_URL=\"https:\u002F\u002Fpaytok.ai\"\nexport GEMINI_API_KEY=\"$PAYTOK_API_KEY\"\nexport GEMINI_MODEL=\"\u003CMODEL_ID>\"\n\ngemini\n","Terminal","bash","",[140,141,142,169,186,203,210],"code",{"__ignoreMap":138},[143,144,147,151,155,159,162,166],"span",{"class":145,"line":146},"line",1,[143,148,150],{"class":149},"spNyl","export",[143,152,154],{"class":153},"sTEyZ"," GOOGLE_GEMINI_BASE_URL",[143,156,158],{"class":157},"sMK4o","=",[143,160,161],{"class":157},"\"",[143,163,165],{"class":164},"sfazB","https:\u002F\u002Fpaytok.ai",[143,167,168],{"class":157},"\"\n",[143,170,172,174,177,179,181,184],{"class":145,"line":171},2,[143,173,150],{"class":149},[143,175,176],{"class":153}," GEMINI_API_KEY",[143,178,158],{"class":157},[143,180,161],{"class":157},[143,182,183],{"class":153},"$PAYTOK_API_KEY",[143,185,168],{"class":157},[143,187,189,191,194,196,198,201],{"class":145,"line":188},3,[143,190,150],{"class":149},[143,192,193],{"class":153}," GEMINI_MODEL",[143,195,158],{"class":157},[143,197,161],{"class":157},[143,199,200],{"class":164},"\u003CMODEL_ID>",[143,202,168],{"class":157},[143,204,206],{"class":145,"line":205},4,[143,207,209],{"emptyLinePlaceholder":208},true,"\n",[143,211,213],{"class":145,"line":212},5,[143,214,216],{"class":215},"sBMFI","gemini\n",[127,218,220],{"id":219},"powershell","PowerShell",[132,222,225],{"className":223,"code":224,"filename":220,"language":219,"meta":138,"style":138},"language-powershell shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","$env:GOOGLE_GEMINI_BASE_URL=\"https:\u002F\u002Fpaytok.ai\"\n$env:GEMINI_API_KEY=$env:PAYTOK_API_KEY\n$env:GEMINI_MODEL=\"\u003CMODEL_ID>\"\n\ngemini\n",[140,226,227,232,237,242,246],{"__ignoreMap":138},[143,228,229],{"class":145,"line":146},[143,230,231],{},"$env:GOOGLE_GEMINI_BASE_URL=\"https:\u002F\u002Fpaytok.ai\"\n",[143,233,234],{"class":145,"line":171},[143,235,236],{},"$env:GEMINI_API_KEY=$env:PAYTOK_API_KEY\n",[143,238,239],{"class":145,"line":188},[143,240,241],{},"$env:GEMINI_MODEL=\"\u003CMODEL_ID>\"\n",[143,243,244],{"class":145,"line":205},[143,245,209],{"emptyLinePlaceholder":208},[143,247,248],{"class":145,"line":212},[143,249,216],{},[127,251,252],{"id":252},"选择模型",[123,254,255],{},"使用密钥查询 Gemini 协议下可用的模型：",[132,257,259],{"className":134,"code":258,"filename":136,"language":137,"meta":138,"style":138},"curl https:\u002F\u002Fpaytok.ai\u002Fv1beta\u002Fmodels \\\n  -H \"x-goog-api-key: $PAYTOK_API_KEY\"\n",[140,260,261,272],{"__ignoreMap":138},[143,262,263,266,269],{"class":145,"line":146},[143,264,265],{"class":215},"curl",[143,267,268],{"class":164}," https:\u002F\u002Fpaytok.ai\u002Fv1beta\u002Fmodels",[143,270,271],{"class":153}," \\\n",[143,273,274,277,280,283,285],{"class":145,"line":171},[143,275,276],{"class":164},"  -H",[143,278,279],{"class":157}," \"",[143,281,282],{"class":164},"x-goog-api-key: ",[143,284,183],{"class":153},[143,286,168],{"class":157},[123,288,289,290,293],{},"将返回的模型 ID 用于 ",[140,291,292],{},"GEMINI_MODEL","。",[295,296,297],"note",{},[123,298,299],{},"不同分组提供的 Gemini 模型可能不同。请不要将示例中的模型 ID 视为固定可用。",[127,301,113],{"id":113},[303,304,306],"h3",{"id":305},"gemini-cli-仍然连接默认地址","Gemini CLI 仍然连接默认地址",[123,308,309,310,313],{},"在启动前运行 ",[140,311,312],{},"echo $GOOGLE_GEMINI_BASE_URL","，确认环境变量已在当前 shell 生效。",[303,315,316],{"id":316},"模型不存在",[123,318,319,320,323],{},"通过 ",[140,321,322],{},"\u002Fv1beta\u002Fmodels"," 重新查询，并确认 API Key 的分组未发生变化。",[325,326,327],"style",{},"html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":138,"searchDepth":146,"depth":171,"links":329},[330,331,332,333],{"id":129,"depth":171,"text":130},{"id":219,"depth":171,"text":220},{"id":252,"depth":171,"text":252},{"id":113,"depth":171,"text":113,"children":334},[335,336],{"id":305,"depth":188,"text":306},{"id":316,"depth":188,"text":316},"使用 Gemini API 兼容入口将 Gemini CLI 连接到派拓。","md",null,{},{"icon":56},{"title":53,"description":337},"6-ApmbQYWjLMFq5SQLrj_Pz0Y7vB2zK6WWSkiCsAFsU",[345,347],{"title":48,"path":49,"stem":50,"description":346,"icon":51,"children":-1},"通过 Codex 自定义 model provider 连接派拓 Responses API。",{"title":58,"path":59,"stem":60,"description":348,"icon":61,"children":-1},"使用 OpenAI 兼容 provider 将 OpenCode 连接到派拓。",1788594876620]