Grok 2

xAI chat Free

API ID: x-ai/grok-2

Input Price
Free
/1M tokens
Output Price
Free
/1M tokens

About Grok 2

Grok 2 is xAI's flagship conversational AI model, designed to provide helpful, witty, and informative responses with real-time knowledge access. Developed by Elon Musk's AI company, Grok features unique personality traits including humor and willingness to engage with unconventional questions. The model excels at general conversation, coding assistance, creative writing, and analysis tasks. Grok 2 has access to real-time information through X (Twitter) integration, enabling responses about current events and trending topics. It features a substantial context window and demonstrates strong performance on reasoning and coding benchmarks. The model is available through xAI's API and integrated into X Premium subscriptions. For users seeking an AI assistant with personality and current knowledge, Grok 2 offers a distinctive alternative to more conventional models. It's particularly valuable for applications requiring up-to-date information and engaging conversational style.

๐Ÿ†
Price Ranking
#1 lowest price among 599 Chat models โ€” Top 20% cheapest!

Model Specifications

Context Length
33k
Max Output
โ€”
Release Date
2024-10-12
Capabilities
chat
Input Modalities
text
Output Modalities
text

Best For

  • Conversations, content writing, general assistance

Consider Alternatives For

  • Image understanding (needs vision capability)
๐ŸŽ‰

This model is completely free!

No token costs - use it without worrying about API bills.

Estimate Token Usage

xAI Model Lineup

Compare all models from xAI to find the best fit

Model Input Output Context Capabilities
Grok 2 Current Free Free 33k chat
Grok 2 Vision 1212 Free Free 33k chat vision
Grok Vision Beta Free Free 8k chat vision
Grok 2 mini Free Free 33k chat
Grok 2 1212 Free Free 131k chat
Grok Beta Free Free 131k chat

Similar Models from Other Providers

Cross-brand alternatives with similar capabilities

Google Gemma 3 4B
Input: Free
Output: Free
Context: 96k
Alibaba Qwen Qwen2.5-VL 7B Instruct
Input: Free
Output: Free
Context: 33k
Meta Llama 3.1 405B Instruct
Input: Free
Output: Free
Context: 10k
Allen AI Molmo2 8B (free)
Input: Free
Output: Free
Context: 37k

๐Ÿš€ Quick Start

Get started with Grok 2 API

OpenAI-compatible SDK
from openai import OpenAI

client = OpenAI(
    base_url="https://api.provider.com/v1",
    api_key="YOUR_API_KEY"
)

response = client.chat.completions.create(
    model="x-ai/grok-2",
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)
print(response.choices[0].message.content)