Integrations / Provider Guides
xAI (Grok)
Connect Aurora to xAI's Grok models over the OpenAI-compatible endpoint.
Browse docs
Use this provider to route to xAI's Grok models. Aurora talks to xAI through the standard OpenAI-compatible endpoint.
Activate
text
XAI_API_KEY=xai-...Restart Aurora. The xai provider appears at /v1/models with the current Grok catalog.
Default models
Override with XAI_MODELS=grok-4,grok-3,grok-3-mini.
Multiple instances
text
XAI_PROD_API_KEY=xai-...
XAI_STAGING_API_KEY=xai-...Aurora exposes them as xai-prod and xai-staging.
Custom base URL
text
XAI_BASE_URL=https://api.x.ai/v1Gotchas
- Live search — Grok's
searchandx_searchtools are not in the OpenAI-compatible surface. Use provider passthrough at/p/xai/*to call the native Grok API for those tools. - Reasoning models —
grok-3-miniand reasoning-enabled Grok models returnreasoning_contentdeltas. Aurora preserves them. - Image generation — Grok's
grok-2-imageis exposed via the native API, not the OpenAI surface. Use passthrough. - Function calling — full support, no quirks.
- Prompt caching — not supported by xAI. Use Aurora's semantic cache if you need replay.
Sample request
text
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AURORA_MASTER_KEY" \
-d '{
"model": "xai/grok-4",
"messages": [{"role": "user", "content": "Hello from Aurora"}]
}'Related
- Providers Overview
- Passthrough API — for native Grok tools