# xAI Grok 4.7 API

> Grok 4.7 is xAI's flagship reasoning model for coding, agentic tasks and knowledge work, released on the xAI API in September 2026 as the successor to Grok 4.6. xAI says it uses a larger base model and a longer reinforcement learning run weighted toward multi-hour problems, making it better at checking its own work, managing long context and producing documents and presentations. It accepts text and image input, returns text, and supports configurable reasoning effort.

Source: https://www.sandbase.ai/models/x-ai/grok-4.7
API reference: https://www.sandbase.ai/models/x-ai/grok-4.7/docs

## Facts

- Provider: xAI
- Type: Language model
- Model ID: `x-ai/grok-4.7`
- Price: $1.50 per 1M input tokens, $4.50 per 1M output tokens (25% off list price)
- Context window: 500K tokens, up to 450K output tokens
- Capabilities: chat, vision, reasoning, structured output, function calling
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Chat Completions API: `POST https://api.sandbase.ai/v1/chat/completions`

```bash
curl -X POST https://api.sandbase.ai/v1/chat/completions \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "x-ai/grok-4.7",
  "messages": [
    {
      "role": "user",
      "content": "Hello"
    }
  ],
  "max_tokens": 2048
}'
```

## FAQ

### How do I call xAI Grok 4.7 through SandBase?

Create a SandBase API key, then send requests with the model ID "x-ai/grok-4.7" to Chat Completions API (/v1/chat/completions) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### How much does xAI Grok 4.7 cost?

$1.50 per 1M input tokens and $4.50 per 1M output tokens with the current 25% discount (list price $2 / $6), billed per request from your SandBase balance.

### What is the context window of xAI Grok 4.7?

500K tokens of context, with up to 450K output tokens per response.

### How does xAI Grok 4.7 score on benchmarks?

xAI Grok 4.7 scores 46.4 on the Artificial Analysis Intelligence Index (v4.3), ranking #10 of 83 models on SandBase. Source: Artificial Analysis, measured as Grok 4.7 (Xhigh).

### Which features does xAI Grok 4.7 support?

xAI Grok 4.7 supports vision (image input), reasoning, function calling, structured output. See Specifications above for the full list.

### Do I need a separate xAI account?

No. One SandBase API key and balance gives you access to xAI Grok 4.7 and the other models in the catalog; you do not need to sign up with xAI separately.
