Grok 4.7 API
xAI model for coding, knowledge work and multi-step tool workflows. Available through the OpenAI-compatible Chat Completions API. Input contexts above 200K tokens use a separate tariff.
Starting at
$0.23
input price per 1M tokens
Grok 4.7 playground
Output

Start a conversation
Ask Grok 4.7 anything. Messages are sent directly to the API and charged by token usage.
Sign in to chatGrok 4.7 API pricing
The base rates apply when total input is at most 200000 tokens, including cache reads and writes. Above this threshold, the long-context rates apply to the whole request, including output, not just the excess tokens.
If a cache rate is absent, reads and writes use the input rate. An absent 1h write rate uses the ordinary cache-write rate, or input if that is also absent.
| Token type | Base: input ≤ 200000 | Long context: input > 200000 |
|---|---|---|
| Input | $0.23 | $0.46 |
| Output | $0.69 | $1.38 |
| Cache read | $0.058 | $0.115 |
| Cache write | $0.23 | $0.46 |
Quick start
Full API reference →1curl -X POST https://api.api-stock.com/api/v1/chat/completions \2 -H "Authorization: Bearer $API_STOCK_KEY" \3 -H "Content-Type: application/json" \4 -d '{5 "model": "grok-4.7",6 "messages": [7 {8 "role": "user",9 "content": "A cinematic shot of a city at dusk"10 }11 ]12 }'
Frequently asked questions
How much does Grok 4.7 cost?
Grok 4.7 starts at $0.23 per 1M input tokens on API Stock. The final charge depends on the selected settings.
When was Grok 4.7 released?
Grok 4.7 was released on September 21, 2026 and is available through API Stock.
How do I get an API key for Grok 4.7?
Create an account and API key on API Stock, then fund your balance. The same key works with Grok 4.7 and other catalog models.
How is long context priced for Grok 4.7?
The base rates apply when total input is at most 200000 tokens, including cache reads and writes. Above this threshold, the long-context rates apply to the whole request, including output, not just the excess tokens. Above-threshold rates per 1M tokens: Input: $0.46; Output: $1.38; Cache read: $0.115; Cache write: $0.46. If a cache rate is absent, reads and writes use the input rate. An absent 1h write rate uses the ordinary cache-write rate, or input if that is also absent.
How do I call the Grok 4.7 API?
Send a POST request to https://api.api-stock.com/api/v1/chat/completions with your API key and the model "grok-4.7", using the openai-compatible request format shown in the quick start above.
What happens if a Grok 4.7 request fails?
API Stock automatically retries the request on a reserve provider. If every provider fails, the charge is refunded to your balance.
Can I use Grok 4.7 with the same API key as other models?
Yes. Use your API Stock API key and balance for Grok 4.7 and other catalog models.
Other Chat models
- GPT 6 LunaOpenAI$0.12/ 1M tokens
- DeepSeek V4 FlashDeepSeek$0.168/ 1M tokens
- GPT 5.6 LunaOpenAI$0.18/ 1M tokens
- Claude Sonnet 5Anthropic$0.3/ 1M tokens
- Qwen3.7 PlusQwen$0.343/ 1M tokens
- MiniMax M3MiniMax$0.36/ 1M tokens
- DeepSeek V4 ProDeepSeek$0.522/ 1M tokens
- Grok 4.5xAI$2.1/ 1M tokens
- Grok 4.6xAI$2.1/ 1M tokens
Guides
- Choose a model for an agent taskCompare models on completed tool-using tasks, repeated attempts and observed cost before setting an agent's default.2 min read
- LLM API pricing: GPT, Claude, Gemini, DeepSeek comparedCompare LLM API pricing for GPT, Claude, Gemini, DeepSeek, Grok and Kimi per 1M tokens, with worked monthly cost examples and practical ways to cut the bill.9 min read
- Give your coding agent image, video and music toolsConnect Claude Code, Codex, OpenCode or OpenClaw to API Stock and use generated media in a page, app or content draft.3 min read
