{"id":632,"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-xai\/"},"modified":"2026-03-21T23:08:57","modified_gmt":"2026-03-21T15:08:57","slug":"providers-xai","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/providers-xai\/","title":{"rendered":"xAI"},"content":{"rendered":"<h1>xAI<\/h1>\n<p>OpenClaw ships a bundled <code>xai<\/code> provider plugin for Grok models.<\/p>\n<h2>Setup<\/h2>\n<ol>\n<li>Create an API key in the xAI console.<\/li>\n<li>Set <code>XAI_API_KEY<\/code>, or run:<\/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 xai-api-key<\/p>\n<pre><code>\n3. Pick a model such as:\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  agents: { defaults: { model: { primary: &quot;xai\/grok-4&quot; } } },\n}\n<\/code><\/pre>\n<h2>Current bundled model catalog<\/h2>\n<p>OpenClaw now includes these xAI model families out of the box:<\/p>\n<ul>\n<li><code>grok-4<\/code>, <code>grok-4-0709<\/code><\/li>\n<li><code>grok-4-fast-reasoning<\/code>, <code>grok-4-fast-non-reasoning<\/code><\/li>\n<li><code>grok-4-1-fast-reasoning<\/code>, <code>grok-4-1-fast-non-reasoning<\/code><\/li>\n<li><code>grok-4.20-reasoning<\/code>, <code>grok-4.20-non-reasoning<\/code><\/li>\n<li><code>grok-code-fast-1<\/code><\/li>\n<\/ul>\n<p>The plugin also forward-resolves newer <code>grok-4*<\/code> and <code>grok-code-fast*<\/code> ids when<br \/>\nthey follow the same API shape.<\/p>\n<h2>Web search<\/h2>\n<p>The bundled <code>grok<\/code> web-search provider uses <code>XAI_API_KEY<\/code> too:<\/p>\n<p><code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\nopenclaw config set tools.web.search.provider grok<\/code><\/p>\n<h2>Known limits<\/h2>\n<ul>\n<li>Auth is API-key only today. There is no xAI OAuth\/device-code flow in OpenClaw yet.<\/li>\n<li><code>grok-4.20-multi-agent-experimental-beta-0304<\/code> is not supported on the normal xAI provider path because it requires a different upstream API surface than the standard OpenClaw xAI transport.<\/li>\n<li>Native xAI server-side tools such as <code>x_search<\/code> and <code>code_execution<\/code> are not yet first-class model-provider features in the bundled plugin.<\/li>\n<\/ul>\n<h2>Notes<\/h2>\n<ul>\n<li>OpenClaw applies xAI-specific tool-schema and tool-call compatibility fixes automatically on the shared runner path.<\/li>\n<li>For the broader provider overview, see <a href=\"\/providers\/index\">Model providers<\/a>.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>xAI OpenClaw ships a bundled xai provider plugin for Gr [&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-632","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/632","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=632"}],"version-history":[{"count":2,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/632\/revisions"}],"predecessor-version":[{"id":732,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/632\/revisions\/732"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=632"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=632"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}