Skip to main content
xAI’s Grok models have access to real-time data from X (Twitter) and provide large context windows with strong reasoning capabilities.

Supported Models

Setup

1

Get an API key

Apply for API access at x.ai.
2

Set the environment variable

3

Verify

Environment Variables

string
required
Your xAI API key. Format: xai-...

Configuration Example

Model Aliases

Usage Examples

Notes

  • API endpoint: https://api.x.ai/v1 (OpenAI-compatible)
  • Status: Beta
  • Grok has access to real-time X/Twitter data, making it useful for current events queries.
  • xAI access is invitation-based and may have waitlist requirements.