---
title: "Grok 4.7 API: pricing and setup — AI Creator API"
description: "Grok 4.7 API for Claude Code, Codex, Cline, OpenCode and Aider: $0.02 per 1M input and $0.058 per 1M output tokens, pay as you go."
url: https://llm.aicreator.app/en/models/grok-4.7/
lang: en
updated: 2026-11-11
---

# 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 November 11, 2026

| 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](https://llm.aicreator.app/en/pricing/).

## 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](https://llm.aicreator.app/en/docs/claude-code/).

```bash
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
claude
```

### Codex CLI

The key goes in the `AIC_API_KEY` variable. In detail: [the Codex setup](https://llm.aicreator.app/en/docs/codex/).

```toml title="~/.codex/config.toml"
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 = 300000
```

### Cline, OpenCode, Aider and the OpenAI SDK

The OpenAI Chat Completions protocol, model id `grok-4.7`. Tool setup: [Cline](https://llm.aicreator.app/en/docs/cline/), [OpenCode](https://llm.aicreator.app/en/docs/opencode/), [Aider](https://llm.aicreator.app/en/docs/aider/). Check the key with a request:

```bash
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](https://llm.aicreator.app/en/models/grok-4.6/) input $0.04 / output $0.12
