Skip to content

Sign in with X (Grok)

xAI Grok supports a keyless sign-in flow called “Sign in with X.” Instead of generating and copying an API key from the xAI console, you authenticate through your X (formerly Twitter) account with OAuth. The result is the same as a connected API key: the Grok model family becomes available in the model picker for any conversation.

  1. Open Settings > Models.
  2. Find the xAI Grok card and choose Manage.
  3. Click Sign in with X (Grok).
  4. Wayland opens your system browser to the xAI authorization page. Sign in with your X account or approve the already-signed-in session.
  5. The browser tab closes automatically and Wayland shows a Signed in with X confirmation.

The flow uses OAuth 2.0 Authorization Code with PKCE against accounts.x.ai. No credential ever touches the clipboard. Wayland stores only an encrypted refresh token in your OS keychain, not your X password.

Once connected, the xAI Grok card in Settings > Models shows a “Signed in with X” row with a green check. A small Reconnect button is available if you want to re-run the flow, for example after changing your X account or if the session expires.

Wayland silently refreshes the access token when it nears expiry, so you do not need to repeat the sign-in for routine use.

The connected xAI provider gives you access to the Grok model family (for example, grok-3, grok-3-mini, and any models xAI adds to the api.x.ai/v1 endpoint). Select them from the model picker in any conversation.

If you prefer not to use OAuth, you can also connect xAI by pasting an xai-... API key directly in the credential form. The two methods use the same xai provider slot, so they are mutually exclusive: connecting one replaces the other.

To disconnect, open Settings > Models, find xAI Grok, choose Manage, and use the Disconnect option. This removes the stored token. The provider reverts to disconnected state and no requests are sent to xAI until you reconnect.