About Grok

Grok by xAI offers cutting-edge AI models with real-time search integration, multimodal capabilities, and advanced reasoning. Known for its unique personality and up-to-date information access, Grok excels at complex tasks and creative problem-solving.

Latest models available:

  • Grok 4: Most intelligent model with native tool use and real-time search
  • Grok 4 Heavy: Enhanced version with superior reasoning capabilities
  • Grok 4 Fast: Optimized for speed while maintaining high quality
  • Grok 2: Advanced conversational model with multimodal support

Key features:

  • Real-time search integration
  • Native tool use capabilities
  • Multimodal input (text, images)
  • Image generation capabilities
  • Advanced reasoning
  • Up-to-date information access
  • Creative and personality-driven responses
  • OpenAI SDK compatibility
  • High context understanding
  • Code generation and debugging

Step by step guide to use Grok API Key to chat with AI

1. Get Your Grok API Key

First, you'll need to obtain an API key from Grok. This key allows you to access their AI models directly and pay only for what you use.

  1. Visit Grok's API console
  2. Sign up or log in to your account
  3. Navigate to the API keys section
  4. Generate a new API key (copy it immediately as some providers only show it once)
  5. Save your API key in a secure password manager or encrypted note
Sometimes, this provider will require you to add a payment method to your account before you can use your API key to chat with AI. So, to avoid any hiccups, make sure you’ve got a payment method set up and ready to go!
Important: Keep your API key secure and never share it publicly. Store it safely as you'll need it to connect with TypingMind.

2. Connect Your Grok API Key on TypingMind

Once you have your Grok API key, connecting it to TypingMind to chat with AI is straightforward:

  1. Open TypingMind in your browser
  2. Click the "Settings" icon (gear symbol)
  3. Navigate to "Models" section
  4. Click "Add Custom Model"
  5. Fill in the model information:
    Name: grok-4-0709 via Grok (or your preferred name)
    Endpoint: https://api.x.ai/v1/chat/completions
    Model ID: grok-4-0709 for example (check Grok model list)
    Context Length: Enter the model's context window (e.g., 32000 for grok-4-0709)
    Grok Endpoint URL input fieldgrok-4-0709https://api.x.ai/v1/chat/completionsgrok-4-0709 via Grokhttps://www.typingmind.com/model-logo.webp32000
  6. Add custom headers by clicking "Add Custom Headers" in the Advanced Settings section:
    Authorization: Bearer <GROK_API_KEY>:
    X-Title: typingmind.com
    HTTP-Referer: https://www.typingmind.com
  7. Enable "Support Plugins (via OpenAI Functions)" if the model supports the "functions" or "tool_calls" parameter, or enable "Support OpenAI Vision" if the model supports vision.
  8. Click "Test" to verify the configuration
  9. If you see "Nice, the endpoint is working!", click "Add Model"

3. Start Chatting with Grok models

Now you can start chatting with Grok models through TypingMind:

  • Select your preferred Grok model from the model dropdown menu
  • Start typing your message in the chat input
  • Enjoy faster responses and better features than the official interface
  • Switch between different AI models as needed
The best frontend AI chat for Grok API KeyThe best frontend AI chat for Grok API KeyGrok 4The best frontend AI chat for Grok API Key
Pro tips for better results:

4. Monitor Your AI Usage and Costs

One of the biggest advantages of using API keys with TypingMind is cost transparency and control. Unlike fixed subscriptions, you pay only for what you actually use. Visit https://console.x.ai/team/default/usage to monitor your Grok API usage and set spending limits.

Grok Subscriptions vs. Grok API Keys — Complete comparison:
FeatureGrok Subscription PlansUsing Grok API Keys
Cost Structure❌ Fixed monthly fee
Pay even if you don't use it
SuperGrok:$30/month or $300/year
✅ Pay only for actual usage
$0 when you don't use it
Usage Limits ❌ Hard daily/hourly caps
You have to wait for the next period to use it again
✅ Unlimited usage
No limits. Only limited by your budget
Model Access ❌ Platform decides available models
Old models get discontinued
✅ Access to all API models
Including older & specialized versions
💡 Cost-saving tips:
  • Use less expensive models for simple tasks
  • Keep prompts concise but specific to reduce token usage
  • Use TypingMind's prompt caching to reduce repeat costs (How to enable prompt caching)
  • Using RAG (retrieval-augmented generation) for large documents to reduce repeat costs (How to use RAG)