---
title: "Grok 4 Fast + OpenClaw: Setup, Pricing & When to Use It"
description: "Grok 4 Fast costs $0.20/M input with 2M context. Here's how to set it up in OpenClaw, when it beats Gemini Flash, and when to upgrade to Grok 4."
date: 2026-03-12
updatedDate: 2026-03-24
image: /images/models/provider-xai-hero.jpg
keywords: "grok 4 fast openclaw, grok 4 fast pricing, grok 4 fast review, xai openclaw, grok 4 fast api"
category: model-guide
modelData:
  provider: "xAI"
  provider_slug: "xai"
  full_id: "xai/grok-4-fast"
  input_cost_per_1m: 0.2
  output_cost_per_1m: 0.5
  max_input_tokens: 2000000
  max_output_tokens: 30000
  features: ["function_calling", "vision", "reasoning", "web_search"]
  parameter_count: null
  architecture: null
  license: null
faq:
  - question: "What is the exact pricing for Grok 4 Fast?"
    answer: "Input costs $0.2 per million tokens and output costs $0.5 per million tokens."
  - question: "How large is the context window?"
    answer: "The model supports a context window of up to 2,000,000 tokens."
  - question: "What is the maximum response length?"
    answer: "The model can generate up to 30,000 tokens in a single output response."
---

Current as of March 2026. Grok 4 Fast is xAI's budget-friendly powerhouse, designed for high-throughput tasks that require a massive 2M token context window. It targets developers who need to process large datasets without the premium pricing of flagship models.

## Specs

| | |
|---|---|
| **Provider** | xAI |
| **Input cost** | $0.20 / M tokens |
| **Output cost** | $0.50 / M tokens |
| **Context window** | 2M tokens |
| **Max output** | 30K tokens |
| **Parameters** | N/A |
| **Features** | function_calling, vision, reasoning, web_search |

## What it's good at

#### Aggressive Pricing

At $0.2 per million input tokens and $0.5 per million output tokens, it is one of the most cost-effective models in its performance class.

#### Massive 2M Context

The 2 million token context window allows for ingesting entire codebases or hundreds of PDF documents in a single request.

#### Large Output Buffer

A 30K max output token limit is significantly higher than the 4K-8K limits found in many competing fast models.

## Where it falls short

#### Reasoning Depth

It lacks the deep logical reasoning capabilities of Claude 3.5 Sonnet or the full Grok 4 model, occasionally failing on complex multi-step instructions.

#### Proprietary Constraints

The model is closed-source and proprietary, meaning you are fully dependent on xAI's API availability and privacy policies.

## Best use cases with OpenClaw

- **High-Volume Data Summarization** — The low cost and 2M context window make it perfect for summarizing thousands of pages of text at once.
- **Web-Search Agents** — Integrated web_search features combined with low latency allow OpenClaw agents to perform real-time research efficiently.

## Not ideal for

- **Complex Software Architecture** — It can miss subtle logical dependencies in large codebases that a more reasoning-heavy model would catch.
- **Privacy-Critical Local Apps** — Since it requires an external API call to xAI, it is not suitable for air-gapped or strictly local environments.

## OpenClaw setup

Use the OpenAI provider configuration in OpenClaw, but set the base URL to https://api.x.ai/v1 and provide your xAI API key. Ensure the model ID is set exactly to xai/grok-4-fast.

```json
{
  "models": {
    "mode": "merge",
    "providers": {
      "xai": {
        "baseUrl": "https://api.x.ai/v1",
        "apiKey": "YOUR-XAI-API-KEY",
        "api": "openai-completions",
        "models": [
          {
            "id": "grok-4-fast",
            "name": "Grok 4 Fast",
            "cost": {
              "input": 0.2,
              "output": 0.5
            },
            "contextWindow": 2000000,
            "maxTokens": 30000
          }
        ]
      }
    }
  }
}
```

## How it compares

- **vs GPT-4o mini** — Grok 4 Fast offers a much larger 2M context window compared to mini's 128K, though mini is slightly cheaper on input at $0.15/1M.
- **vs Gemini 1.5 Flash** — Both offer massive context windows, but Grok's $0.5/1M output price is more competitive for long-form generation tasks.

## Bottom line

If your priority is processing enormous amounts of data for the lowest possible price, Grok 4 Fast is currently the model to beat.

<a href="https://app.haimaker.ai/sign-up?utm_source=model_guide&utm_medium=cta&utm_campaign=grok-4-fast-openclaw" class="cta-button">TRY GROK 4 FAST ON HAIMAKER</a>

---

*For a full comparison of all Grok models, see our [Grok models roundup](/blog/best-grok-models-for-openclaw/). For setup instructions, see our [API key guide](/blog/openclaw-api-key-setup). For all available models, see the [complete models guide](/blog/best-models-for-openclaw).*
