xAI Grok
Sinaptic® DROID+ supports xAI's Grok models via the xAI API, which is OpenAI-compatible.
Setup
- Get an API key from console.x.ai
- Add it to your environment or
.envfile:
export GROK_API_KEY=xai-...
- Configure in
droid.yaml:
grok:
base_url: "https://api.x.ai/v1"
api_key: "${GROK_API_KEY}"
Agent Config
name: "grok-agent"
model:
provider: "grok"
name: "grok-2"
max_tokens: 2048
temperature: 0.7
Available Models
| Model | Best for | Context |
|---|---|---|
grok-2 | General purpose, strong reasoning | 128K |
grok-2-mini | Fast, cost-effective | 128K |
Check xAI's documentation for the latest models.
Notes
- The xAI API is OpenAI-compatible, so Grok works seamlessly with Sinaptic® DROID+ function calling and tools.
- Grok models have real-time knowledge capabilities depending on the model version.
- Sinaptic® DROID+ routes requests to the xAI endpoint when an agent specifies
provider: "grok".