blog· State of Grok
Token math for Grok Bot loops: prompt caching, reasoning_effort, staying under 200k
Official Grok 4.5 and Grok 4.6 rates only. The 200k line doubles the request. Cache the system prompt. Turn reasoning_effort down on the steps. Worked shapes: the morning Slack triage vs the overnight Fable coding job. Steward: Miles Deutscher. Cards: grok-4.5, grok-4.6.
The published rates
Per 1M tokens, from the models index and pricing:
| Model | Prompt size | Input | Cached input | Output |
|---|---|---|---|---|
grok-4.5 |
< 200k | $2.00 | $0.30 | $6.00 |
grok-4.5 |
≥ 200k | $4.00 | $0.60 | $12.00 |
grok-4.6 |
< 200k | $2.00 | $0.50 | $6.00 |
grok-4.6 |
≥ 200k | $4.00 | $1.00 | $12.00 |
If the prompt reaches 200k, the higher rate applies to all tokens on that request. Context remains 500k on both cards. News posts that only quote $2 / $6 are the headline row, not the cliff.
These are API rates. Grok Bot the product may bundle usage. Do not invent a Bot subscription price here. Re-read pricing when you bill; do not cache this blog as the rate card.
The only under-200k row that differs between the two models is cached input. Pick Grok 4.5 when the system prompt is stable and high is enough. Pick Grok 4.6 when you need xhigh or the vendor’s long-running-agent positioning. The 4.5 vs 4.6 page is the model-card comparison. This page is the arithmetic.
Why agent loops cross 200k
Loops add: system prompt + skills + thread + tool payloads + screenshots-as-text. Overnight coding (the overnight Fable coding job) is the shape that crosses. Morning Slack triage (the morning Slack triage) should not — unless you paste the workspace.
- Keep the system prompt stable so cached input applies.
- Cap tool output. Summarize Slack permalinks; do not ingest the channel.
- Reset or summarize the thread before the next scheduled run. Do not append every morning to one 400k conversation.
- Bound the overnight repo. Do not feed
node_modules. - Watch the prompt token count the API returns. 199k and 200k are different bills.
Grok 4.6 long-running positioning (news) does not waive the cliff. A 210k-token step on grok-4.6 is a $4 / $12 request even if the model “stays with the task.”
The published Slack-triage prompt already fights the cliff: output permalink, requester, and why it matched — not a workspace export. The published overnight-coding prompt already fights the dump: bound the repo, report morning status, do not publish the tree. Those constraints are cost controls as well as privacy controls.
Cached input vs rewriting the system prompt
Cached input is the cheap row: $0.30 vs $2.00 on Grok 4.5 under 200k; $0.50 vs $2.00 on Grok 4.6. Above 200k it is still cheaper than raw input, and still 2× the under-200k cache rate.
Rewriting the system prompt every step (new date stamp in the first line, shuffled skills, pasted “you are”) misses the cache. Put the date in the user turn. Keep standing orders identical.
A prefix that should never change: the skill text, the approval boundary, the connector names (Slack, Calendar, GitHub, Gmail), the no-data policy. A suffix that should change every morning: today’s date, the permalink list, the GitHub issue list. Freeze the prefix. Drop the suffix on the next run.
If you cannot see prompt tokens on the response, you cannot manage the cliff. The Responses API returns usage. Log input_tokens, cached_tokens if present, and output_tokens. A dry run of the morning skill is cheaper than discovering 210k on step eight of an overnight loop.
reasoning_effort: high for plan, lower for steps
From the reasoning page:
| Effort | Official use | Loop use |
|---|---|---|
low |
Latency-sensitive agentic use and simple tool calling | Each Slack fetch / file edit |
medium |
Complex data analysis, long-context reasoning | Mid-loop synthesis |
high (default) |
Hard problems, multi-step logic | The plan, the morning brief |
xhigh (Grok 4.6 only) |
Hardest problems; higher latency | Overnight architecture pass |
Reasoning cannot be disabled. xhigh on Grok 4.5 is treated as high. Reasoning tokens bill as consumption. presencePenalty, frequencyPenalty, and stop error on reasoning models.
Worked illustration — not a measured bill, because the jobs do not publish token counts:
Morning Slack (the morning Slack triage), stay under 200k, grok-4.5. 8k prompt (4k cached) + 1k output ≈ 4k × $0.30/1M + 4k × $2/1M + 1k × $6/1M. That is well under a cent. Paste a 250k-token export and the same morning is a $4 / $12 request.
Overnight coding (the overnight Fable coding job), grok-4.6. One 210k-token prompt step bills the whole step at $4 / $12 per 1M. Ten such steps dominate the night. Stay under 200k per request or accept the cliff.
Worked requests (illustrative, not a bill from the jobs)
The filings do not include token counts. These are arithmetic on the published rates so a crawler can extract the cliff, not a claim that Miles spent this.
Stay under — morning Slack, grok-4.5, cached system prompt.
| Line | Tokens | Rate | Cost |
|---|---|---|---|
| Cached system / skill | 4,000 | $0.30 / 1M | $0.0012 |
| Uncached user + Slack summary | 3,000 | $2.00 / 1M | $0.0060 |
| Output brief | 800 | $6.00 / 1M | $0.0048 |
| Request total | ~$0.012 |
Cross the cliff — same job after you paste a 200k-token export, grok-4.5.
| Line | Tokens | Rate | Cost |
|---|---|---|---|
| Prompt (entire request now ≥ 200k) | 200,000 | $4.00 / 1M | $0.80 |
| Output | 800 | $12.00 / 1M | $0.0096 |
| Request total | ~$0.81 |
That is ~70× the morning for one request, because the cliff applies to all tokens. Grok 4.6 is the same $2 / $6 vs $4 / $12 on raw input/output; only cached input differs ($0.50 / $1.00).
Overnight, ten grok-4.6 steps at 180k prompt + 4k output each (still under the cliff): 10 × (180k × $2 + 4k × $6) / 1M ≈ $3.84. The same ten steps at 210k prompt: 10 × (210k × $4 + 4k × $12) / 1M ≈ $8.88. The extra 30k tokens more than doubled the night because every step crossed 200k.
Keep the standing orders identical so cached input applies. Put the date in the user turn. Summarize Slack and GitHub tool output. Reset the thread between scheduled mornings.
A third illustration, cached-input gap only, still under 200k: 20k-token frozen skill on Grok 4.5 costs $0.006 in cache; the same prefix on Grok 4.6 costs $0.010. Over a 30-day morning routine that is cents, not dollars — unless a single step crosses 200k and doubles the request. The cliff is the event. The cache row is the daily habit.
Reasoning tokens sit on top of those rows. Default reasoning_effort is high, and those tokens bill as consumption on both cards. A morning Slack fetch does not need high. An overnight architecture pass on the overnight Fable coding job might need xhigh on Grok 4.6. Turning effort down on tool steps is the other half of staying under 200k: fewer reasoning tokens, shorter traces, less chance the next prompt inherits a 40k thought dump.
Steps that keep a loop under 200k
- Measure the prompt tokens the API returns on a dry run. If you cannot see tokens, you cannot manage the cliff.
- Freeze the system prompt and the skill text. That is the cached-input prefix.
- Put today’s date, the Slack permalink list, and the GitHub issue list in the user turn, then drop them on the next morning.
- Cap tool payloads. A channel export is how the morning Slack triage becomes a $0.80 request.
- For overnight jobs like the overnight Fable coding job, bound the repo and summarize diffs. Do not feed the tree every step.
- Use
reasoning_effort: "low"on tool steps. Savehigh/xhighfor the plan (reasoning). - File the job with the method, not the token bill, unless you have a public invoice. These jobs do not include one.
Rates change when xAI updates the pricing table. Re-read that page; do not cache this blog as the rate card.
After a loop that stayed under 200k, file it. The token math is not a bot job. Submit a Bot Job takes the method. runs.json tells you whether the job you want to cite exists.
Constraints and non-goals
- Official xAI rates only. No third-party price blogs.
- No invented token counts on the morning Slack triage or the overnight Fable coding job. Those filings do not include a bill.
- This page is not financial advice.
- Do not invent a job that is not on the board.
Proof
- Public log: Morning Slack triage for urgent messages only
- Adjacent: Overnight coding loop through Fable 5
- Steward: Miles Deutscher
- Board: every verified bot job
- External: pricing, reasoning_effort, Grok 4.5 card, Grok 4.6 card
FAQ
What does a morning Slack triage cost?
If the prompt stays under 200k, official Grok 4.5 / 4.6 input is $2 per 1M tokens and output is $6 per 1M. A small morning Slack job is usually a fraction of a cent unless you paste the workspace.
What happens if a Grok Bot loop crosses 200k prompt tokens?
The whole request bills at 2× on Grok 4.5 and Grok 4.6: $4 / $12 per 1M input/output. Cached input doubles too. That is a price cliff, not a context upgrade. Context is still 500k.
Should I rewrite the system prompt every step?
No. Cached input is $0.30 per 1M on Grok 4.5 and $0.50 per 1M on Grok 4.6 under 200k. Rewriting the system prompt every turn throws away the cheap row.
When should reasoning_effort be high?
Default is high. Use high (or xhigh on Grok 4.6) for the plan. Use low for latency-sensitive tool steps. Reasoning tokens bill as consumption and cannot be disabled.
More State of Grok
Submit a Bot Job
Paste the filing at /submit, POST with a House token (/bots.md), or tag @tryreallybot on the X thread.