xAI
A RocketRide LLM node that connects xAI Grok models to a pipeline.
What it does
Provides xAI's Grok models as an llm invoke connection for agents and other nodes that need a language model. The node can also be used directly via lanes: send text on the questions lane and receive a generated completion on the answers lane.
Uses langchain-xai (ChatXAI) under the hood. The chat client is always initialized with temperature=0, and max_tokens is set from the selected profile's output-token limit.
When the node config is saved, a minimal validation probe (a single-word prompt) is sent to the xAI API to verify the API key and model. Provider and HTTP errors are parsed into a readable Error <code>: <message> warning instead of failing silently.
Lanes
| Lane in | Lane out | Description |
|---|---|---|
questions | answers | Send a question directly, receive a generated answer |
Profiles
Default: Grok 3 (grok-3).
| Profile | Model | Context | Output |
|---|---|---|---|
grok-3 (default) | grok-3 | 131,072 | 131,072 |
grok-4-5 | grok-4.5 | 500,000 | 450,000 |
grok-4-20 | grok-4.20 | 2,000,000 | 1,800,000 |
grok-4-20-multi-agent | grok-4.20-multi-agent | 2,000,000 | 1,800,000 |
View 17 more models
| Profile | Model | Context | Output |
|---|---|---|---|
custom | (user-specified) | 131,072 | editable |
grok-4-1-fast-reasoning | grok-4-1-fast-reasoning | 2,000,000 | 4,096 |
grok-4-1-fast-non-reasoning | grok-4-1-fast-non-reasoning | 2,000,000 | 4,096 |
grok-code-fast-1 | grok-code-fast-1 | 256,000 | 10,000 |
grok-4-fast-reasoning | grok-4-fast-reasoning | 2,000,000 | 4,096 |
grok-4-fast-non-reasoning | grok-4-fast-non-reasoning | 2,000,000 | 4,096 |
grok-4 | grok-4-0709 | 256,000 | 256,000 |
grok-3-mini | grok-3-mini | 131,072 | 131,072 |
grok-3-beta (deprecated) | grok-3-beta | 131,072 | 131,072 |
grok-3-mini-beta (deprecated) | grok-3-mini-beta | 131,072 | 131,072 |
grok-4-1-fast (deprecated) | grok-4.1-fast | 2,000,000 | 30,000 |
grok-4-fast (deprecated) | grok-4-fast | 2,000,000 | 30,000 |
grok-4-3 | grok-4.3 | 1,000,000 | 900,000 |
grok-build-0-1 | grok-build-0.1 | 256,000 | 230,400 |
grok-latest | grok-latest | 500,000 | 450,000 |
grok-4-3-batch | grok-4.3:batch | 1,000,000 | 900,000 |
grok-4-6 | grok-4.6 | 500,000 | 450,000 |
The grok-3-beta, grok-3-mini-beta, grok-4-fast, grok-4-1-fast,
grok-4-20, and grok-4-20-multi-agent profiles use OpenRouter-style model
IDs and expose the API key field for that source.
Configuration
Choose a profile to set the model, context limit, and output limit. Built-in profiles keep those values fixed, while custom exposes the model ID and context limit for another xAI model.
Custom models
For custom, enter an xAI model ID and a positive context limit. The initial context value is 131,072 tokens; the output limit is not preset.
Authentication
For xAI-hosted profiles, provide an xAI API key in the apikey field. The key is validated at pipeline start: it must begin with the xai- prefix, otherwise the node raises Invalid XAI API key format, please check your API key. OpenRouter-sourced profiles use the key field exposed for that source instead.
The key is also checked at save time with a minimal probe request, so invalid keys, unknown models, or network problems surface as warnings in the UI before the pipeline runs.
Upstream docs
Schema
| Field | Type | Description | Default |
|---|---|---|---|
model | string | Model xAI model | |
modelTotalTokens | number | Tokens Total Tokens | |
xai.profile | string | Model LLM model | "grok-3" |
Dependencies
langchain-xailangchain-corelangchain