{"id":626,"date":"2026-03-21T22:52:57","date_gmt":"2026-03-21T14:52:57","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/providers-google\/"},"modified":"2026-03-21T23:08:55","modified_gmt":"2026-03-21T15:08:55","slug":"providers-google","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/providers-google\/","title":{"rendered":"Google (Gemini)"},"content":{"rendered":"<h1>Google (Gemini)<\/h1>\n<p>The Google plugin provides access to Gemini models through Google AI Studio, plus<br \/>\nimage generation, media understanding (image\/audio\/video), and web search via<br \/>\nGemini Grounding.<\/p>\n<ul>\n<li>Provider: <code>google<\/code><\/li>\n<li>Auth: <code>GEMINI_API_KEY<\/code> or <code>GOOGLE_API_KEY<\/code><\/li>\n<li>API: Google Gemini API<\/li>\n<li>Alternative provider: <code>google-gemini-cli<\/code> (OAuth)<\/li>\n<\/ul>\n<h2>Quick start<\/h2>\n<ol>\n<li>Set the API key:<\/li>\n<\/ol>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw onboard &#8211;auth-choice google-api-key<\/p>\n<pre><code>\n2. Set a default model:\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  agents: {\n    defaults: {\n      model: { primary: &quot;google\/gemini-3.1-pro-preview&quot; },\n    },\n  },\n}\n<\/code><\/pre>\n<h2>Non-interactive example<\/h2>\n<p><code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\nopenclaw onboard --non-interactive<br \/>\n  --mode local<br \/>\n  --auth-choice google-api-key<br \/>\n  --gemini-api-key \"$GEMINI_API_KEY\"<\/code><\/p>\n<h2>OAuth (Gemini CLI)<\/h2>\n<p>An alternative provider <code>google-gemini-cli<\/code> uses PKCE OAuth instead of an API<br \/>\nkey. This is an unofficial integration; some users report account<br \/>\nrestrictions. Use at your own risk.<\/p>\n<p>Environment variables:<\/p>\n<ul>\n<li><code>OPENCLAW_GEMINI_OAUTH_CLIENT_ID<\/code><\/li>\n<li><code>OPENCLAW_GEMINI_OAUTH_CLIENT_SECRET<\/code><\/li>\n<\/ul>\n<p>(Or the <code>GEMINI_CLI_*<\/code> variants.)<\/p>\n<h2>Capabilities<\/h2>\n<table>\n<thead>\n<tr>\n<th>Capability<\/th>\n<th>Supported<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Chat completions<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>Image generation<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>Image understanding<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>Audio transcription<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>Video understanding<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>Web search (Grounding)<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>Thinking\/reasoning<\/td>\n<td>Yes (Gemini 3.1+)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Environment note<\/h2>\n<p>If the Gateway runs as a daemon (launchd\/systemd), make sure <code>GEMINI_API_KEY<\/code><br \/>\nis available to that process (for example, in <code>~\/.openclaw\/.env<\/code> or via<br \/>\n<code>env.shellEnv<\/code>).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google (Gemini) The Google plugin provides access to Ge [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-626","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/626","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/comments?post=626"}],"version-history":[{"count":2,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/626\/revisions"}],"predecessor-version":[{"id":720,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/626\/revisions\/720"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=626"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=626"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=626"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}