[Integrations](https://spiral.ai/integrations) › [Google Antigravity](https://spiral.ai/integrations/antigravity) › [Kimi K2.7 Code](https://spiral.ai/integrations/antigravity/kimi-k2-7-code)

# How to Use Kimi K2.7 Code in Google Antigravity

Kimi K2.7 Code is built for debugging, refactoring, and implementing changes across multiple files. Compared with Kimi K2.6, it targets longer coding tasks; Moonshot recommends Kimi K2.6 for general writing and conversation.

|  |  |
| --- | --- |
| Model | Kimi K2.7 Code |
| Available through | OpenRouter |
| Category | LLM |
| Price | Up to $0.018665 per run at the default inputs. $0.78 per 1M input tokens, $4.55 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Kimi K2.7 Code in Google Antigravity

- Use Kimi K2.7 Code to investigate the failing tests in this project. Reproduce the failure, trace its cause, make a focused fix, and report the checks you ran.
- Use Kimi K2.7 Code to add pagination to the existing search feature. Inspect the project's conventions, update the affected components, and test empty results and the final page.
- Use Kimi K2.7 Code to consolidate duplicated validation logic in this repository. Preserve public interfaces and verify that existing error behavior stays consistent.
- Use Kimi K2.7 Code to review the current diff against the issue's acceptance criteria. Identify concrete defects with file references and explain how to reproduce each one.
- Use Kimi K2.7 Code to migrate this project's deprecated library calls. Inventory the affected files, make the changes in stages, and run the relevant checks after each stage.

## How to set up Kimi K2.7 Code in Google Antigravity

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

### Use Spiral's MCP server

1. **Open the MCP config**: * Antigravity App: click Customizations, then Installed. In the MCP Servers section, click Copy Config File Path and open that file. * Antigravity IDE: click … at the top of the agent side panel, select MCP Servers, then Manage MCP Servers › View raw config. * Antigravity CLI: edit `~/.gemini/config/mcp_config.json`.

2. **Add the server**: Add Spiral under `mcpServers`:

```json
{
  "mcpServers": {
    "spiral": {
      "serverUrl": "https://api.spiral.ai/mcp"
    }
  }
}
```

3. **Sign in**: In the Antigravity App, open Customizations › Installed. Under MCP Servers, click Authenticate next to Spiral. Sign in to Spiral, pick the organization and click Authorize. Copy the authorization code the browser shows, paste it into Enter authorization code and click Submit. No API key.

### Use the Spiral skill

1. **Send Google Antigravity 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 Kimi K2.7 Code**: 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": "moonshotai/kimi-k2.7-code",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

Then paste one of the prompts above: Google Antigravity finds Kimi K2.7 Code on Spiral, shows the price and runs it.

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

## Kimi K2.7 Code tools and prices

- [MoonshotAI: Kimi K2.7 Code](https://spiral.ai/tools/openrouter/moonshotai/kimi-k2.7-code) (OpenRouter): Up to $0.016002 per run at the default inputs. $0.78 per 1M input tokens, $3.90 per 1M output tokens.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| seed |  | — |  |
| stop |  | — |  |
| min_p | 0 to 1 | — |  |
| tools |  | — |  |
| top_k | 0 to … | — |  |
| top_p | 0 to 1 | — |  |

## What can you do with Kimi K2.7 Code in Google Antigravity?

Kimi K2.7 Code can carry a bug fix or feature through changes across multiple project files. Give the agent a concrete result to achieve and ask it to verify the result with the project's checks.

### Fix a bug across multiple files

Ask Kimi K2.7 Code to trace a reported failure through the relevant code, propose a repair, and check it against the reproduction steps.

### Implement a complete feature

Give Kimi K2.7 Code acceptance criteria for a feature that touches several components. Request the implementation and a report of which criteria were verified.

### Refactor shared logic

Have Kimi K2.7 Code consolidate duplicated behavior while preserving existing interfaces and test expectations.

### Investigate failing tests

Give Kimi K2.7 Code the failure output and relevant implementation. Ask for the likely cause, a focused correction, and regression coverage.

### Plan a code migration

Ask Kimi K2.7 Code to identify affected components, order the changes, and define checks for each stage of a migration.

### Review a proposed change

Ask Kimi K2.7 Code to compare a patch with its requirements and identify concrete behavior changes that need testing.

### Investigate recurring failures

Use Kimi K2.7 Code to examine successive test or incident reports, track unresolved hypotheses, and propose the next diagnostic step.

## Overview

- [OpenRouter](https://spiral.ai/providers/openrouter)
- [All Google Antigravity guides](https://spiral.ai/integrations/antigravity)

## Kimi K2.7 Code in other agents

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

## More Google Antigravity guides

- [Kimi K2.6](https://spiral.ai/integrations/antigravity/kimi-k2-6)
- [Kimi K3](https://spiral.ai/integrations/antigravity/kimi-k3)
- [Kimi K2.5](https://spiral.ai/integrations/antigravity/kimi-k2-5)
- [Kimi K3.1 Pro](https://spiral.ai/integrations/antigravity/kimi-k3-1-pro)
- [Kimi K2 Thinking](https://spiral.ai/integrations/antigravity/kimi-k2-thinking)
- [Kimi K3.1 Pro (batch)](https://spiral.ai/integrations/antigravity/kimi-k3-1-pro-batch)

## Questions about Kimi K2.7 Code in Google Antigravity

**Can Google Antigravity use Kimi K2.7 Code?**

Yes. Add Spiral to Google Antigravity as an MCP server, and Google Antigravity can find and run Kimi K2.7 Code like any built-in tool.

**How much does Kimi K2.7 Code cost in Google Antigravity?**

Up to $0.018665 per run at the default inputs. $0.78 per 1M input tokens, $4.55 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Google Antigravity plan is separate.

**Do I need an OpenRouter account to use Kimi K2.7 Code in Google Antigravity?**

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

**How long does it take to set up Kimi K2.7 Code in Google Antigravity?**

About two minutes: open the MCP config, then add the server, then sign in.

**Does Google Antigravity wait while Kimi K2.7 Code runs?**

Kimi K2.7 Code runs in the background. Google Antigravity starts the run, checks on it and gives you the text, json when it's ready.

**What is Kimi K2.7 Code best suited for?**

Use it for coding tasks that require several connected changes, such as tracing a bug, refactoring a codebase, or implementing a feature across multiple files.

**How much context can Kimi K2.7 Code handle?**

It has a 256K-token context window. For code review, prioritize the relevant implementation, requirements, and test results so the task stays focused.

**Can Kimi K2.7 Code run without thinking?**

No. Kimi K2.7 Code always uses thinking mode.

**Which sampling settings does Moonshot recommend?**

Moonshot recommends temperature 1.0 and top_p 0.95. Use those as your starting point when evaluating coding results.

**Does Kimi K2.7 Code retain reasoning between turns?**

Yes. It preserves reasoning across turns, which supports coding tasks that continue through several rounds of investigation and changes.

