Skip to content

Key Information

Pricing

All prices are in USD. For per-model details, see the models page.

Text API Pricing

ModelContextInput / 1M tokensCached input / 1M tokensOutput / 1M tokens
grok-4.5 (< 200k prompt tokens)500k$2.00$0.50$6.00
grok-4.5 (≥ 200k prompt tokens)500k$4.00$1.00$12.00
grok-4.3 (< 200k prompt tokens)1M$1.25$0.20$2.50
grok-4.3 (≥ 200k prompt tokens)1M$2.50$0.40$5.00
grok-4.20-0309-reasoning (< 200k prompt tokens)1M$1.25$0.20$2.50
grok-4.20-0309-reasoning (≥ 200k prompt tokens)1M$2.50$0.40$5.00
grok-4.20-0309-non-reasoning (< 200k prompt tokens)1M$1.25$0.20$2.50
grok-4.20-0309-non-reasoning (≥ 200k prompt tokens)1M$2.50$0.40$5.00
grok-build-0.1 (< 200k prompt tokens)256k$1.00$0.20$2.00
grok-build-0.1 (≥ 200k prompt tokens)256k$2.00$0.40$4.00
grok-4.20-multi-agent-0309 (< 200k prompt tokens)1M$1.25$0.20$2.50
grok-4.20-multi-agent-0309 (≥ 200k prompt tokens)1M$2.50$0.40$5.00

Prices shown per million tokens. Models listed with two rows use long context pricing: requests whose prompt reaches the listed token threshold are billed at the higher rate for all tokens in the request.

Imagine Pricing

ModelCost
grok-imagine-image$0.02 / image
grok-imagine-image-quality$0.05 / image
grok-imagine-video-1.5$0.080 / sec
grok-imagine-video$0.050 / sec

Voice Pricing

ModeCost
Realtime$0.05 / min ($3.00 / hr)
Realtime Text Input$0.004 / message (every conversation.item.create)
Text to Speech$15.00 / 1M chars
Speech to Text$0.10 / hr (REST), $0.20 / hr (Streaming)

Tools Pricing

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.

Token Costs

All standard token types are billed 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

Tool Invocation Costs

ToolTool NameDescriptionCost / 1k Calls
Web Searchweb_searchSearch the internet and browse web pages$5
X Searchx_searchSearch X posts, user profiles, and threads$5
Code Executioncode_execution, code_interpreterRun Python code in a sandboxed environment$5
File Attachmentsattachment_searchSearch through files attached to messages$10
Collections Searchcollections_search, file_searchQuery your uploaded document collections (RAG)$2.50
Image Understandingview_imageAnalyze images found during Web Search and X Search*Token-based
X Video Understandingview_x_videoAnalyze videos found during X Search*Token-based
Remote MCP ToolsSet by MCP serverConnect and use custom MCP tool serversToken-based
† All tool names work in the Responses API. In the gRPC API (Python xAI SDK), code_interpreter and file_search are not supported.
* Only applies to images and videos found by search tools — not to images passed directly in messages.

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.

Image Search is part of Web Search and is billed at the standard Web Search rate.

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.

Batch API Pricing

The Batch API lets you process large volumes of requests asynchronously at a discount to standard pricing. The size of the discount varies by model. Batch requests are queued and processed in the background, with most completing within 24 hours.

Real-time APIBatch API
Token pricingStandard ratesDiscounted rates (varies by model)
Response timeImmediate (seconds)Typically within 24 hours
Rate limitsPer-minute limits applyRequests don't count towards rate limits

The batch discount applies to all token types — input tokens, output tokens, cached tokens, and reasoning tokens. Batch discounts by model:

20% off standard rates

  • grok-4.3
  • grok-4.20-0309-reasoning
  • grok-4.20-0309-non-reasoning
  • grok-4.20-multi-agent-0309

Models not listed above have no batch discount.

To see a model's resulting batch prices, toggle "Show batch API pricing" on its detail page.

NOTE

The batch discount applies to text and language models only. Image and video generation are supported in the Batch API but are billed at standard rates. See Batch API documentation for full details.

Priority Processing Pricing

Priority Processing gives text requests higher scheduling priority for lower latency. Priority requests are billed at a 2x premium over standard rates.

StandardPriority
Token pricingStandard rates2x standard rates
Response timeStandard scheduling priorityHigher scheduling priority

The 2x multiplier applies to all token types — input, output, cached, and reasoning. Prompt caching discounts are applied before the multiplier.

You are only billed at the priority rate when the response confirms "service_tier": "priority". If the request is served at the default tier instead, standard rates apply.

NOTE

Priority Processing is available for Chat Completions and Responses endpoints only. It is not supported for image generation, video generation, or Batch API requests. See Priority Processing documentation for full details.

Files and Collections Pricing

Files and collections stored on the xAI platform are billed based on the amount of storage used.

ResourceRate
File storage$0.025 / GiB / day
Collection storage$0.10  / GiB / day

Download Costs

Downloading data from files and collections is charged at a flat rate based on the amount of data transferred:

ResourceRate
File downloads$0.20 / GiB downloaded
Collection downloads$0.20 / GiB downloaded

You can view and manage your files and collections through the xAI console or the xAI API.

Usage Guidelines Violation Fee

When your request is deemed to be in violation of our usage guideline by our system, we will still charge for the generation of the request.

For violations that are caught before generation in the Responses API, we will charge a $0.05 usage guideline violation fee per request.

Billing and Availability

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.

💬