Skip to content

Grok 4.7

Grok 4.7 is SpaceXAI's flagship model for coding, agentic tasks, and knowledge work, succeeding Grok 4.6.

Pricing

Input
$2.10per 1M tokens
Output
$6.30per 1M tokens
Cache read
$0.525per 1M tokens
Max output
450,000tokens

OpenRouter's price plus OpenRouter's 5% platform fee. Deference adds no markup.

opencode.json

{
  "provider": {
    "deference": {
      "npm": "@ai-sdk/openai-compatible",
      "options": { "baseURL": "https://deference.si/v1", "apiKey": "{env:DEFERENCE_API_KEY}" },
      "models": { "x-ai/grok-4.7": { "limit": { "context": 500000, "output": 450000 } } }
    }
  }
}
OpenCode, set up for Grok 4.7

Find us on