Skip to main content

xAI (Grok)

Connect to xAI's Grok models.

Configuration

FieldRequiredExample
Application NameYesmy-grok-app
Model NameYesgrok-3, grok-2
API KeyYesxai-...

Getting Your API Key

  1. Go to xAI Console
  2. Sign up or log in
  3. Navigate to API Keys
  4. Create and copy your API key
ModelDescription
grok-4.1Latest model with improved reasoning, reduced hallucinations
grok-4-1-fast-reasoningOptimized for tool use, web search, code execution
grok-4-1-fast-non-reasoningFast non-reasoning mode
grok-4"Most intelligent model in the world", native tool use
grok-4-fast40% fewer thinking tokens, 2M context window
grok-3Strong reasoning with 1M context window
grok-3-miniCost-efficient reasoning model

Note: Grok 4 was trained with reinforcement learning for native tool use including code interpreter and web browsing.

For the complete list of available models, visit the xAI Models Documentation.

Advanced Parameters

ParameterTypeDescription
max_tokensintegerMaximum tokens
temperaturefloatRandomness
top_pfloatNucleus sampling
frequency_penaltyfloatReduce repetition
presence_penaltyfloatEncourage new topics

Setup Steps

  1. Navigate to AI Applications → New Application
  2. Select Model Providers tab
  3. Click xAI (Grok)
  4. Enter your Application Name and API Key
  5. Select your desired Model Name
  6. Configure Advanced Settings (optional)
  7. Click Test Response to verify (optional)
  8. Review and submit