How to connect Grok (xAI)

About 4 minutes · 6 steps · no technical knowledge needed

  1. Go to console.x.ai and sign in. You can use the same X account you already have.
    about 30 seconds
  2. No account? Choose "Sign up". xAI is pay-as-you-go, so you will be asked for a payment method before a key will work.
    about 2 min
  3. In the left-hand menu choose "API Keys".
    about 10 seconds
  4. Press "Create API Key" and give it a name you will recognise later -- "Julia" does the job.
    about 20 seconds
  5. Copy the key the moment it appears. It starts with xai- and it is shown once.
    about 15 seconds
  6. Paste it into the box below and press "Test connection".
    about 15 seconds

What Julia will ask you for

API key Starts with xai-

If something goes wrong

If it says the key is wrong: copy it again and check there is no space at the start or end. A key pasted from an email often picks one up.

The key is shown ONCE. If you closed the page without copying it, delete that key and make a new one -- you cannot look the old one up.

If it says billing or quota: add a payment method on the provider's own site. Julia cannot add credit on your behalf.

Open Grok (xAI)