[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [Kimi K3.1 Pro](https://spiral.ai/integrations/opencode/kimi-k3-1-pro)

# How to Use Kimi K3.1 Pro in opencode

Kimi K3.1 Pro handles coding, parametric 3D design, and financial research. Compared with Kimi K3, it improves these tasks while keeping a million-token context window.

|  |  |
| --- | --- |
| Model | Kimi K3.1 Pro |
| Available through | OpenRouter |
| Category | LLM |
| Price | Up to $0.044753 per run at the default inputs. $0.31239 per 1M input tokens, $10.92299 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Kimi K3.1 Pro in opencode

- Use Kimi K3.1 Pro to investigate this project's failing tests. Reproduce one failure, make the smallest justified fix, and run the relevant checks.
- Use Kimi K3.1 Pro to add a Godot checkpoint mechanic to this project. Follow existing conventions, preserve player progress after respawning, and verify the behavior.
- Use Kimi K3.1 Pro to write a parametric modeling script for a 120 by 80 by 40 mm enclosure. Keep wall thickness and mounting-hole spacing editable, and check the resulting dimensions.
- Use Kimi K3.1 Pro with maximum reasoning effort to review this repository's financial calculation code. Trace formulas and units, identify unsupported assumptions, and test any proposed correction.
- Use Kimi K3.1 Pro to implement the feature described in this project's specification. First identify the affected modules, then make the change and verify each acceptance criterion.

## How to set up Kimi K3.1 Pro in opencode

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

### Use Spiral's MCP server

1. **Add the server**: Leave out `--global` to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

```bash
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
```

2. **Sign in**: Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, `/mcps` starts the same sign-in.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
opencode mcp list
```

### Use the Spiral skill

1. **Send opencode 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 K3.1 Pro**: 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-k3.1-pro",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

Then paste one of the prompts above: opencode finds Kimi K3.1 Pro on Spiral, shows the price and runs it.

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

## Kimi K3.1 Pro tools and prices

- [MoonshotAI: Kimi K3.1 Pro](https://spiral.ai/tools/openrouter/moonshotai/kimi-k3.1-pro) (OpenRouter): Up to $0.046871 per run at the default inputs. $0.3289 per 1M input tokens, $11.44 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 … | — |  |
| logprobs |  | — |  |

## What can you do with Kimi K3.1 Pro in opencode?

Turn project requirements into code changes and parametric modeling scripts with Kimi K3.1 Pro. Give the agent relevant files, acceptance criteria, and checks it can run.

### Repair a reproducible software bug

Give Kimi K3.1 Pro the failing behavior and relevant code. Request a focused patch and a regression check.

### Build a game mechanic

Ask Kimi K3.1 Pro to implement a small Godot, Unity, or Unreal Engine mechanic with explicit controls and acceptance criteria.

### Design an adjustable mechanical part

Give Kimi K3.1 Pro dimensions and constraints for a bracket or enclosure. Request parametric modeling code with named measurements.

### Draft an architectural model

Ask Kimi K3.1 Pro for a parametric room or building model from a written brief, with units and dimensions stated explicitly.

### Compare financial disclosures

Have Kimi K3.1 Pro reconcile figures across supplied disclosures, citing each source and flagging conflicting periods or units.

### Review financial model assumptions

Ask Kimi K3.1 Pro to check the supplied formulas and assumptions, then explain which changes affect the conclusion.

### Answer questions across lengthy reference material

Give Kimi K3.1 Pro a defined reference set and ask for an answer tied to named sections, with missing evidence identified.

### Prepare a recurring research brief

Use Kimi K3.1 Pro to compare newly retrieved evidence with an earlier brief and report supported changes.

## Overview

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

## Kimi K3.1 Pro in other agents

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

## More opencode guides

- [Kimi K3](https://spiral.ai/integrations/opencode/kimi-k3)
- [Kimi K3.1 Pro (batch)](https://spiral.ai/integrations/opencode/kimi-k3-1-pro-batch)
- [Kimi K2.7 Code](https://spiral.ai/integrations/opencode/kimi-k2-7-code)
- [Kimi Latest](https://spiral.ai/integrations/opencode/kimi-latest)
- [Kimi K2.6](https://spiral.ai/integrations/opencode/kimi-k2-6)
- [LFM2.5-24B-A2B](https://spiral.ai/integrations/opencode/lfm2-5-24b-a2b)

## Questions about Kimi K3.1 Pro in opencode

**Can opencode use Kimi K3.1 Pro?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Kimi K3.1 Pro like any built-in tool.

**How much does Kimi K3.1 Pro cost in opencode?**

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

**Do I need an OpenRouter account to use Kimi K3.1 Pro in opencode?**

No. Spiral runs Kimi K3.1 Pro 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 K3.1 Pro in opencode?**

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

**Does opencode wait while Kimi K3.1 Pro runs?**

Kimi K3.1 Pro runs in the background. opencode starts the run, checks on it and gives you the text, json when it's ready.

**What is Kimi K3.1 Pro useful for?**

Coding, parametric 3D design, and financial research are documented strengths. Give it a concrete deliverable, constraints, and a way to check the result.

**How much context can Kimi K3.1 Pro handle?**

Its context window is 1,048,576 tokens. That figure is not a promise of an equally long answer; NVIDIA's documentation leaves the separate output maximum undisclosed.

**What kinds of 3D design suit Kimi K3.1 Pro?**

Parametric mechanical parts and architectural models are documented strengths. Specify dimensions, units, and which measurements should remain editable.

**Which reasoning effort should I choose?**

Use low effort for straightforward work and try high or maximum effort for harder reasoning. Compare results on a representative task, since additional reasoning also affects response time and token usage.

**Can I trust Kimi K3.1 Pro's financial research without checking it?**

Verify material claims and calculations against the cited evidence. Moonshot still measured factual errors on its internal hard stress test, and explicitly says those results do not describe everyday error rates.

