grok-4.6 is xAI’s newest flagship, released August 7, 2026. It reuses grok-4.5’s 1.5T-parameter V9 foundation with the entire gain coming from post-training, and its list price is identical to grok-4.5; grok-4.3 and the grok-4.20 series offer a 1M-token context window; the Responses API tools web_search / x_search / code_interpreter / MCP are all verified working on APIYI, and X search is a capability unique to Grok; native responses support also means Grok can plug straight into OpenAI Codex. The whole series can run on the GrokOfficial group at a 0.8x multiplier (20% off) — see “Groups and Discounts” below.Model Lineup
grok-4.6
grok-4.5
grok-4.3
grok-4.20 Variants
-reasoning and -non-reasoning share the same price and 1M context; pick based on whether you want chain-of-thought.grok-build-0.1
grok-4.20-multi-agent-beta-0309
More Capability Pages
Pricing
Listed prices match xAI’s official pricing (verified item-by-item against the APIYI pricing API on 2026-07-13;grok-4.6 re-verified 2026-08-13). APIYI’s discount comes from the GrokOfficial group at 0.8x plus recharge promotions, and the two stack.
The table below is the 0 – 200K context tier (the whole Grok series is billed in tiers by context length; the higher tier is covered below):
Tiered Billing and Cache Rates
The whole Grok series bills in two tiers based on the context length of a single request, with the break at 200K tokens (200Ki = 204,800). Above that point, input and output rates double:grok-4.6 and grok-4.5 is the cached read rate ($0.50 vs $0.30) — input and output are identical.
Both grok-4.6 tiers have been verified item-by-item in the APIYI console for input, output and cached read; the second-tier cached read rates for the other models are derived from xAI’s “second tier doubles” convention, so treat the live listing on the model info page as authoritative.
- The aliases
grok-code-fast/grok-code-fast-1are also callable (connectivity verified); see the model info page for their pricing. - Cached input tokens are billed at the cached read rate in the table above. Grok prefix caching is automatic — no configuration needed, verified across both endpoints and both streaming and non-streaming; see the Grok cache billing guide.
- Watch the tier break on long-context work: a single 210K-token request is billed entirely at the second tier, not just the 10K above the line. Splitting requests avoids the jump.
Groups and Discounts
GrokOfficial has identical model behavior and call syntax to the default group. It exists purely as a promotion, to encourage more usage on the Grok series. Select it when creating a Token (or add it to an existing Grok Token) and not a line of code changes; grok-4.6 and the rest of the series remain usable in Codex on this group.
The discount stacks with recharge promotions (10%–20%). Taking grok-4.6 at the first tier:
Verified Capability Matrix
Tested on 2026-07-13 (UTC+8) against the APIYI gateway (✅ verified working; ◐ not yet tested, expected identical on the same architecture; — not covered, expected identical on the same architecture):grok-4.6 column still carries ◐ marks: this 56-request test run dates from 2026-07-13, before 4.6 existed. On 2026-08-19 we re-tested basic chat, streaming (with usage) and prompt caching on 4.6 — across both /v1/chat/completions and /v1/responses, streaming and non-streaming, with billing reconciled line by line — so those rows now report verified results. The remaining ◐ marks carry over the same-architecture expectation: 4.6 shares the 1.5T-parameter V9 foundation, API protocol and endpoints of 4.5, and xAI has announced no breaking parameter-level changes. Run a small sample against your own use case before putting it into production.Endpoints
Use It Directly in Codex
Because Grok natively supports/v1/responses, it is one of the few non-OpenAI models that runs in OpenAI Codex (desktop app / IDE extension / CLI) over the native responses protocol — set model = "grok-4.6" and wire_api = "responses" in config.toml and you’re connected in 5 minutes, with Codex’s agent features (tool calls, reasoning items, etc.) all on the native protocol. By contrast, Claude / Gemini on APIYI only run in OpenAI-compatible chat mode (wire_api = "chat" fallback), which carries protocol incompatibilities in Codex / agent scenarios. Full setup steps: Codex Integration Guide.
Quick Start
Billing Note: Reasoning Tokens
grok-4.6 / grok-4.5 / grok-4.3 / grok-build-0.1 reason internally by default: responses include reasoning_content, and reasoning tokens count toward output billing. In testing, a short answer showed just 30 visible tokens but billed 586 output tokens (556 of them reasoning). For cost-sensitive short Q&A, switch to grok-4.20-0309-non-reasoning. Details in Chat & Reasoning.
FAQ
Does Grok have its own native API format?
Does Grok have its own native API format?
/v1/chat/completions (chat) plus /v1/responses (Responses API and server-side tools). Point the OpenAI SDK at https://api.apiyi.com/v1 and you get the full feature set — there is no “compatibility-mode downgrade”.How do I enable web search?
How do I enable web search?
tools: [{"type": "web_search"}] (or x_search). The legacy search_parameters field on Chat Completions has been removed by xAI (verified 410) — do not use it. See Web & X Search.The model introduces itself as Grok 4 — is my request hitting the wrong model?
The model introduces itself as Grok 4 — is my request hitting the wrong model?
model field in your request and the response, not the model’s self-introduction.Does caching need configuration?
Does caching need configuration?
usage.prompt_tokens_details.cached_tokens (on /v1/responses, read usage.input_tokens_details.cached_tokens). Hits round down to 128 tokens, which both test rounds agree on: an 8802-token prefix hit 8704, a 2735-token prefix hit 2688. xAI states that cache entries can be evicted and hits are not guaranteed, so budget at the uncached price. Full details in the Grok cache billing guide.What happens if I exceed the context window?
What happens if I exceed the context window?
Are failed requests billed?
Are failed requests billed?
deferred: true is silently ignored — the request actually runs synchronously and is billed normally.