[Integrations](https://spiral.ai/integrations) › [Grok](https://spiral.ai/integrations/grok) › [OpenRouter](https://spiral.ai/integrations/grok/openrouter)

# How to Use OpenRouter in Grok

To use OpenRouter in Grok, connect Spiral to Grok once, then ask for what you want in plain words. Grok can then reach all 270 OpenRouter tools on Spiral, priced per run from one balance.

|  |  |
| --- | --- |
| Tools | 270 |
| Categories | LLM |
| Served by | OpenRouter |
| Pricing | Pay per run, no subscription |
| Setup | About 2 minutes, no API key |

## Prompts to try with OpenRouter in Grok

- Ask OpenRouter through Spiral to review the diff on this branch and list the three riskiest changes.
- Get a second opinion from OpenRouter on this function, then tell me what the call cost.
- Summarize these release notes with OpenRouter in five bullet points.
- Ask OpenRouter to review this plan and list the three biggest risks, with a fix for each.
- Compare OpenRouter with my current model on this prompt and tell me which answer is better and what each cost.

## How to set up OpenRouter in Grok

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

### Use the Grok connector

1. **Add a custom connector**: In Grok open Settings › Connect Apps, then Add a custom connector. Name it Spiral, paste this URL, leave Headers empty and click Add MCP.

```text
https://api.spiral.ai/mcp
```

2. **Sign in to Spiral and approve**: Grok opens Spiral: sign in, pick the organization and click Authorize. Spiral gives the connection its own API key; Grok never sees it, and you can remove the connection under Settings › Connected apps.

3. **Check that it is connected**: Connect Apps › Custom shows Spiral as Connected. It works in every Grok chat and Grok bot.

### Use the Spiral skill

1. **Send Grok 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 OpenRouter**: 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": "meta-llama/llama-4-maverick",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

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

Setup guide in the docs: https://spiral.ai/docs/quickstarts/grok

## OpenRouter tools and prices

- [Meta: Llama 4 Maverick](https://spiral.ai/tools/openrouter/meta-llama/llama-4-maverick) (OpenRouter): Up to $0.005342 per run at the default inputs. $0.455 per 1M input tokens, $1.30 per 1M output tokens.
- [MoonshotAI: Kimi K2.6](https://spiral.ai/tools/openrouter/moonshotai/kimi-k2.6) (OpenRouter): Up to $0.018189 per run at the default inputs. $0.845 per 1M input tokens, $4.433 per 1M output tokens.
- [DeepSeek: DeepSeek V4 Flash 0731](https://spiral.ai/tools/openrouter/deepseek/deepseek-v4-flash-0731) (OpenRouter): Up to $0.368053 per run at the default inputs. $0.05759 per 1M input tokens, $0.39 per 1M output tokens.

## What can you do with OpenRouter in Grok?

Grok can answer, write and review code with OpenRouter when you ask in plain words. It picks the tool, shows the price before it runs and returns the result right in the chat.

### Second opinions

Have another model review a diff or a plan before you commit to it.

### Cheaper bulk work

Send summaries, tagging and rewrites to a smaller model and keep your agent's own model for hard steps.

### Models your agent lacks

Reach open and frontier models your agent's vendor does not offer.

### Long documents

Summarize reports and contracts too long to read in one sitting.

### Long documents

Send a long spec or contract to a model with a large context window.

### Structured output

Turn messy notes into JSON your code can read.

## Overview

- [OpenRouter](https://spiral.ai/providers/openrouter)
- [All Grok guides](https://spiral.ai/integrations/grok)

## OpenRouter in other agents

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

## More Grok guides

- [Wildfire Risk to Communities place summary](https://spiral.ai/integrations/grok/wildfire-risk-to-communities-place-summary)
- [Replicate](https://spiral.ai/integrations/grok/replicate)
- [Wildfire Risk to Communities place search](https://spiral.ai/integrations/grok/wildfire-risk-to-communities-place-search)
- [WaveSpeed AI](https://spiral.ai/integrations/grok/wavespeed)
- [Wildfire Risk to Communities place rankings](https://spiral.ai/integrations/grok/wildfire-risk-to-communities-place-rankings)
- [fal](https://spiral.ai/integrations/grok/fal)

## Questions about OpenRouter in Grok

**Can Grok use OpenRouter?**

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

**How much does OpenRouter cost in Grok?**

Each tool has its own price, for example Meta: Llama 4 Maverick: Up to $0.005342 per run at the default inputs. $0.455 per 1M input tokens, $1.30 per 1M output tokens; MoonshotAI: Kimi K2.6: Up to $0.018189 per run at the default inputs. $0.845 per 1M input tokens, $4.433 per 1M output tokens; DeepSeek: DeepSeek V4 Flash 0731: Up to $0.001601 per run at the default inputs. $0.05642 per 1M input tokens, $0.39 per 1M output tokens. You pay per run from one Spiral balance, and failed runs are free.

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

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

**How long does it take to set up OpenRouter in Grok?**

About two minutes: add a custom connector, then sign in to Spiral and approve, then check that it is connected.

**Does Grok wait while OpenRouter runs?**

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

**Why call OpenRouter from Grok?**

For a second opinion, a cheaper model for bulk work, or a model your agent doesn't offer. Your agent calls OpenRouter through Spiral and pays only for the tokens used.

**Which OpenRouter tools can Grok use?**

Grok can reach all 270 OpenRouter tools on Spiral, covering LLM. Popular ones include Meta: Llama 4 Maverick, MoonshotAI: Kimi K2.6, and DeepSeek: DeepSeek V4 Flash 0731. Ask for one by name, or describe the task and Grok picks a fitting tool.

**Can Grok compare OpenRouter tools?**

Yes. Ask Grok to run the same request on two OpenRouter tools and show both results with what each cost. Each run is priced and billed on its own.

**What happens if a OpenRouter run fails in Grok?**

It is not charged. Spiral holds the estimated price when the run starts and returns it to your balance if the run fails on Spiral's side or the provider's. Grok gets the error and can retry or try another tool.

**Is there a OpenRouter subscription or plan?**

No. Spiral is pay as you go from one prepaid balance, with no plans or minimums, and credits never expire. Auto top-up keeps Grok from stopping when the balance runs low.

