grok-4.7 API — per-token pricing and code examples
Price per 1M tokens
Cache rates apply when the provider reports cache tokens.
90% offAbout this model
grok-4.7 is served through OpenAI Chat Completions, OpenAI Responses, Anthropic Messages. You pay $0.20 per 1M input tokens and $0.60 per 1M output tokens. That is 90% below the official price of $2.00 and $6.00. Cache reads cost $0.02 per 1M tokens when the provider reports cached tokens. It is included in budget packs from $9.99 up.
Where Grok 4.7 fits
xAI calls Grok 4.7 "the most capable model we've built" and recommends it for general use, including code. Like its predecessors in the 4.x line, grok-4.7 is described as a frontier model for coding, agentic tasks and knowledge work. xAI lists a 500,000-token context window, text and image input, and text output. On output length, xAI's Grok 4.7 guide says there is no text output limit, so a long report or a large patch is not cut at a fixed ceiling set by the model. xAI gives May 2026 as the knowledge cut-off for grok-4.7, which matters when you ask about libraries or events after that point: supply the docs in the prompt instead of relying on recall. Function calling and structured outputs are both supported.
Encrypted reasoning and summaries on Grok 4.7
Grok 4.7 always reasons, with the same effort scale as grok-4.6: low, medium, high and xhigh, defaulting to high when nothing is sent. Two details are new. First, xAI exposes summaries of the model's internal reasoning for grok-4.7, so a client can show users what the model considered without revealing the raw thinking. Second, on xAI's own Responses API grok-4.7 always returns reasoning.encrypted_content, even if your include list does not ask for it. xAI asks that these reasoning items be sent back unchanged in the next turn. If your agent trims, edits or re-serialises them, the follow-up request can lose the model's earlier thinking. xAI's Chat Completions API has no field for this ciphertext.
xAI also recommends context compaction for long agent loops on this model, and as with other xAI reasoning models, presence penalty, frequency penalty and stop sequences are rejected with an error.
What it costs on Cent AI
Grok 4.7 usage is deducted per token from your prepaid USD balance at the input, cache read, cache write and output rates in the price box on this page. Reasoning tokens on grok-4.7 are billed as output. With no fixed output ceiling from the model, a single request can run long if you do not cap it, so set a token limit on jobs where the length of the answer is not the point.
Caching on Grok 4.7 depends heavily on how you send requests. xAI "strongly" recommends a prompt_cache_key on its Responses API, and says cache hits are not reliable without it. Cent AI only charges cache rates when xAI's usage report for the request shows cached tokens, so a missing key simply means more of the prompt is billed at the input rate.
Using it from your tools
Cent AI serves grok-4.7 on /v1/chat/completions, /v1/responses and /v1/messages, and does not change your parameters silently. The example below uses the /v1/responses format, which has fields for both the cache key and the returned reasoning items:
{
"model": "grok-4.7",
"reasoning": { "effort": "high" },
"prompt_cache_key": "support-agent-session-7",
"input": "Draft a fix for the failing test and explain it briefly."
}
On the next turn, pass the returned reasoning items back exactly as Grok 4.7 produced them, together with your new message. Note that "Grok 4.7 Fast" is, per xAI, offered only inside its own products and not on the public API, so use the plain grok-4.7 name.
Specification
- Context window
- —
- Input and output
- Text
- Endpoints
- /v1/chat/completions, /v1/responses, /v1/messages
- Smallest pack
- $9.99
Latency and error rate per model are on the status page. status.cent-ai.dev
What a request costs
Open the full calculatorCost per request
Estimate
grok-4.7An estimate at price version 4. Your bill comes from the usage the provider reports for each request.
Save $0.6598Code
curl https://api.cent-ai.dev/v1/chat/completions \
-H "Authorization: Bearer $CENT_AI_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "grok-4.7", "messages": [{"role": "user", "content": "Hello"}]}'Set CENT_AI_KEY to a key from the dashboard. OpenAI SDKs use https://api.cent-ai.dev/v1; Anthropic SDKs use https://api.cent-ai.dev.
Price history
Version 4, in effect since Oct 30, 2026.
Effective
per 1M tokens
Inputold $0.23 new $0.20Cache readold $0.023 new $0.02Cache writeold $0.23 new $0.20Outputold $0.69 new $0.60Effective
per 1M tokens
Inputold $0.23 new $0.23Cache readold $0.0575 new $0.023Cache writeold $0.23 new $0.23Outputold $0.69 new $0.69Effective
per 1M tokens
Inputold $0.10 new $0.23Cache readold $0.025 new $0.0575Cache writeold $0.10 new $0.23Outputold $0.30 new $0.69
Compare with
- hy4-previewInput$0.46704
- deepseek-v4-proInput$0.165
- gpt-6.1-solInput$0.58
- gpt-6.1-terraInput$0.15
Questions
How much does grok-4.7 cost on Cent AI?
$0.20 per 1M input tokens and $0.60 per 1M output tokens. Cache reads cost $0.02 and cache writes $0.20 per 1M tokens. Each request is rounded up once.
Is there a minimum charge?
A successful request costs at least $0.00002. A request that ends early, because the client left or the output was cut off, pays only for its tokens.
How do I pay?
Top up a prepaid USD balance with QRIS or USDT/USDC, or buy a budget pack once. Nothing renews automatically.
What if the provider does not report usage?
The request is billed from an estimate and marked estimated on the Requests page. An estimate never contains cache tokens.
Which endpoint do I call?
/v1/chat/completions, /v1/responses, /v1/messages. The OpenAI base URL is https://api.cent-ai.dev/v1.
Try grok-4.7 with one key
One prepaid balance for every model. Pay with QRIS or USDT/USDC.