AI Tools & API Keys

How to Get a Grok API Key

Step-by-step instructions to create a Grok or xAI API key in the xAI Console, including account setup, billing, and safe key usage for apps.

Collab365 Team · Published 18 May 2026 · 1 min read

Use this guide if an app asks you for a Grok API key or xAI API key.

Grok's API is provided by xAI, so the key comes from the xAI Console.

What You Need

  • An xAI account.
  • API credits or billing set up in the xAI Console.
  • Somewhere safe to paste the key after you create it.

Step by Step

  1. Go to console.x.ai.
  2. Sign in or create an xAI account.
  3. If prompted, finish account setup.
  4. Add credits or set up billing if xAI asks for it before API use.
  5. Open the API keys area in the xAI Console. You can also start from the official xAI docs link: Create API key.
  6. Choose the option to create a new API key.
  7. Give the key a clear name, such as "My app" or the name of the tool you are connecting.
  8. Create the key.
  9. Copy the key immediately.
  10. Paste it into the app or service that asked for your Grok or xAI key.
  11. Save your changes in that app.

If You Cannot Create a Key

Check these common issues:

  • Your xAI account may not have billing or credits yet.
  • You may be signed into the wrong xAI account.
  • The console may require you to finish account setup first.
  • Your browser may be blocking pop-ups or sign-in cookies.

Important Safety Notes

Treat the key like a password. Anyone with the key may be able to use your xAI account's API access.

If the key is exposed, delete it in the xAI Console and create a new one.

Official Source

xAI's official quickstart says to sign up at xAI, load the account with credits, and create an API key from the API Keys page in the xAI Console.

Source: xAI quickstart