xAI Provider

xAI is exposed as a named preset over SwarmVault's OpenAI-compatible adapter. xAI provides access to the Grok family of models.

Configuration

{
  "providers": {
    "primary": {
      "type": "xai",
      "model": "grok-3-mini"
    }
  }
}

Options

FieldDefaultDescription
model--Model ID (e.g., grok-3-mini, grok-3)
apiKeyEnv"XAI_API_KEY"Environment variable for API key
baseUrlhttps://api.x.ai/v1API base URL
apiStyle"chat"API style (chat for Chat Completions)
capabilities--Override auto-detected capabilities

Environment Variable

export XAI_API_KEY=xai-...

Notes

  • Grok models: xAI offers the Grok family with both full and mini variants. The mini variants are faster and cheaper while still capable for most vault operations.
  • Vision: Some Grok models support vision capabilities. If your model supports image input, it can serve as your visionProvider for image-based extraction.