Grok 4 Fast now has 2M context window

Nov 9, 2025 - 04:56
 0  0

Grok 4 Information for Grok 3 Users

When moving from grok-3/grok-3-mini to grok-4, please note the following differences:

  • • Grok 4 is a reasoning model. There are no non-reasoning mode when using Grok 4.
  • presencePenalty, frequencyPenalty and stop parameters are not supported by reasoning models. Adding them in the request would result in error.
  • • Grok 4 does not have a reasoning_effort parameter. If a reasoning_effort is provided, the request will return error.

Requests which make use of xAI provided server-side tools are priced based on two components: token usage and server-side tool invocations. Since the agent autonomously decides how many tools to call, costs scale with query complexity.

All standard token types are billed at the rate for the model used in the request:

  • Input tokens: Your query and conversation history
  • Reasoning tokens: Agent's internal thinking and planning
  • Completion tokens: The final response
  • Image tokens: Visual content analysis (when applicable)
  • Cached prompt tokens: Prompt tokens that were served from cache rather than recomputed

For a limited time, all server-side tool invocations are free until November 21, 2025.

ToolCost per 1,000 callsDescription
Web Search$10Internet search and page browsing
X Search$10X posts, users, and threads
Code Execution$10Python code execution environment
View ImageToken-based onlyImage analysis within search results
View X VideoToken-based onlyVideo analysis within X posts
Collections Search$2.50Knowledge base search using xAI Collections
Remote MCP ToolsToken-based onlyCustom MCP tools

For the view image and view x video tools, you will not be charged for the tool invocation itself but will be charged for the image tokens used to process the image or video.

For Remote MCP tools, you will not be charged for the tool invocation but will be charged for any tokens used.

For more information on using Tools, please visit our guide on Tools.


The advanced agentic search capabilities powering grok.com are generally available in the new agentic tool calling API, and the Live Search API will be deprecated by December 15, 2025.

Live Search costs $25 per 1,000 sources requested, each source used (Web, X, News, RSS) in a request counts toward the usage. That means a search using 4 sources costs $0.10 while a search using 1 source is $0.025. A source (e.g. Web) may return multiple citations, but you will be charged for only one source.

The number of sources used can be found in the response object, which contains a field called response.usage.num_sources_used.

For more information on using Live Search, visit our guide on Live Search or look for search_parameters parameter on API Reference - Chat Completions.


For users using our Collections API and Documents Search, the following pricing applies:

Item
Price
Documents Search
$2.50/1k requests
File Storage
free
Collections Storage
free

A rare occurrence for most users, when your request is deemed to be in violation of our usage guideline by our system, we will charge a $0.05 per request usage guidelines violation fee.


  • No access to realtime events without Live Search enabled
    • Grok has no knowledge of current events or data beyond what was present in its training data.
    • To incorporate realtime data with your request, please use Live Search function, or pass any realtime data as context in your system prompt.
  • Chat models
    • No role order limitation: You can mix system, user, or assistant roles in any sequence for your conversation context.
  • Image input models
    • Maximum image size: 20MiB
    • Maximum number of images: No limit
    • Supported image file types: jpg/jpeg or png.
    • Any image/text input order is accepted (e.g. text prompt can precede image prompt)

The knowledge cut-off date of Grok 3 and Grok 4 are November, 2024.


Some models have aliases to help user automatically migrate to the next version of the same model. In general:

  • is aliased to the latest stable version.
  • -latest is aliased to the latest version. This is suitable for users who want to access the latest features.
  • - refers directly to a specific model release. This will not be updated and is for workflows that demand consistency.

For most users, the aliased or -latest are recommended, as you would receive the latest features automatically.


Your model access might vary depending on various factors such as geographical location, account limitations, etc.

For how the bills are charged, visit Manage Billing for more information.

For the most up-to-date information on your team's model availability, visit Models Page on xAI Console.


Each model can have one or multiple input and output capabilities. The input capabilities refer to which type(s) of prompt can the model accept in the request message body. The output capabilities refer to which type(s) of completion will the model generate in the response message body.

This is a prompt example for models with text input capability:

JSON

[
  {
    "role": "system",
    "content": "You are Grok, a chatbot inspired by the Hitchhikers Guide to the Galaxy."
  },
  {
    "role": "user",
    "content": "What is the meaning of life, the universe, and everything?"
  }
]

This is a prompt example for models with text and image input capabilities:

JSON

[
  {
    "role": "user",
    "content": [
      {
        "type": "image_url",
        "image_url": {
          "url": "data:image/jpeg;base64,",
          "detail": "high"
        }
      },
      {
        "type": "text",
        "text": "Describe what's in this image."
      }
    ]
  }
]

This is a prompt example for models with text input and image output capabilities:

JSON

// The entire request body
{
  "model": "grok-4",
  "prompt": "A cat in a tree",
  "n": 4
}

The context window determines the maximum amount of token accepted by the model in the prompt.

For more information on how token is counted, visit Consumption and Rate Limits.

If you are sending the entire conversation history in the prompt for use cases like chat assistant, the sum of all the prompts in your conversation history must be no greater than the context window.


Trying to run the same prompt multiple times? You can now use cached prompt tokens to incur less cost on repeated prompts. By reusing stored prompt data, you save on processing expenses for identical requests. Enable caching in your settings and start saving today!

The caching is automatically enabled for all requests without user input. You can view the cached prompt token consumption in the "usage" object.

For details on the pricing, please refer to the pricing table above, or on xAI Console.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0