1"use strict";(self.webpackChunkembedded_workflow_builder_docs=self.webpackChunkembedded_workflow_builder_docs||[]).push([["6835"],{85531(e,n,t){t.r(n),t.d(n,{metadata:()=>s,default:()=>h,frontMatter:()=>i,contentTitle:()=>l,toc:()=>a,assets:()=>o});var s=JSON.parse('{"id":"connectors/xai-grok","title":"xAI Grok Connector","description":"xAI Grok is an AI-powered component that provides advanced chat and image generation capabilities.","source":"@site/docs/connectors/xai-grok.md","sourceDirName":"connectors","slug":"/connectors/xai-grok","permalink":"/connectors/xai-grok","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"xAI Grok Connector","sidebar_label":"xAI Grok","description":"xAI Grok is an AI-powered component that provides advanced chat and image generation capabilities."},"sidebar":"docs","previous":{"title":"Workday (Beta)","permalink":"/connectors/workday"},"next":{"title":"Xero","permalink":"/connectors/xero"}}'),r=t(74848),d=t(28453);let i={title:"xAI Grok Connector",sidebar_label:"xAI Grok",description:"xAI Grok is an AI-powered component that provides advanced chat and image generation capabilities."},l,o={},a=[{value:"API Documentation",id:"api-documentation",level:2},{value:"Connections",id:"connections",level:2},{value:"xAI Grok",id:"xaigrokconnection",level:3},{value:"Actions",id:"actions",level:2},{value:"Create Chat Completion",id:"createchatcompletion",level:3},{value:"Create Message",id:"createmessage",level:3},{value:"Generate Image",id:"generateimage",level:3},{value:"Get Model",id:"getmodel",level:3},{value:"List Models",id:"listmodels",level:3},{value:"Raw Request",id:"rawrequest",level:3}];function c(e){let n={a:"a",code:"code",h2:"h2",h3:"h3",img:"img",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.img,{alt:"xAI Grok",src:t(52679).A+"#connector-icon",width:"32",height:"32"}),"\n",(0,r.jsx)(n.a,{href:"https://x.ai/",children:"xAI Grok"})," is an advanced AI model developed by xAI, offering powerful chat completions and image generation capabilities."]}),"\n",(0,r.jsx)(n.p,{children:"Use the component to generate AI-powered text responses and create images from text prompts."}),"\n",(0,r.jsx)(n.h2,{id:"api-documentation",children:"API Documentation"}),"\n",(0,r.jsxs)(n.p,{children:["This component was built using the ",(0,r.jsx)(n.a,{href:"https://docs.x.ai/docs/overview",children:"xAI API"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"connections",children:"Connections"}),"\n",(0,r.jsx)(n.h3,{id:"xaigrokconnection",children:"xAI Grok"}),"\n",(0,r.jsx)(n.p,{children:"Connection to xAI Grok API using API key authentication"}),"\n",(0,r.jsxs)(n.p,{children:["Navigate to ",(0,r.jsx)(n.a,{href:"https://x.ai/api",children:"xAI Grok API"})," and generate an API key.\nEnter the key value into the connection configuration of the integration."]}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Input"}),(0,r.jsx)(n.th,{children:"Comments"}),(0,r.jsx)(n.th,{children:"Default"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"API Key"}),(0,r.jsx)(n.td,{children:"Your xAI Grok API key."}),(0,r.jsx)(n.td,{})]})})]}),"\n",(0,r.jsx)(n.h2,{id:"actions",children:"Actions"}),"\n",(0,r.jsx)(n.h3,{id:"createchatcompletion",children:"Create Chat Completion"}),"\n",(0,r.jsx)(n.p,{children:"Create a chat completion using xAI Grok"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Input"}),(0,r.jsx)(n.th,{children:"Comments"}),(0,r.jsx)(n.th,{children:"Default"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Connection"}),(0,r.jsx)(n.td,{}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Model"}),(0,r.jsxs)(n.td,{children:["Model name for the model to use. Obtainable ",(0,r.jsx)(n.a,{href:"https://docs.x.ai/docs/models",children:"here"}),"."]}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Messages"}),(0,r.jsx)(n.td,{children:"A list of messages that make up the the chat conversation. Different models support different message types, such as image and text."}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Temperature"}),(0,r.jsx)(n.td,{children:"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic."}),(0,r.jsx)(n.td,{children:"1"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Top P"}),(0,r.jsxs)(n.td,{children:["An alternative to sampling with ",(0,r.jsx)(n.code,{children:"Temperature"}),", called nucleus sampling, where the model considers the results of the tokens with ",(0,r.jsx)(n.code,{children:"Top P"})," probability mass. It is generally recommended to alter this or ",(0,r.jsx)(n.code,{children:"Temperature"})," but not both."]}),(0,r.jsx)(n.td,{children:"1"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Stream"}),(0,r.jsx)(n.td,{children:"If set, partial message deltas will be sent."}),(0,r.jsx)(n.td,{children:"false"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Additional Fields"}),(0,r.jsxs)(n.td,{children:["Additional fields that are not supported by the action inputs. See ",(0,r.jsx)(n.a,{href:"https://docs.x.ai/docs/api-reference#chat-completions",children:"xAI API docs"})," for possible values."]}),(0,r.jsx)(n.td,{})]})]})]}),"\n",(0,r.jsx)(n.h3,{id:"createmessage",children:"Create Message"}),"\n",(0,r.jsx)(n.p,{children:"Create a message using the Anthropic-compatible messages API endpoint"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Input"}),(0,r.jsx)(n.th,{children:"Comments"}),(0,r.jsx)(n.th,{children:"Default"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Connection"}),(0,r.jsx)(n.td,{}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Messages"}),(0,r.jsxs)(n.td,{children:["Input messages. See ",(0,r.jsx)(n.a,{href:"https://docs.x.ai/docs/api-reference#messages-anthropic-compatible",children:"xAI API docs"})," for possible values."]}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Model"}),(0,r.jsxs)(n.td,{children:["Model name for the model to use. Obtainable ",(0,r.jsx)(n.a,{href:"https://docs.x.ai/docs/models",children:"here"}),"."]}),(0,r.jsx)(n.td,{children:"grok-3-fast-latest"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Max Tokens"}),(0,r.jsx)(n.td,{children:"The maximum number of tokens to generate before stopping. The model may stop before the max_tokens when it reaches the stop sequence."}),(0,r.jsx)(n.td,{children:"100"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Additional Fields"}),(0,r.jsxs)(n.td,{children:["Additional fields that are not supported by the action inputs. See ",(0,r.jsx)(n.a,{href:"https://docs.x.ai/docs/api-reference#messages-anthropic-compatible",children:"xAI API docs"})," for possible values."]}),(0,r.jsx)(n.td,{})]})]})]}),"\n",(0,r.jsx)(n.h3,{id:"generateimage",children:"Generate Image"}),"\n",(0,r.jsx)(n.p,{children:"Generate an image using xAI's image generation API"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Input"}),(0,r.jsx)(n.th,{children:"Comments"}),(0,r.jsx)(n.th,{children:"Default"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Connection"}),(0,r.jsx)(n.td,{}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Prompt"}),(0,r.jsx)(n.td,{children:"The text prompt to generate an image from."}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Model"}),(0,r.jsx)(n.td,{children:"Model to be used."}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Number of Images"}),(0,r.jsx)(n.td,{children:"Number of images to generate."}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Additional Fields"}),(0,r.jsxs)(n.td,{children:["Additional fields that are not supported by the action inputs. See ",(0,r.jsx)(n.a,{href:"https://docs.x.ai/docs/api-reference#image-generations",children:"xAI API docs"})," for possible values."]}),(0,r.jsx)(n.td,{})]})]})]}),"\n",(0,r.jsx)(n.h3,{id:"getmodel",children:"Get Model"}),"\n",(0,r.jsx)(n.p,{children:"Get details about a specific model"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Input"}),(0,r.jsx)(n.th,{children:"Comments"}),(0,r.jsx)(n.th,{children:"Default"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Connection"}),(0,r.jsx)(n.td,{}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Model ID"}),(0,r.jsx)(n.td,{children:"The ID of the model to retrieve."}),(0,r.jsx)(n.td,{})]})]})]}),"\n",(0,r.jsx)(n.h3,{id:"listmodels",children:"List Models"}),"\n",(0,r.jsx)(n.p,{children:"List all available models from xAI"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Input"}),(0,r.jsx)(n.th,{children:"Comments"}),(0,r.jsx)(n.th,{children:"Default"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Connection"}),(0,r.jsx)(n.td,{}),(0,r.jsx)(n.td,{})]})})]}),"\n",(0,r.jsx)(n.h3,{id:"rawrequest",children:"Raw Request"}),"\n",(0,r.jsx)(n.p,{children:"Send raw HTTP request to xAI"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Input"}),(0,r.jsx)(n.th,{children:"Comments"}),(0,r.jsx)(n.th,{children:"Default"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Connection"}),(0,r.jsx)(n.td,{}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"URL"}),(0,r.jsxs)(n.td,{children:["Input the path only (/models), The base URL is already included (",(0,r.jsx)(n.a,{href:"https://api.x.ai/v1",children:"https://api.x.ai/v1"}),"). For example, to connect to ",(0,r.jsx)(n.a,{href:"https://api.x.ai/v1/models",children:"https://api.x.ai/v1/models"}),", only /models is entered in this field."]}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Method"}),(0,r.jsx)(n.td,{children:"The HTTP method to use."}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Data"}),(0,r.jsx)(n.td,{children:"The HTTP body payload to send to the URL."}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Form Data"}),(0,r.jsx)(n.td,{children:"The Form Data to be sent as a multipart form upload."}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"File Data"}),(0,r.jsx)(n.td,{children:"File Data to be sent as a multipart form upload."}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"File Data File Names"}),(0,r.jsx)(n.td,{children:"File names to apply to the file data inputs. Keys must match the file data keys above."}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Query Parameter"}
1),(0,r.jsx)(n.td,{children:"A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2."}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Header"}),(0,r.jsx)(n.td,{children:"A list of headers to send with the request."}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Response Type"}),(0,r.jsx)(n.td,{children:"The type of data you expect in the response. You can request json, text, or binary data."}),(0,r.jsx)(n.td,{children:"json"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Timeout"}),(0,r.jsx)(n.td,{children:"The maximum time that a client will await a response to its request"}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Retry Delay (ms)"}),(0,r.jsx)(n.td,{children:"The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled."}),(0,r.jsx)(n.td,{children:"0"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Retry On All Errors"}),(0,r.jsx)(n.td,{children:"If true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors."}),(0,r.jsx)(n.td,{children:"false"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Max Retry Count"}),(0,r.jsx)(n.td,{children:"The maximum number of retries to attempt. Specify 0 for no retries."}),(0,r.jsx)(n.td,{children:"0"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Use Exponential Backoff"}),(0,r.jsx)(n.td,{children:"Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored."}),(0,r.jsx)(n.td,{children:"false"})]})]})]})]})}function h(e={}){let{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},52679(e,n,t){t.d(n,{A:()=>s});let s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsSAAALEgHS3X78AAAEZklEQVRYhcVWSyh1XxQ/3s9kgFImMvMaeL8HlLzNGMjAM4TCzMSARGFEmZBHrkSRASkjKeEOCAOS5JFXSN7uY/377b+9O+fcc+71fX1936rdPmfvvdb67bX3+q0tEdHV324Wi0V8S/SP5PX1lSwWCwGA9XebxWIR7Sfr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GhmuDtZoHRaGTK5eXljFBgHDk/Pj7OOAK8DtqtqalhqYUe1Y875TuH893dXV3nCgByIsKFaWhoEP+Yq6ioEBXO3nOMv5pQiPAItedcAJCX2ebmZuro6BAR4eN4+U5NTVFGRoZ4HakbKmd2djYtLi46LN82ACB4sQ4PD+uSCwRjyG+AwfseYHt7e2lmZobdDS56maJ7BAaDQbNcykUPlBqgnr4ugO3tbfYI4cgdCX+CIQVxSdGra8GPAZhMJvaG+6nzPy2a1fBvyn8o2n7cO3ueJQAAAABJRU5ErkJggg=="},28453(e,n,t){t.d(n,{R:()=>i,x:()=>l});var s=t(96540);let r={},d=s.createContext(r);function i(e){let n=s.useContext(d);return s.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(r):e.components||r:i(e.components),s.createElement(d.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.