
 
Pricing | SpaceXAI Docs
 
 
 
Docs
Search
Ctrl+
K
API Console
Products
Grok
Status
Available
Resources
llms.txt
Discord
Email support
Terms and Policies
Get Started
Welcome
Grok 4.5
Latest
Quickstart
Models
New
Pricing
Release Notes
Grok Build
Getting Started
Modes and Commands
Keyboard Shortcuts
Features
Settings
CLI
Enterprise Deployments
Text
Text Generation
Reasoning
Structured Outputs
Streaming
Multi Agent
Completions (Legacy)
Imagine
Overview
Image Generation
Image Editing
Multi-Image Editing
Video Generation
Image-to-Video
Video Editing
Reference-to-Video
Video Extension
Files API Integration
New
Voice
New
Overview
Ephemeral Tokens
Voice Agent API
Text to Speech
Speech to Text
Custom Voices
New
Resources
Rate Limits
Cost Tracking
Debugging Errors
Docs MCP
Files &amp; Collections
Files Overview
Managing Files
Public URLs
New
Chat with Files
Collections
Collections via API
Collection Metadata
Tools
Overview
Function Calling
Web Search
X Search
Code Execution
Collections Search (RAG)
Remote MCP Tools
Deep Dive
Advanced API Usage
Batch API
Deferred Completions
Prompt Caching
Context Compaction
New
Priority Processing
New
mTLS Authentication
Async Requests
WebSocket Mode
New
Migration Guides
Model Retirement on May 15
New
Migrating to Responses API
Community
Community Integrations
Google Cloud Vertex AI
Microsoft Foundry
FAQ
Data &amp; Privacy
General
Docs
Grok Apps
REST API
gRPC
Get Started
Welcome
Grok 4.5
Latest
Quickstart
Models
New
Pricing
Release Notes
Grok Build
Getting Started
Modes and Commands
Keyboard Shortcuts
Features
Settings
CLI
Enterprise Deployments
Text
Text Generation
Reasoning
Structured Outputs
Streaming
Multi Agent
Completions (Legacy)
Imagine
Overview
Image Generation
Image Editing
Multi-Image Editing
Video Generation
Image-to-Video
Video Editing
Reference-to-Video
Video Extension
Files API Integration
New
Voice
New
Overview
Ephemeral Tokens
Voice Agent API
Text to Speech
Speech to Text
Custom Voices
New
Resources
Rate Limits
Cost Tracking
Debugging Errors
Docs MCP
Files &amp; Collections
Files Overview
Managing Files
Public URLs
New
Chat with Files
Collections
Collections via API
Collection Metadata
Tools
Overview
Function Calling
Web Search
X Search
Code Execution
Collections Search (RAG)
Remote MCP Tools
Deep Dive
Advanced API Usage
Batch API
Deferred Completions
Prompt Caching
Context Compaction
New
Priority Processing
New
mTLS Authentication
Async Requests
WebSocket Mode
New
Migration Guides
Model Retirement on May 15
New
Migrating to Responses API
Community
Community Integrations
Google Cloud Vertex AI
Microsoft Foundry
FAQ
Data &amp; Privacy
General
 
Key Information
Pricing
Copy for LLM
View as Markdown
Create API key
Meet grok-4.5
All prices are in USD. For per-model details, see the 
models page
.
Text API
Prices per 1M tokens
Model
Context
Short context
Long context
Input
Cached input
Output
Input
Cached input
Output
grok-4.5
500k
$2.00
$0.50
$6.00
$4.00
$1.00
$12.00
grok-build-0.1
256k
$1.00
$0.20
$2.00
$2.00
$0.40
$4.00
grok-4.3
1M
$1.25
$0.20
$2.50
$2.50
$0.40
$5.00
grok-4.20-multi-agent-0309
1M
$1.25
$0.20
$2.50
$2.50
$0.40
$5.00
grok-4.20-0309-reasoning
1M
$1.25
$0.20
$2.50
$2.50
$0.40
$5.00
grok-4.20-0309-non-reasoning
1M
$1.25
$0.20
$2.50
$2.50
$0.40
$5.00
Models with long context pricing bill the long context rates for all tokens in a request once its prompt reaches the model's long context threshold.
Imagine API
Image and video generation &amp; editing
Model
Media Input
Resolution
Output
grok-imagine-image-quality
Text, Image
 → Image
$0.01 / img
1K
$0.05 / img
2K
$0.07 / img
grok-imagine-image
Text, Image
 → Image
$0.002 / img
1K
$0.02 / img
2K
$0.02 / img
grok-imagine-video-1.5
Image
 → Video
$0.01
 / img
480p
$0.08 / sec
720p
$0.14 / sec
1080p
$0.25 / sec
grok-imagine-video
Text, Image, Video
 → Video
$0.01
 / sec
$0.002
 / img
480p
$0.05 / sec
720p
$0.07 / sec
Voice API
Realtime, TTS, and STT
Mode
Cost
Realtime
$
0.05
 / min (
$
3.00
 / hr)
Realtime Text Input
$
0.004
 / message
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
Tool
Tool Name
Description
Cost / 1k Calls
Web Search
web_search
Search the internet and browse web pages
$5
 / 1k calls
X Search
x_search
Search X posts, user profiles, and threads
$5
 / 1k calls
Code Execution
code_execution
code_interpreter
Run Python code in a sandboxed environment
$5
 / 1k calls
File Attachments
attachment_search
Search through files attached to messages
$10
 / 1k calls
Collections Search
collections_search
file_search
Query your uploaded document collections (RAG)
$2.50
 / 1k calls
Image Understanding
view_image
Analyze images found during Web Search and X Search*
Token-based
X Video Understanding
view_x_video
Analyze videos found during X Search*
Token-based
Remote MCP Tools
Tool name is set by each MCP server
Connect and use custom MCP tool servers
Token-based
Web Search
$5
 / 1k calls
Search the internet and browse web pages
web_search
X Search
$5
 / 1k calls
Search X posts, user profiles, and threads
x_search
Code Execution
$5
 / 1k calls
Run Python code in a sandboxed environment
code_execution
code_interpreter
File Attachments
$10
 / 1k calls
Search through files attached to messages
attachment_search
Collections Search
$2.50
 / 1k calls
Query your uploaded document collections (RAG)
collections_search
file_search
Image Understanding
Token-based
Analyze images found during Web Search and X Search*
view_image
X Video Understanding
Token-based
Analyze videos found during X Search*
view_x_video
Remote MCP Tools
Token-based
Connect and use custom MCP tool servers
Tool name is set by each MCP server
 
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 API
Batch API
Token pricing
Standard rates
Discounted rates (varies by model)
Response time
Immediate (seconds)
Typically within 24 hours
Rate limits
Per-minute limits apply
Requests 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:
Model
Batch discount
grok-4.3
grok-4.20-0309-reasoning
grok-4.20-0309-non-reasoning
grok-4.20-multi-agent-0309
20
%
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.
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.
Standard
Priority
Token pricing
Standard rates
2x
 standard rates
Response time
Standard scheduling priority
Higher 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.
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.
Resource
Rate
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:
Resource
Rate
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.
Last updated: 
July 3, 2026
On this page
Tools Pricing
Token Costs
Tool Invocation Costs
Batch API Pricing
Priority Processing Pricing
Files and Collections Pricing
Download Costs
Usage Guidelines Violation Fee
Billing and Availability
Copy for LLM
Share feedback
 
 
