xAI: Grok 4 Fast

x-ai/grok-4-fast

Created Sep 19, 20252,000,000 context
Starting at $0.20/M input tokensStarting at $0.50/M output tokens

Grok 4 Fast is xAI's latest multimodal model with SOTA cost-efficiency and a 2M token context window. It comes in two flavors: non-reasoning and reasoning. Read more about the model on xAI's news post. Reasoning can be enabled using the reasoning enabled parameter in the API. Learn more in our docs

Prompts and completions on Grok 4 Fast Free may be used by xAI or OpenRouter to improve future models.

Providers for Grok 4 Fast

OpenRouter routes requests to the best providers that are able to handle your prompt size and parameters, with fallbacks to maximize uptime.

US
Latency
4.81s
Throughput
85.83tps
Uptime
100.0%
Uptime 100.0 percent
Total Context
Max Output
Input Price
Output Price
Cache Read
Cache Write
Input Audio
Input Audio Cache
2M
30K
≤128K$0.20>128K$0.40
≤128K$0.50>128K$1
≤128K$0.05>128K$0.05
--
--
--

Throughput

Latency

Apps using Grok 4 Fast

Top public apps this week using this model

1.
Favicon for https://kilocode.ai/
Kilo Code
AI coding agent for VS Code
1.23Btokens
2.
Favicon for https://roocode.com/
Roo Code
A whole dev team of AI agents in your editor
521Mtokens
3.
Favicon for https://cline.bot/
Cline
Autonomous coding agent right in your IDE
306Mtokens
4.
Favicon for https://t3.chat/
T3.Chat
High performance AI chat app
184Mtokens
5.
Favicon for https://litellm.ai/
liteLLM
Open-source library to simplify LLM calls
108Mtokens
6.
Favicon for https://openrouter.ai/chat
OpenRouter: Chatroom
Chat with multiple LLMs at once
62.3Mtokens
7.
Favicon for https://agent-zero.ai/
59.2Mtokens
8.
Favicon for https://janitorai.com/
52.8Mtokens
9.
Favicon for https://portkey.ai/
Portkey AI
Control panel for AI apps
40.5Mtokens
10.
Favicon for https://cherry-ai.com/
35.7Mtokens
11.
Favicon for https://sillytavern.app/
SillyTavern
LLM frontend for power users
35Mtokens
12.
Favicon for https://zed.dev/
Zed Editor
AI code editor designed for high-performance collaboration
31.9Mtokens
13.
Favicon for https://local.agi/
28.4Mtokens
14.
Favicon for https://dbade819-3f7d-4097-87e8-bab5217af2d6.lovableproject.com/
21.1Mtokens
15.
Favicon for https://github.com/IlyaGusev/codearkt
18.3Mtokens
16.
Favicon for https://opencode.ai/
OpenCode
AI coding agent built for the terminal
14.2Mtokens
17.
Favicon for https://openwebui.com/
Open WebUI
Extensible, self-hosted AI interface
12.6Mtokens
18.
Favicon for https://aider.chat/
Aider
AI pair programming in your terminal
10.4Mtokens
19.
Favicon for https://local-dev/
10Mtokens
20.
Favicon for https://id-preview--dbade819-3f7d-4097-87e8-bab5217af2d6.lovable.app/
8.88Mtokens

Recent activity on Grok 4 Fast

Total usage per day on OpenRouter

Sep 25Sep 26Sep 27900M1.8B2.7B3.6B

Uptime stats for Grok 4 Fast

Uptime stats for Grok 4 Fast on the only provider

When an error occurs in an upstream provider, we can recover by routing to another healthy provider, if your request filters allow it.

Learn more about our load balancing and customization options.

Sample code and API for Grok 4 Fast

OpenRouter normalizes requests and responses across providers for you.

OpenRouter provides an OpenAI-compatible completion API to 400+ models & providers that you can call directly, or using the OpenAI SDK. Additionally, some third-party SDKs are available.

In the examples below, the OpenRouter-specific headers are optional. Setting them allows your app to appear on the OpenRouter leaderboards.

from openai import OpenAI

client = OpenAI(
  base_url="https://openrouter.ai/api/v1",
  api_key="<OPENROUTER_API_KEY>",
)

completion = client.chat.completions.create(
  extra_headers={
    "HTTP-Referer": "<YOUR_SITE_URL>", # Optional. Site URL for rankings on openrouter.ai.
    "X-Title": "<YOUR_SITE_NAME>", # Optional. Site title for rankings on openrouter.ai.
  },
  extra_body={},
  model="x-ai/grok-4-fast",
  messages=[
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "What is in this image?"
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
          }
        }
      ]
    }
  ]
)
print(completion.choices[0].message.content)

Using third-party SDKs

For information about using third-party SDKs and frameworks with OpenRouter, please see our frameworks documentation.

See the Request docs for all possible fields, and Parameters for explanations of specific sampling parameters.

More models from xAI

    Grok 4 Fast - API, Providers, Stats | OpenRouter