xAI just made it easier for developers to plug its Grok AI models into their coding workflow. The company announced that SuperGrok and X Premium subscribers can now use Grok directly inside OpenCode, a terminal-based coding agent, without needing a separate API key.
If you already pay for Grok or X Premium, you can now get AI coding assistance in OpenCode at no extra cost. No additional subscriptions, no fumbling with API credentials. Just an OAuth login and you’re in.
How the integration works
OpenCode, which operates at opencode.ai, is a terminal-based coding agent that competes with tools like Cursor, Claude Code, and GitHub Copilot. The new integration lets users run a simple /connect command to link their xAI services via OAuth authentication.
Once connected, developers can select and activate whichever Grok model they want to use. Previously, using Grok models in third-party tools meant generating and managing an XAI_API_KEY. That friction is now gone for anyone with an existing subscription.











