[Integrations](https://spiral.ai/integrations) › [Gemini CLI](https://spiral.ai/integrations/gemini-cli) › [Grok 4.6](https://spiral.ai/integrations/gemini-cli/grok-4-6)

# How to Use Grok 4.6 in Gemini CLI

Grok 4.6 suits extended coding tasks, research synthesis, and turning product ideas into working applications. Compared with Grok 4.5, the maker reports stronger first passes on visual and interactive projects.

|  |  |
| --- | --- |
| Model | Grok 4.6 |
| Available through | OpenRouter |
| Category | LLM |
| Price | Up to $0.03204 per run at the default inputs. $2.60 per 1M input tokens, $7.80 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Grok 4.6 in Gemini CLI

- Use Grok 4.6 with high reasoning effort to investigate the failing checkout test in this project. Reproduce the failure, fix its cause, and report the checks you ran.
- Use Grok 4.6 to build a working appointment scheduler in this project. Include weekly navigation, appointment editing, and empty states. Check each interaction before finishing.
- Use Grok 4.6 with extra-high reasoning effort to trace how permissions move through this codebase. Propose a refactor that preserves behavior and explain the tests needed.
- Use Grok 4.6 to compare this project's implementation with its requirements. List gaps by user impact, implement the highest-impact gap, and verify the result.
- Use Grok 4.6 to investigate the slow report-generation path in this project. Measure a baseline, test one focused improvement, and report the before-and-after results.

## How to set up Grok 4.6 in Gemini CLI

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the server**: Or add it to `~/.gemini/settings.json` yourself:

```bash
gemini mcp add --scope user --transport http spiral https://api.spiral.ai/mcp
```

2. **Sign in**: Start `gemini` and run:

```text
/mcp auth spiral
```

3. **Check it**: In Gemini CLI, run `/mcp`. From your shell:

```bash
gemini mcp list
```

### Use the Spiral skill

1. **Send Gemini CLI this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run Grok 4.6**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "openrouter",
    "model": "x-ai/grok-4.6",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

Then paste one of the prompts above: Gemini CLI finds Grok 4.6 on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/gemini-cli

## Grok 4.6 tools and prices

- [SpaceXAI: Grok 4.6](https://spiral.ai/tools/openrouter/x-ai/grok-4.6) (OpenRouter): Up to $0.03204 per run at the default inputs. $2.60 per 1M input tokens, $7.80 per 1M output tokens.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| seed |  | — |  |
| tools |  | — |  |
| top_p | … to 1 | — |  |
| reasoning |  | — | Reasoning effort; reasoning tokens count toward max_tokens. |
| max_tokens | 1 to 450000 | — | The most output tokens to generate. |
| temperature | 0 to 2 | — |  |

## What can you do with Grok 4.6 in Gemini CLI?

Turn a product brief or difficult software issue into a concrete implementation with Grok 4.6. Give the agent acceptance criteria so it can inspect the project, make changes, and check its work.

### Resolve a codebase issue

Have Grok 4.6 investigate a reported bug, propose a focused patch, and check the result against the original reproduction.

### Build an interactive prototype

Give Grok 4.6 a product brief with concrete interactions and acceptance criteria, then iterate on a working first version.

### Prepare a research brief

Ask Grok 4.6 to synthesize supplied evidence into findings, disagreements, and questions that need further investigation.

### Analyze business data

Use Grok 4.6 to investigate changes in a data table and draft an explanation that separates observations from hypotheses.

### Draft a decision memo

Turn requirements, constraints, and competing proposals into a recommendation with explicit tradeoffs and supporting evidence.

### Interpret a visual reference

Ask Grok 4.6 to describe a supplied interface image and turn its visible interactions into an implementation brief.

### Extract structured findings

Convert supplied text into consistently organized records for review, with missing information explicitly marked.

## Overview

- [OpenRouter](https://spiral.ai/providers/openrouter)
- [All Gemini CLI guides](https://spiral.ai/integrations/gemini-cli)

## Grok 4.6 in other agents

- [Amp](https://spiral.ai/integrations/amp/grok-4-6)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/grok-4-6)
- [Claude](https://spiral.ai/integrations/claude-desktop/grok-4-6)
- [Claude Code](https://spiral.ai/integrations/claude-code/grok-4-6)
- [Cline](https://spiral.ai/integrations/cline/grok-4-6)
- [Codex](https://spiral.ai/integrations/codex/grok-4-6)
- [Cursor](https://spiral.ai/integrations/cursor/grok-4-6)
- [Devin](https://spiral.ai/integrations/devin/grok-4-6)
- [dots](https://spiral.ai/integrations/dots/grok-4-6)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/grok-4-6)
- [Gemini](https://spiral.ai/integrations/gemini/grok-4-6)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/grok-4-6)
- [goose](https://spiral.ai/integrations/goose/grok-4-6)
- [Grok](https://spiral.ai/integrations/grok/grok-4-6)
- [Grok Build](https://spiral.ai/integrations/grok-build/grok-4-6)
- [Hermes](https://spiral.ai/integrations/hermes/grok-4-6)
- [Instinct](https://spiral.ai/integrations/instinct/grok-4-6)
- [Manus](https://spiral.ai/integrations/manus/grok-4-6)
- [Muse](https://spiral.ai/integrations/muse/grok-4-6)
- [Muse Code](https://spiral.ai/integrations/muse-code/grok-4-6)
- [n8n](https://spiral.ai/integrations/n8n/grok-4-6)
- [Notion](https://spiral.ai/integrations/notion/grok-4-6)
- [OpenClaw](https://spiral.ai/integrations/openclaw/grok-4-6)
- [opencode](https://spiral.ai/integrations/opencode/grok-4-6)
- [Perplexity](https://spiral.ai/integrations/perplexity/grok-4-6)
- [Raycast](https://spiral.ai/integrations/raycast/grok-4-6)
- [VS Code](https://spiral.ai/integrations/vscode/grok-4-6)
- [Windsurf](https://spiral.ai/integrations/windsurf/grok-4-6)
- [Zapier](https://spiral.ai/integrations/zapier/grok-4-6)

## More Gemini CLI guides

- [Grok 4.5](https://spiral.ai/integrations/gemini-cli/grok-4-5)
- [Grok 4.7](https://spiral.ai/integrations/gemini-cli/grok-4-7)
- [Grok 4.3](https://spiral.ai/integrations/gemini-cli/grok-4-3)
- [Grok Latest](https://spiral.ai/integrations/gemini-cli/grok-latest)
- [Grok 4.20 Multi-Agent](https://spiral.ai/integrations/gemini-cli/grok-4-20-multi-agent)
- [Hermes 4 405B](https://spiral.ai/integrations/gemini-cli/hermes-4-405b)

## Questions about Grok 4.6 in Gemini CLI

**Can Gemini CLI use Grok 4.6?**

Yes. Add Spiral to Gemini CLI as an MCP server, and Gemini CLI can find and run Grok 4.6 like any built-in tool.

**How much does Grok 4.6 cost in Gemini CLI?**

Up to $0.03204 per run at the default inputs. $2.60 per 1M input tokens, $7.80 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Gemini CLI plan is separate.

**Do I need an OpenRouter account to use Grok 4.6 in Gemini CLI?**

No. Spiral runs Grok 4.6 on its own OpenRouter account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Grok 4.6 in Gemini CLI?**

About two minutes: add the server, then sign in, then check it.

**Does Gemini CLI wait while Grok 4.6 runs?**

Grok 4.6 runs in the background. Gemini CLI starts the run, checks on it and gives you the text, json when it's ready.

**What is Grok 4.6 best suited to?**

Grok 4.6 is designed for difficult coding and knowledge-work tasks that require several steps and tool use. Practical examples include investigating a software issue, analyzing information, and developing a working application.

**How much context can Grok 4.6 handle?**

The maker documents a 500,000-token context window. It also lists no separate text output limit; that statement does not promise an unlimited response in a single request.

**Can Grok 4.6 create images?**

Grok 4.6 accepts images for analysis but produces text. Its visual-work strengths include writing application code and interpreting visual references.

**When should I increase reasoning effort?**

Increase effort for difficult analysis, debugging, or tasks with several dependent decisions. Extra-high effort provides deeper reasoning with higher latency, so reserve it for work where that tradeoff helps.

**How should I prompt Grok 4.6?**

State the task, constraints, and required output directly. For example, request a decision memo with a recommendation, supporting evidence, unresolved questions, and a clear word limit.

