Grok 4.7 API
Grok 4.7 by xAI on one AI Creator API key, in Claude Code, Codex, Cline, OpenCode and Aider. You pay for the actual tokens; the balance is in dollars, topped up by card or crypto.
Price per 1M tokens
Prices as of
| Tokens | AI Creator API |
|---|---|
| Input | $0.02 |
| Cache read | $0.004 |
| Cache write, 5 minutes | $0.39 |
| Cache write, 1 hour | $0.39 |
| Output | $0.058 |
- A dash means the model has no such price. Cache reads and writes are counted apart from input: a token lands in one counter only.
- Every model and its prices are on the pricing page.
Specs
| Property | Value |
|---|---|
| Id for the model field | grok-4.7 |
| Vendor | xAI |
| Protocols | OpenAI Chat Completions, OpenAI Responses, Anthropic Messages |
| Context | 500K tokens |
| Max output | 32.8K tokens |
How to connect
You need an sk-aic-… key: the dashboard issues it after you sign in. Then set up your tool.
Claude Code
The model to work on is set by ANTHROPIC_MODEL; the other variables pin the models behind Claude Code’s names, or it may send an id we do not list. In detail: the Claude Code setup.
unset ANTHROPIC_API_KEY
export ANTHROPIC_BASE_URL=https://api.aicreator.app
export ANTHROPIC_AUTH_TOKEN=sk-aic-…
export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-5-5
export ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-5-5
export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-5-5
export ANTHROPIC_DEFAULT_FABLE_MODEL=claude-fable-5-2
export ANTHROPIC_MODEL=grok-4.7
claudeCodex CLI
The key goes in the AIC_API_KEY variable. In detail: the Codex setup.
model = "grok-4.7"
model_provider = "aic"
[model_providers.aic]
name = "AI Creator"
base_url = "https://api.aicreator.app/v1"
env_key = "AIC_API_KEY"
wire_api = "responses"
stream_idle_timeout_ms = 300000Cline, OpenCode, Aider and the OpenAI SDK
The OpenAI Chat Completions protocol, model id grok-4.7. Tool setup: Cline, OpenCode, Aider. Check the key with a request:
curl https://api.aicreator.app/v1/chat/completions \
-H "Authorization: Bearer $AIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "grok-4.7", "messages": [{"role": "user", "content": "Hello"}]}'Other xAI models
- Grok 4.6 input $0.04 / output $0.12