Key Information
Pricing
All prices are in USD. For per-model details, see the models page.
Chat API
Prices per 1M tokensModel | Context | Input | Cached input | Output |
|---|---|---|---|---|
| grok-4.3 | 1M | $1.25 | $0.20 | $2.50 |
| grok-4.20-multi-agent-0309 | 2M | $1.25 | $0.20 | $2.50 |
| grok-4.20-0309-reasoning | 2M | $1.25 | $0.20 | $2.50 |
| grok-4.20-0309-non-reasoning | 2M | $1.25 | $0.20 | $2.50 |
| grok-4-1-fast-reasoning | 2M | $0.20 | $0.05 | $0.50 |
| grok-4-1-fast-non-reasoning | 2M | $0.20 | $0.05 | $0.50 |
Imagine API
Image and video generationModel | Cost |
|---|---|
| grok-imagine-image-quality | $0.05 / image |
| grok-imagine-image-pro | $0.07 / image |
| grok-imagine-image | $0.02 / image |
| grok-imagine-video | $0.05 / sec |
Voice API
Realtime, TTS, and STTMode | Cost |
|---|---|
| Realtime | $0.05 / min ($3.00 / hr) |
| Text to Speech | $4.20 / 1M characters |
| 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 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
Tool Invocation Costs
Tool | Description | Cost / 1k Calls | Tool Name |
|---|---|---|---|
| Web Search | Search the internet and browse web pages | $5 / 1k calls | web_search |
| X Search | Search X posts, user profiles, and threads | $5 / 1k calls | x_search |
| Code Execution | Run Python code in a sandboxed environment | $5 / 1k calls | code_executioncode_interpreter |
| File Attachments | Search through files attached to messages | $10 / 1k calls | attachment_search |
| Collections Search | Query your uploaded document collections (RAG) | $2.50 / 1k calls | collections_searchfile_search |
| Image Understanding | Analyze images found during Web Search and X Search* | Token-based | view_image |
| X Video Understanding | Analyze videos found during X Search* | Token-based | view_x_video |
| Remote MCP Tools | Connect and use custom MCP tool servers | Token-based | Tool name is set by each MCP server |
Query your uploaded document collections (RAG)
collections_searchfile_searchConnect and use custom MCP tool servers
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.
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 fraction of the cost of standard pricing — effectively cutting your token costs in half. Batch requests are queued and processed in the background, with most completing within 24 hours.
| Real-time API | Batch API | |
|---|---|---|
| Token pricing | Standard rates | 20%-50% off standard rates |
| 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. To see batch pricing for a specific model, visit the model's detail page and toggle "Show batch API pricing".
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.
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: May 9, 2026