PageSourceSearch

https://dreamy-goldstine-d64959.netlify.app/assets/js/18a73afa.dc7086c2.js

js dreamy-goldstine-d64959.netlify.app collected 2026-10-03 10:41:28 UTC 15,156 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3347],{6903:(e,n,i)=>{i.d(n,{A:()=>r});i(6540);var t=i(1176),o=i(4848);function r(){return(0,o.jsx)(t.A.Google,{style:{display:"block",textAlign:"center"},layout:"in-article",format:"fluid",client:"ca-pub-7015533392136941",slot:"7527831842"})}},8397:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>u,frontMatter:()=>s,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"services/gemini","title":"Gemini","description":"\u5728\u5212\u8bcd\u7ffb\u8bd1\u5167\u4f7f\u7528 Gemini \u7684\u65b9\u5f0f\u6709\u4e24\u79cd\u3002","source":"@site/docs/services/gemini.mdx","sourceDirName":"services","slug":"/services/gemini","permalink":"/docs/services/gemini","draft":false,"unlisted":false,"editUrl":"/docs/edit-note?docs%2Fservices%2Fgemini.mdx","tags":[],"version":"current","lastUpdatedAt":1762083386000,"frontMatter":{},"sidebar":"servicesSidebar","previous":{"title":"Claude","permalink":"/docs/services/claude"},"next":{"title":"Groq","permalink":"/docs/services/groq"}}');var o=i(4848),r=i(8453);i(6903);const s={},l="Gemini",a={},c=[{value:"\u7b2c\u4e00\u79cd\uff1a\u8d2d\u4e70\u3010\u5957\u9910\u5305\u3011\u76f4\u63a5\u4f7f\u7528",id:"\u7b2c\u4e00\u79cd\u8d2d\u4e70\u5957\u9910\u5305\u76f4\u63a5\u4f7f\u7528",level:2},{value:"\u7b2c\u4e8c\u79cd\uff1a\u81ea\u884c\u7533\u8bf7 Gemini \u670d\u52a1",id:"\u7b2c\u4e8c\u79cd\u81ea\u884c\u7533\u8bf7-gemini-\u670d\u52a1",level:2},{value:"OpenAI \u63a5\u53e3\u517c\u5bb9\u6027",id:"openai-compatibility",level:2},{value:"\u6a21\u578b\u4e0e\u4ef7\u683c",id:"prices",level:2},{value:"\u7533\u8bf7\u6b65\u9aa4",id:"steps",level:2},{value:"\u7b2c\u4e00\u6b65\uff1a\u4f7f\u7528\u5408\u9002\u7684 IP",id:"\u7b2c\u4e00\u6b65\u4f7f\u7528\u5408\u9002\u7684-ip",level:3},{value:"\u7b2c\u4e8c\u6b65\uff1a\u83b7\u53d6 API Key",id:"get-key",level:3},{value:"\u7b2c\u4e09\u6b65\uff1a\u5c06 API key \u586b\u5199\u8fdb\u5212\u8bcd\u7ffb\u8bd1",id:"fill-in",level:3},{value:"\u53ef\u9009\uff1a\u5207\u6362\u6a21\u578b",id:"switch-model",level:3},{value:"\u9519\u8bef\u6392\u67e5",id:"troubleshooting",level:2}];function d(e){const n={a:"a",admonition:"admonition",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"gemini",children:"Gemini"})}),"\n",(0,o.jsx)(n.p,{children:"\u5728\u5212\u8bcd\u7ffb\u8bd1\u5167\u4f7f\u7528 Gemini \u7684\u65b9\u5f0f\u6709\u4e24\u79cd\u3002"}),"\n",(0,o.jsx)(n.h2,{id:"\u7b2c\u4e00\u79cd\u8d2d\u4e70\u5957\u9910\u5305\u76f4\u63a5\u4f7f\u7528",children:"\u7b2c\u4e00\u79cd\uff1a\u8d2d\u4e70\u3010\u5957\u9910\u5305\u3011\u76f4\u63a5\u4f7f\u7528"}),"\n",(0,o.jsxs)(n.p,{children:["\u53ea\u9700\u8d2d\u4e70\u5212\u8bcd\u7ffb\u8bd1\u7684\u3010\u5957\u9910\u5305\u3011\uff0c\u5373\u53ef\u76f4\u63a5\u4f7f\u7528\u5305\u62ec Gemini \u5728\u5167\u7684\u6240\u6709\u670d\u52a1\u3002\u5957\u9910\u5305\u5167 Gemini \u7684\u5355\u4ef7\u4f4e\u81f3\u5b98\u65b9\u7684 ",(0,o.jsx)(n.strong,{children:"5 \u6298"}),"\u3002"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.a,{href:"/docs/pricing/package",children:"\u70b9\u51fb\u67e5\u770b\u5957\u9910\u5305\u7684\u8be6\u7ec6\u8bf4\u660e"})}),"\n",(0,o.jsx)(n.h2,{id:"\u7b2c\u4e8c\u79cd\u81ea\u884c\u7533\u8bf7-gemini-\u670d\u52a1",children:"\u7b2c\u4e8c\u79cd\uff1a\u81ea\u884c\u7533\u8bf7 Gemini \u670d\u52a1"}),"\n",(0,o.jsxs)(n.admonition,{title:"\u4e0d\u5efa\u8bae\u81ea\u884c\u7533\u8bf7 Gemini \u670d\u52a1",type:"caution",children:[(0,o.jsx)(n.p,{children:"\u81ea\u884c\u7533\u8bf7 Gemini \u670d\u52a1\u6709\u4ee5\u4e0b\u7f3a\u70b9\uff1a"}),(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"\u4f60\u9700\u8981\u81ea\u884c\u914d\u7f6e\u80fd\u8bbf\u95ee Gemini \u7684\u7f51\u7edc\u73af\u5883"}),"\n",(0,o.jsx)(n.li,{children:"\u5355\u4ef7\u6bd4\u5957\u9910\u5305\u8d35"}),"\n",(0,o.jsx)(n.li,{children:"\u6709\u5c01\u53f7\u98ce\u9669"}),"\n"]})]}),"\n",(0,o.jsxs)(n.admonition,{type:"tip",children:[(0,o.jsx)(n.p,{children:"\u6587\u6863\u5185\u5bb9\u53ef\u80fd\u4f1a\u8fc7\u65f6\uff0c\u8bf7\u4ee5 Gemini \u5b98\u7f51\u8bf4\u660e\u4e3a\u51c6\u3002"}),(0,o.jsxs)(n.p,{children:["\u76f8\u5173\u94fe\u63a5\uff1a",(0,o.jsx)(n.a,{href:"https://ai.google.dev/",children:"Gemini API \u5b98\u7f51"})," ",(0,o.jsx)(n.a,{href:"https://ai.google.dev/pricing",children:"Gemini API \u5b9a\u4ef7\u6587\u6863"})]})]}),"\n",(0,o.jsx)(n.h2,{id:"openai-compatibility",children:"OpenAI \u63a5\u53e3\u517c\u5bb9\u6027"}),"\n",(0,o.jsxs)(n.p,{children:["\u6b64\u670d\u52a1",(0,o.jsx)(n.strong,{children:"\u4e0d"}
1),"\u517c\u5bb9 OpenAI \u63a5\u53e3\u3002\u67e5\u770b\u8bf4\u660e\uff1a",(0,o.jsx)(n.a,{href:"/docs/faqs/openai-compatibilty",children:"\u4ec0\u4e48\u662f\u201c\u517c\u5bb9 OpenAI \u63a5\u53e3\u7684\u670d\u52a1\u201d\uff1f\u6709\u4ec0\u4e48\u7528\uff1f"})]}),"\n",(0,o.jsx)(n.h2,{id:"prices",children:"\u6a21\u578b\u4e0e\u4ef7\u683c"}),"\n",(0,o.jsxs)(n.p,{children:["Gemini \u7684\u6240\u6709\u6a21\u578b\u90fd\u662f\u53ef\u4ee5\u514d\u8d39\u4f7f\u7528\u7684\uff0c\u4f46\u662f\u4f1a\u6709\u5404\u79cd\u9650\u5236\uff08\u4e00\u5206\u949f\u5185\u7684\u8c03\u7528\u6b21\u6570\u3001token \u7684\u8f93\u5165 / \u8f93\u51fa\u6570\u91cf\u7b49\uff09\u3002\u4f60\u4e5f\u53ef\u4ee5\u9009\u62e9\u4ed8\u8d39\u4f7f\u7528\uff0c\u6b64\u65f6\u8c03\u7528\u9650\u5236\u4f1a\u5f88\u5bbd\u677e\u3002\u8be6\u7ec6\u60c5\u51b5\u53ef\u4ee5\u67e5\u770b ",(0,o.jsx)(n.a,{href:"https://ai.google.dev/pricing",children:"Gemini API \u5b9a\u4ef7\u6587\u6863"}),"\u3002"]}),"\n",(0,o.jsxs)(n.blockquote,{children:["\n",(0,o.jsxs)(n.p,{children:["\u652f\u4ed8 Gemini \u4f7f\u7528\u8d39\u7528\u9700\u8981\u56fd\u5916\u4fe1\u7528\u5361\u3002",(0,o.jsx)(n.a,{href:"/docs/guides/card",children:"\u70b9\u51fb\u67e5\u770b\u56fd\u5916\u865a\u62df\u4fe1\u7528\u5361\u7684\u7533\u8bf7 / \u5145\u503c / \u6d88\u8d39\u6559\u7a0b"})]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"\u63a8\u8350\u4f7f\u7528\u4ee5\u4e0b\u6a21\u578b\uff1a"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"gemini-2.5-flash-lite"}),"\uff1a",(0,o.jsx)(n.strong,{children:"\u514d\u8d39\u4f7f\u7528"}),"\u3002\u5982\u679c\u9009\u62e9\u4ed8\u8d39\u4f7f\u7528\uff0c\u6bcf\u767e\u4e07 token \u7684\u8f93\u5165\u4ef7\u683c\u4e3a 0.1 \u7f8e\u5143\uff0c\u8f93\u51fa\u4ef7\u683c\u4e3a 0.4 \u7f8e\u5143"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"gemini-2.5-flash"}),"\uff1a",(0,o.jsx)(n.strong,{children:"\u514d\u8d39\u4f7f\u7528"}),"\u3002\u5982\u679c\u9009\u62e9\u4ed8\u8d39\u4f7f\u7528\uff0c\u6bcf\u767e\u4e07 token \u7684\u8f93\u5165\u4ef7\u683c\u4e3a 0.3 \u7f8e\u5143\uff0c\u8f93\u51fa\u4ef7\u683c\u4e3a 2.5 \u7f8e\u5143"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"gemini-2.5-pro"}),"\uff1a",(0,o.jsx)(n.strong,{children:"\u514d\u8d39\u4f7f\u7528"}),"\u3002\u5982\u679c\u9009\u62e9\u4ed8\u8d39\u4f7f\u7528\uff0c\u6bcf\u767e\u4e07 token \u7684\u8f93\u5165\u4ef7\u683c\u4e3a 1.25 \u7f8e\u5143\uff0c\u8f93\u51fa\u4ef7\u683c\u4e3a 10 \u7f8e\u5143"]}),"\n"]}),"\n",(0,o.jsxs)(n.blockquote,{children:["\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"\u201c\u8f93\u5165\u201d\u5373\u4f60\u53d1\u9001\u7ed9\u6a21\u578b\u7684\u5f85\u7ffb\u8bd1\u6587\u672c\uff0c\u201c\u8f93\u51fa\u201d\u5373\u6a21\u578b\u63d0\u4f9b\u7684\u7ffb\u8bd1\u7ed3\u679c\uff0c\u7ffb\u8bd1\u4e00\u6b21\u7684\u6700\u7ec8\u82b1\u8d39 = \u8f93\u5165 token \u6570\u91cf * \u8f93\u5165\u4ef7\u683c + \u8f93\u51fa token \u6570\u91cf * \u8f93\u51fa\u4ef7\u683c\u3002"}),"\n",(0,o.jsx)(n.li,{children:"1 \u4e2a token \u5927\u7ea6\u5bf9\u5e94 1 \u4e2a\u6c49\u5b57\u6216 3 \u81f3 4 \u4e2a\u5b57\u6bcd\u3002"}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"steps",children:"\u7533\u8bf7\u6b65\u9aa4"}),"\n",(0,o.jsx)(n.h3,{id:"\u7b2c\u4e00\u6b65\u4f7f\u7528\u5408\u9002\u7684-ip",children:"\u7b2c\u4e00\u6b65\uff1a\u4f7f\u7528\u5408\u9002\u7684 IP"}),"\n",(0,o.jsxs)(n.p,{children:["Gemini \u76ee\u524d\u4ec5\u5728\u90e8\u5206\u56fd\u5bb6 / \u5730\u533a\u5f00\u653e\uff0c\u5b8c\u6574\u5217\u8868\u89c1\u5b98\u65b9\u6587\u6863 ",(0,o.jsx)(n.a,{href:"https://ai.google.dev/available_regions",children:"Google AI Studio \u548c Gemini API \u652f\u6301\u7684\u8bed\u8a00\u548c\u5730\u533a"}),"\u3002"]}),"\n",(0,o.jsxs)(n.p,{children:["\u5982\u679c\u4f60\u6253\u5f00 ",(0,o.jsx)(n.a,{href:"https://aistudio.google.com",children:"Google AI Studio"})," \u540e\u4f1a\u8df3\u8f6c\u5230\u4e0a\u9762\u7684\u94fe\u63a5\uff0c\u90a3\u4e48\u4f60\u9700\u8981\u5728\u68af\u5b50\u91cc\u66f4\u6362\u6210 Gemini \u652f\u6301\u7684\u56fd\u5bb6 / \u5730\u533a\u7684 IP\u3002"]}),"\n",(0,o.jsx)(n.h3,{id:"get-key",children:"\u7b2c\u4e8c\u6b65\uff1a\u83b7\u53d6 API Key"}),"\n",(0,o.jsxs)(n.p,{children:["\u8fdb\u5165 ",(0,o.jsx)(n.a,{href:"https://aistudio.google.com/app/api-keys",children:"Google AI Studio \u7684\u3010Dashboard\u3011->\u3010API keys\u3011\u9875\u9762"}),"\uff0c\u70b9\u51fb\u3010\u521b\u5efa API \u5bc6\u94a5\u3011\uff0c\u5728\u3010\u4e3a\u5bc6\u94a5\u547d\u540d\u3011\u4e2d\u586b\u5199\u201c\u5212\u8bcd\u7ffb\u8bd1\u201d\uff0c\u5728\u3010\u9009\u62e9\u4e00\u4e2a\u5bfc\u5165\u7684\u9879\u76ee\u3011\u4e2d\u9009\u62e9\u201cCreate Project\u201d\uff0c\u9879\u76ee\u540d\u79f0\u586b\u5199\u201chcfy\u201d\uff0c\u7136\u540e\u70b9\u51fb\u3010\u521b\u5efa\u9879\u76ee\u3011\u6309\u94ae\uff0c\u63a5\u7740\u70b9\u51fb\u3010\u521b\u5efa\u5bc6\u94a5\u3011\u6309\u94ae\u3002"]}),"\n",(0,o.jsx)(n.p,{children:"\u5b8c\u6210\u540e\uff0c\u9875\u9762\u4e2d\u4f1a\u51fa\u73b0\u4e00\u6761\u4f60\u521a\u521a\u521b\u5efa\u7684\u5bc6\u94a5\u3002\u70b9\u51fb\u3010\u5bc6\u94a5\u3011\u90a3\u4e00\u5217\u7684\u94fe\u63a5\uff0c\u4f1a\u51fa\u73b0\u4e00\u4e2a\u5f39\u7a97\uff0c\u7136\u540e\u70b9\u51fb\u3010API \u5bc6\u94a5\u3011\u53f3\u4fa7\u7684\u590d\u5236\u6309\u94ae\uff0c\u628a\u5bc6\u94a5\u590d\u5236\u4e0b\u6765\u5907\u7528\u3002"}),"\n",(0,o.jsx)(n.h3,{id:"fill-in",children:"\u7b2c\u4e09\u6b65\uff1a\u5c06 API key \u586b\u5199\u8fdb\u5212\u8bcd\u7ffb\u8bd1"}),"\n",(0,o.jsx)(n.p,{children:"\u6253\u5f00\u5212\u8bcd\u7ffb\u8bd1\u7684\u3010\u8bbe\u7f6e\u9875\u3011-\u3010\u670d\u52a1\u7533\u8bf7\u3011\uff0c\u627e\u5230\u3010Gemini\u3011\u7136\u540e\u70b9\u51fb\u3010\u7ba1\u7406\u5bc6\u94a5\u3011\u6309\u94ae\uff0c\u628a\u4e0a\u4e00\u6b65\u4e2d\u590d\u5236\u7684\u3010API key\u3011\u7c98\u8d34\u8fdb\u53bb\u5373\u53ef\u3002"}),"\n",(0,o.jsx)(n.h3,{id:"switch-model",children:"\u53ef\u9009\uff1a\u5207\u6362\u6a21\u578b"}),"\n",(0,o.jsxs)(n.p,{children:["\u5212\u8bcd\u7ffb\u8bd1\u9ed8\u8ba4\u4f7f\u7528 ",(0,o.jsx)(n.code,{children:"gemini-1.0-pro"})," \u6a21\u578b\uff0c\u4f60\u53ef\u4ee5\u524d\u5f80\u5212\u8bcd\u7ffb\u8bd1\u7684\u3010\u8bbe\u7f6e\u9875\u3011-\u3010\u7b2c\u4e09\u65b9\u670d\u52a1\u3011-\u3010Gemini\u3011\u91cc\u5207\u6362\u6a21\u578b\u6216\u8c03\u6574\u7ffb\u8bd1\u547d\u4ee4\u3002"]}),"\n",(0,o.jsx)(n.h2,{id:"troubleshooting",children:"\u9519\u8bef\u6392\u67e5"}),"\n",(0,o.jsx)(n.p,{children:"\u4f60\u53ef\u4ee5\u6839\u636e\u62a5\u9519\u4fe1\u606f\u5728\u4e0b\u65b9\u94fe\u63a5\u5185\u67e5\u627e\u
162a5\u9519\u539f\u56e0\uff1a"}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.a,{href:"https://ai.google.dev/gemini-api/docs/troubleshooting",children:"https://ai.google.dev/gemini-api/docs/troubleshooting"})})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},2115:(e,n,i)=>{Object.defineProperty(n,"__esModule",{value:!0});var t,o=function(){function e(e,n){for(var i=0;i<n.length;i++){var t=n[i];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(n,i,t){return i&&e(n.prototype,i),t&&e(n,t),n}}(),r=i(6540),s=(t=r)&&t.__esModule?t:{default:t};var l=function(e){function n(){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,e),o(n,[{key:"render",value:function(){return s.default.createElement("div",{className:"adsbybaidu"},"TODO")}}]),n}(s.default.Component);n.default=l},8265:(e,n,i)=>{Object.defineProperty(n,"__esModule",{value:!0});var t=function(){function e(e,n){for(var i=0;i<n.length;i++){var t=n[i];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(n,i,t){return i&&e(n.prototype,i),t&&e(n,t),n}}(),o=s(i(6540)),r=s(i(5556));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function n(){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,e),t(n,[{key:"componentDidMount",value:function(){window&&(window.adsbygoogle=window.adsbygoogle||[]).push({})}},{key:"render",value:function(){return o.default.createElement("ins",{className:this.props.className+" adsbygoogle",style:this.props.style,"data-ad-client":this.props.client,"data-ad-slot":this.props.slot,"data-ad-layout":this.props.layout,"data-ad-layout-key":this.props.layoutKey,"data-ad-format":this.props.format,"data-full-width-responsive":this.props.responsive})}}]),n}(o.default.Component);n.default=l,l.propTypes={className:r.default.string,style:r.default.object,client:r.default.string.isRequired,slot:r.default.string.isRequired,layout:r.default.string,layoutKey:r.default.string,format:r.default.string,responsive:r.default.string},l.defaultProps={className:"",style:{display:"block"},format:"auto",layout:"",layoutKey:"",responsive:"false"}},1176:(e,n,i)=>{var t=r(i(8265)),o=r(i(2115));function r(e){return e&&e.__esModule?e:{default:e}}var s={Google:t.default,Baidu:o.default};n.A=s},8453:(e,n,i)=>{i.d(n,{R:()=>s,x:()=>l});var t=i(6540);const o={},r=t.createContext(o);function s(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.