Grok 4.7 is xAI's text model for coding, agentic tasks, and knowledge work. Use HiAPI Chat Completions for streaming, JSON objects, tools, and four reasoning efforts.
Provider: Grok
Category: text generation
Endpoint: /v1/chat/completions
Status: Available
Cost: --
grok-4.7
Grok 4.7 is xAI's text model for coding, agentic tasks, and knowledge work. Use HiAPI Chat Completions for streaming, JSON objects, tools, and four reasoning efforts.
API access
Endpoint
POST /v1/chat/completions
Base URL
https://api.hiapi.ai
OpenAI Chat Completions compatible. Use one HiAPI key across all available models.
Input price
1,680 Credits
/ 1M tokens · Total input ≤ 199,999 tokens
Output price
5,040 Credits
/ 1M tokens · Total input ≤ 199,999 tokens
Context
500K
context window
Max output
64K
output tokens
Try grok-4.7
Ask a question to stream the answer and inspect token usage, latency, and estimated cost.
grok-4.7 API Quickstart
Call grok-4.7 with the OpenAI-compatible Chat Completions format. Copy a ready-to-use cURL, Python, or Node.js example below.
/v1/chat/completionscurl -X POST "https://api.hiapi.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.7",
"messages": [
{
"role": "user",
"content": "请分析这段代码的潜在问题,并给出可验证的修复方案。"
}
],
"stream": false,
"reasoning_effort": "high"
}'Tip: Replace YOUR_API_KEY with your actual API key from the API Keys page.
Compatible with the OpenAI Chat Completions format. Set the base URL, API key, and model name to get started.
grok-4.7 API Pricing
Billing follows the input, output, and cache token categories actually reported in usage. All prices below are shown per 1 million tokens.
Total input ≤ 199,999 tokens
- Input tokens
- 1,680 Credits/ 1M tokens
- Output tokens
- 5,040 Credits/ 1M tokens
Prompts and context sent to the model
Responses and reasoning generated by the model
- Cache read
- 420 Credits/ 1M tokens
Long-context pricing and billing details
The tier is selected by total input tokens per request, including cache reads and writes. Above the threshold, that tier applies to all input, output, and cache tokens in the request, not only the excess.
| Token type | Total input ≤ 199,999 tokens | Total input > 199,999 tokens |
|---|---|---|
| Input | 1,680 Credits | 3,360 Credits |
| Output | 5,040 Credits | 10,080 Credits |
| Cache read | 420 Credits | 840 Credits |
All prices are per 1 million tokens.
grok-4.7 Model Specifications
These specifications reflect the current public HiAPI text request contract. Undisclosed capabilities are not inferred by the page.
- Streaming
- Supported
- Tool calling
- Supported
- Structured JSON
- Supported
- Reasoning
- Supported
- Input modalities
- text
- Output modalities
- text
- Reasoning efforts
- low · medium · high · xhigh
- Max output
- 64K
About grok-4.7
Grok 4.7 is xAI's text model for coding, agentic tasks, and knowledge work. Use HiAPI Chat Completions for streaming, JSON objects, tools, and four reasoning efforts.
HiAPI exposes this model through /v1/chat/completions. Test prompts and parameters in the Playground, then use the same HiAPI API key in your server application.
- Provider
- Grok
- Endpoint
- /v1/chat/completions
- Context window
- 500K
- Released
- 2026-09-21
How to Use grok-4.7
The Playground and API share the same model ID, so three steps take a prompt into production.
Step 1
Validate online
Test the system prompt, output length, and model-supported reasoning options in the Playground.
Step 2
Manage API keys
View an existing key or create another after signing in; one key works across all available models.
Step 3
Integrate your server
Send requests to /v1/chat/completions and track cost with the usage object.
Frequently asked questions
What is Grok 4.7?
Grok 4.7 is xAI's text model for coding, agentic tasks, and knowledge work, available through HiAPI Chat Completions.
Which endpoint and model ID should I use?
Use POST /v1/chat/completions with model=grok-4.7.
Which reasoning efforts are supported?
Use reasoning_effort=low, medium, high, or xhigh. The default is high, and reasoning tokens count as output tokens.
Which capabilities are supported?
The HiAPI surface includes streaming, JSON objects, and function tools. Invalid reasoning_effort values return HTTP 400 before upstream dispatch.
Are image input and Responses available?
They are not part of the initial HiAPI public contract; use text messages with Chat Completions.
How are tokens billed?
Input, output, and cached input use live rates on the model and pricing pages; reasoning counts as output.