Spiral gives your agent every tool with one account. Browse the tools →

opencode · LLM

How to Use Kimi K3.1 Pro (batch) in opencode

Use Kimi K3.1 Pro for code changes, CAD scripts, and research across long documents. Built from Kimi K3, it improves coding, 3D creation, and financial research while keeping a million-token context window.

Prompts to try with Kimi K3.1 Pro (batch) in opencode

Copy an example into opencode, or ask in your own words.

Use Kimi K3.1 Pro to trace the failing tests in this repository, identify the root cause, and make the smallest complete fix. Run the relevant checks and explain any remaining failure.

Kimi K3.1 Pro (batch)opencode
Try asking
  • Use Kimi K3.1 Pro to review this project's authentication flow across modules. Map the call path, identify inconsistent behavior, and propose changes with regression checks before editing.

  • Use Kimi K3.1 Pro to plan the migration described in docs/migration.md. Inspect the current dependencies, divide the work into reviewable changes, and state the compatibility checks for each stage.

  • Use Kimi K3.1 Pro to write a Blender script in this project for a desk organizer with three compartments. Put dimensions and wall thickness in named parameters, then check that the script runs.

  • Use Kimi K3.1 Pro to compare the architecture documents with the implementation. Report contradictions with file references, separate confirmed findings from assumptions, and suggest the next check for each uncertainty.

How to set up Kimi K3.1 Pro (batch) 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.

    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.

    opencode mcp auth spiral
  3. Check it

    Spiral shows as connected.

    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.

    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 (batch)

    One request; the result comes back by polling or a webhook.

    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:batch",
        "input": {
          "messages": [
            {
              "role": "system"
            }
          ]
        }
      }'

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

Kimi K3.1 Pro (batch) providers and prices

Spiral runs Kimi K3.1 Pro (batch) through OpenRouter. Open a card for today's price, with every fee included.

OpenRouterLLM
MoonshotAI: Kimi K3.1 Pro (batch)
moonshotai/kimi-k3.1-pro:batch

Settings you can ask for

Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Seeda whole number
Min p0 to 1
Top ka whole number from 0
Max tokens1 to 943718

The most output tokens to generate. On a reasoning model the reasoning tokens count toward it: a cap too low for the effort can end with no answer (finish_reason length).

Reasoning effortnone, low, high, or maxmax

How much the model reasons.

Repetition penalty0 to 2

Every API field of MoonshotAI: Kimi K3.1 Pro (batch) is on its tool page: open its card above.

What can you do with Kimi K3.1 Pro (batch) in opencode?

Turn a codebase and a concrete task into patches, migration plans, or CAD scripts with Kimi K3.1 Pro. Give the agent acceptance criteria and ask it to verify the result with the project's tools.

Fix a bug across several modules

Give Kimi K3.1 Pro the failing behavior, relevant code, and acceptance criteria. Request a patch, a regression check, and an explanation of the root cause.

Plan a codebase migration

Ask Kimi K3.1 Pro to trace dependencies and divide a migration into reviewable changes. Require a compatibility check and rollback condition for each stage.

Compare long financial reports

Use Kimi K3.1 Pro to compare revenue definitions, reporting periods, and stated risks across reports. Request source passages beside each finding and keep calculations separate from interpretation.

Answer questions across a document collection

Ask Kimi K3.1 Pro to answer a specific question using supplied reports and manuals. Require document titles, section references, and an explicit statement when the evidence is insufficient.

Write a parametric CAD script

Give Kimi K3.1 Pro a part description, dimensions, and constraints. Request editable CAD code with named parameters and a checklist for inspecting the resulting geometry.

Create a Blender scene script

Ask Kimi K3.1 Pro to turn a written scene brief into a Blender script. Specify object dimensions, materials, camera placement, and the edits you expect to make later.

Interpret a chart image

Have Kimi K3.1 Pro explain a supplied chart, identify its units and time range, and distinguish visible values from estimates. Ask it to mark unreadable labels instead of guessing.

Extract comparable research records

Give Kimi K3.1 Pro several research passages and an example record. Request consistent entries containing the main claim, supporting passage, limitations, and unanswered questions.

Questions about Kimi K3.1 Pro (batch) in opencode

Can opencode use Kimi K3.1 Pro (batch)?

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

How much does Kimi K3.1 Pro (batch) cost in opencode?

Up to $0.021978 per run at the default inputs. $0.3575 per 1M input tokens, $5.3625 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 (batch) in opencode?

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

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

Does opencode wait while Kimi K3.1 Pro (batch) runs?

Kimi K3.1 Pro (batch) 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 good at?

Its documented strengths include coding, 3D creation, and financial research. Useful tasks include debugging code, writing CAD scripts, and comparing evidence across long reports.

How much can Kimi K3.1 Pro read and write?

Its context window is 1,048,576 tokens. That figure is not a verified maximum answer length: NVIDIA's model documentation leaves the separate output limit undisclosed.

How does Kimi K3.1 Pro help with 3D modeling?

It can write Blender and CAD scripts that build assets and revise geometry. For a practical first task, request a parametric model with named dimensions and a short list of assumptions.

Can Kimi K3.1 Pro still make factual mistakes?

Yes. Moonshot reports improvements in factual accuracy but also tests cases where errors remain likely. For research, request source passages and independently check consequential claims.

How should I prompt Kimi K3.1 Pro for structured answers?

Give a concrete example of the answer you want and explain what each field means. For document extraction, also specify how to represent missing information and where to put supporting passages.

Get started

Start using Kimi K3.1 Pro (batch) in opencode

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into opencode:

Set up opencode

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options