# xAI Grok API pricing

Grok 4.7 costs $2 per million input tokens and $6 per million output tokens on the xAI API, as of November 2026. Below: every model, tools, images, video and discounts.

Tool: Grok. By Julien Lieben. Updated 2026-11-25. Source: https://coldiq.com/university/grok/grok-api-pricing

## In short

- As of November 2026, grok-4.7, grok-4.6 and grok-4.5 cost $2 per million input tokens and $6 per million output tokens, for prompts under 200,000 tokens.
- grok-4.3 is the cheaper option at $1.25 per million input tokens and $2.50 per million output tokens, with a 1 million token context window.
- Prompts of 200,000 tokens or more are billed at double rates for the whole request.
- The Batch API gives 20% off text models, and cached input costs a quarter of the normal input price on grok-4.7.
- Images start at $0.02 each, video at $0.02 per second, and web or X searches cost $5 per 1,000 calls on top of tokens.

## Steps

1. Pick the model: grok-4.7 for most work, grok-4.3 for cheap volume.
2. Estimate tokens in and out per request, times your volume.
3. Use the Batch API and prompt caching to lower the bill.

## How does Grok API pricing work?

The xAI API (the way software uses Grok) charges per token for text. A token is a small piece of a word, so a long email is a few hundred tokens.

You pay for input tokens (what you send, including the conversation history) and output tokens (what Grok writes). Reasoning tokens, the model’s thinking before it answers, are billed too, so real costs run above a simple word count.

Images are billed per image, video per second, and voice per minute or per character. Tools such as web search add a fee per call. All prices are in US dollars.


## What does each Grok text model cost?

Prices below are per million tokens, for prompts under 200,000 tokens, as of November 2026. Cached input is the price of input the API has already seen recently and serves from its cache.

- grok-4.7: $2 input, $0.50 cached input, $6 output. 500,000-token context.
- grok-4.6: $2 input, $0.50 cached input, $6 output. 500,000-token context.
- grok-4.5: $2 input, $0.30 cached input, $6 output. 500,000-token context.
- grok-4.3: $1.25 input, $0.20 cached input, $2.50 output. 1 million token context.
- grok-4.20-0309 (reasoning and non-reasoning): $1.25 input, $0.20 cached input, $2.50 output.
- grok-4.20-multi-agent-0309: $1.25 input, $0.20 cached input, $2.50 output.

Tip: Long prompts change the price. Once a prompt reaches 200,000 tokens, the whole request is billed at the higher rate: $4 input and $12 output on grok-4.7. Keep prompts lean.


## What do images, video and voice cost on the Grok API?

The Imagine models (xAI’s image and video generation) use flat prices, so the length of your prompt does not change the cost. Text input for image and video is free.

- grok-imagine-image: $0.02 per image.
- grok-imagine-image-2.0: $0.04 (1K) or $0.06 (2K) per image at low quality, $0.06 (1K) or $0.08 (2K) at medium quality.
- grok-imagine-video-1.5-lite: from $0.02 per second of video at 480p to $0.14 at 1080p.
- grok-imagine-video: $0.05 per second at 480p, $0.07 at 720p.
- grok-imagine-video-1.5: from $0.08 per second at 480p to $0.25 at 1080p.
- Speech to speech (grok-voice-3.0): $0.08 per minute.
- Speech to text: $0.10 per hour, or $0.20 per hour when streaming.
- Text to speech: $15 per million characters.


## What do Grok API tools cost?

Tools let Grok act during a request: search the web, search X, run code or read your documents. You pay the tokens of the request plus a fee for each tool use.

- Web search: $5 per 1,000 calls.
- X search: $5 per 1,000 posts returned and $10 per 1,000 profiles returned.
- Code execution: $5 per 1,000 calls.
- Search in attached files: $5 per 1,000 calls.
- Collections search (your own document library): $2.50 per 1,000 calls.
- Remote MCP tools (outside tools you connect): no fee per call, only the tokens.

Tip: X search counts every post it returns, including parent and quoted posts. A broad search on a busy topic can return many posts, so narrow your query.


## How can you lower your Grok API bill?

Four levers make the biggest difference. Use them before you switch to a cheaper model.

- Batch API: 20% off all token types on the text models, for jobs that can wait. Most batches finish within 24 hours.
- Prompt caching: reuse the same opening for every request (instructions, examples). Cached input costs $0.50 instead of $2 per million tokens on grok-4.7.
- Reasoning effort: set it to low or medium for simple tasks, so the model writes fewer reasoning tokens.
- Model choice: grok-4.3 costs less than half of grok-4.7 for output, for simple, high-volume tasks.


## How much would a real project cost?

Take a sales team that writes a first line for 1,000 prospects. Each request sends about 2,000 input tokens (instructions plus the prospect’s data) and gets back about 500 output tokens.

On grok-4.7, that is 2 million input tokens at $2 ($4) plus 500,000 output tokens at $6 ($3): about $7, before reasoning tokens and any search fees. Through the Batch API, the token cost drops by 20%, to about $5.60.

Some options cost more. Priority Processing (faster scheduling) costs 2 times the standard rates. The US regional endpoint, which keeps processing in the United States, costs 1.1 times the standard rates.

> Here are 20 prospects with their company, role and one recent news item. Write one opening line per prospect, under 20 words, that refers to the news item. Return a table with name and line.


## Is the Grok API included in a Grok subscription?

Access is, usage is not. As of November 2026, xAI lists Grok API access on its paid plans from Plus, but says API usage is billed separately at standard model rates and does not draw from the plan’s usage pool.

You pay the API with prepaid credits on the Billing page of the Grok dashboard, or with a monthly invoice on request. xAI says prepaid API credits are non-refundable.

Other costs to know: file storage at $0.025 per GiB per day, collection storage at $0.10 per GiB per day, and a $0.05 fee per request blocked for breaking the usage guidelines before generation.


## Sources

- [API pricing](https://docs.x.ai/developers/pricing)
- [Models](https://docs.x.ai/developers/models)
- [Manage billing](https://docs.x.ai/console/billing)
- [Migration: grok-imagine-image-quality](https://docs.x.ai/developers/migration/imagine-image-quality-nov-2)
- [SpaceXSI pricing](https://x.ai/pricing)
- [Grok Imagine API](https://x.ai/api/imagine)

## Questions

**How much does the Grok 4.7 API cost?** $2 per million input tokens and $6 per million output tokens below 200,000 prompt tokens, as of November 2026. Above that, $4 and $12.

**What is the cheapest Grok model on the API?** grok-4.3 and the grok-4.20 models, at $1.25 per million input tokens and $2.50 per million output tokens.

**Is there a free tier for the Grok API?** No free allowance is listed. Requests are billed from prepaid credits, and they are rejected when the credits run out.

**Does the Batch API save money on Grok?** Yes, 20% off token prices on the text models. Images and video in a batch are billed at standard rates.


## Related

- [How to get a Grok API key](https://coldiq.com/university/grok/grok-api-key)
- [Grok models explained: Grok 3, Grok 4, 4.5, 4.6 and 4.7](https://coldiq.com/university/grok/grok-models)

## Try ColdIQ free

ColdIQ gives new accounts up to 1,450 free credits as they get started, no credit card required.
One subscription covers 40+ B2B data providers for finding, enriching and verifying
contacts and companies, through the web app, the API or the MCP server for AI agents.

1. Create an account: https://coldiq.com/marketplace/sign-up?utm_source=ai-assistant&utm_medium=markdown&utm_content=university
2. Run a first search on your own market with the free credits.
3. Connect the MCP server to Claude, ChatGPT or Cursor: https://coldiq.com/mcp
