Skip to main content

xAI Grok Connector

xAI Grok xAI Grok is an AI-powered component that provides advanced chat and image generation capabilities.

Connections

xAI Grok Connection

Connection to xAI Grok API using API key authentication

Navigate to xAI Grok API and generate an API key. Enter the key value into the connection configuration of the integration.

InputCommentsDefault
API KeyYour xAI Grok API key.

Actions

Create Chat Completion

Create a chat completion using xAI Grok

InputCommentsDefault
Connection
ModelModel name for the model to use. Obtainable here.
MessagesA list of messages that make up the the chat conversation. Different models support different message types, such as image and text.
TemperatureWhat 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.1
Top PAn alternative to sampling with Temperature, called nucleus sampling, where the model considers the results of the tokens with Top P probability mass. It is generally recommended to alter this or Temperature but not both.1
StreamIf set, partial message deltas will be sent.false
Additional FieldsAdditional fields that are not supported by the action inputs. See xAI API docs for possible values.

Create Message

Create a message using the Anthropic-compatible messages API endpoint

InputCommentsDefault
Connection
MessagesInput messages. See xAI API docs for possible values.
ModelModel name for the model to use. Obtainable here.grok-3-fast-latest
Max TokensThe maximum number of tokens to generate before stopping. The model may stop before the max_tokens when it reaches the stop sequence.100
Additional FieldsAdditional fields that are not supported by the action inputs. See xAI API docs for possible values.

Generate Image

Generate an image using xAI's image generation API

InputCommentsDefault
Connection
PromptThe text prompt to generate an image from.
ModelModel to be used.
Number of ImagesNumber of images to generate.
Additional FieldsAdditional fields that are not supported by the action inputs. See xAI API docs for possible values.

Get Model

Get details about a specific model

InputCommentsDefault
Connection
Model IDThe ID of the model to retrieve.

List Models

List all available models from xAI

InputCommentsDefault
Connection

Raw Request

Send raw HTTP request to xAI

InputCommentsDefault
Connection
URLInput the path only (/models), The base URL is already included (https://api.x.ai/v1). For example, to connect to https://api.x.ai/v1/models, only /models is entered in this field.
MethodThe HTTP method to use.
DataThe HTTP body payload to send to the URL.
Form DataThe Form Data to be sent as a multipart form upload.
File DataFile Data to be sent as a multipart form upload.
File Data File NamesFile names to apply to the file data inputs. Keys must match the file data keys above.
Query ParameterA 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.
HeaderA list of headers to send with the request.
Response TypeThe type of data you expect in the response. You can request json, text, or binary data.json
TimeoutThe maximum time that a client will await a response to its request
Retry Delay (ms)The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled.0
Retry On All ErrorsIf 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.false
Max Retry CountThe maximum number of retries to attempt. Specify 0 for no retries.0
Use Exponential BackoffSpecifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored.false