xAI Grok API Key Tester

Test any AI or API key in your browser — instantly see if it's valid, and why it isn't. Nothing is stored.

Test your xAI Grok API key (api.x.ai) with the models endpoint. Note: xAI Grok is NOT the same as Groq — if you have a gsk_ key, use the Groq tester instead.

Data verified 2026-07-13

Key format & how to get one

Prefix: xai- Example: xai-abc123... xAI Grok keys start with xai- and are used at api.x.ai. This is not Groq (gsk_ keys at console.groq.com). 1. Sign in at https://console.x.ai 2. Open API Keys and create a key 3. Copy the key (starts with xai-) 4. xAI Grok (api.x.ai) is different from Groq (console.groq.com)

How to test

  1. Copy your key from console.x.ai (it starts with xai-).
  2. Paste it into the tester above and click Test Key.
  3. Green means valid; red shows the error. A 400/401 often means a Groq key was used by mistake.

Common errors

CauseFix
The key is malformed, or you're using a Groq (gsk_) key by mistake.Use an xai- key from console.x.ai. For gsk_ keys, use the Groq tester.
Invalid or revoked xAI key.Create a new key at console.x.ai and paste it here.
Rate limit exceeded.Wait a few seconds and retry.

xAI Grok API docs →

Related tools

Building with AI APIs? Elegant Atomics turns AI capability into B2B SaaS growth. Work with us →