AI API PricesxAI (Grok) › Grok 3 mini

Grok 3 mini pricing

Grok 3 mini API cost from xAI (Grok) — $0.100 per 1M input tokens and $0.300 per 1M output tokens. Estimate your real monthly bill below, then compare it against every other model.

Input price
$0.100
per 1M input tokens
Output price
$0.300
per 1M output tokens
Context window
128K
tokens per request
Reference call
$0.0004
1K in + 1K out

Fast / cheap 128K context · all prices USD per 1M tokens, list price last verified 2026-06-27.

Grok 3 mini capabilities & limits

Representative specs for this tier — confirm exact limits in the xAI (Grok) docs.

Context window128K
Max output16K
Knowledge cutoffAug 2025
API formatOpenAI-compatible
✓ Vision✓ Tools / functions✓ JSON / structured

API acting up? Check live xAI (Grok) status → · all AI API status

Call Grok 3 mini from your code

The exact model string and endpoint to use. Works with the OpenAI SDK — just point base_url at the URL below.

Model stringgrok-3-mini
Base URLhttps://api.x.ai/v1
API key envXAI_API_KEY
curl https://api.x.ai/v1/chat/completions \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-3-mini",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Model strings follow each provider's naming convention; confirm the current id in the xAI (Grok) docs before relying on it.

What a Grok 3 mini API call actually costs

Blended input + output cost at Grok 3 mini's list rates — useful yardsticks before you commit to volume.

$0.0004
Short call
1K in · 1K out
$0.0004
Chat turn
3K in · 500 out
$0.0023
RAG / long prompt
20K in · 1K out
$0.400
1M in + 1M out
bulk job

Grok 3 mini cost calculator

Enter your monthly volume to estimate the Grok 3 mini bill. Runs entirely in your browser.

Estimated monthly cost

For the full multi-model breakdown, use the cost calculator.

xAI (Grok) models — Grok 3 mini in context

How Grok 3 mini prices against its siblings. Cheapest reference cost first.

Model Input /1M Output /1M Cost / call* Context Type
Grok 3 mini $0.100 $0.300 $0.0004 128K Fast / cheap
Grok 4 Fast
2M context
$0.200 $0.500 $0.0007 2M Fast / cheap
Grok Code Fast 1
Code-specialised
$0.200 $1.50 $0.0017 256K Balanced
Grok 4
Flagship
$3.00 $15.00 $0.018 256K Flagship

*Reference cost of one call with 1,000 input + 1,000 output tokens — a neutral yardstick. Use the calculator for your real usage. Cheapest row highlighted.

Cheaper than Grok 3 mini? In the same fast / cheap tier, Gemini 1.5 Flash-8B runs $0.037 in / $0.150 out. The overall cheapest model tracked is Gemini 1.5 Flash-8B — see the cheapest LLM API guide.

How Grok 3 mini pricing works

Grok 3 mini is billed per token: a lower input price of $0.100 per million tokens for everything you send, and a higher output price of $0.300 per million for everything the model generates. To turn that into a real Grok 3 mini bill, multiply by your monthly request volume and average prompt/response length — the calculator above does exactly that.

Grok 3 mini does not list a separate cached-input rate, so every input token bills at $0.100 per million. If repeated context is a big part of your prompts, a model with prompt caching may end up cheaper in practice.

List prices move fast — always confirm the current numbers on the official xAI (Grok) pricing page before relying on them for budgeting.

Grok 3 mini pricing FAQ

How much does the Grok 3 mini API cost?

Grok 3 mini costs $0.100 per 1M input tokens and $0.300 per 1M output tokens. A typical 3K-input / 500-output call works out to about $0.0004.

What is Grok 3 mini's context window?

Grok 3 mini has a 128K-token context window. Tokens you put in the prompt are billed at the $0.100 per 1M input rate.

Does Grok 3 mini charge extra for output tokens?

Yes. Output (generated) tokens cost $0.300 per 1M, versus $0.100 per 1M for input — about 3.0× more, which is normal for LLM APIs.

Is there a cheaper alternative to Grok 3 mini?

In the same fast / cheap tier, Gemini 1.5 Flash-8B (Google) is cheaper at $0.037 in / $0.150 out. The overall cheapest model on the market is Gemini 1.5 Flash-8B.

Compare Grok 3 mini with other models