Setup
- Install
- Environment
Factory
string
required
Model ID (e.g.,
"grok-3", "grok-3-mini", "grok-2-vision", "grok-2").XAIConfig
Optional
{ apiKey?, baseURL? }.Supported Models
Basic Example
Tool Calling
Vision
Full Example
Reasoning
Grok usesreasoning_effort. Grok 4.5 and 4.6 ignore effort: "none" and "minimal" (the field is omitted). If the call is already on the Responses API, Agentium also requests encrypted reasoning content.