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

opencode · LLMReleased 2026-04-27

How to Use Kimi Latest in opencode

Use Kimi Latest for large-codebase work, research synthesis, and tasks that need several tool calls. Unlike the fixed Kimi K3 name, it follows a changing model target, currently Kimi K3.

Prompts to try with Kimi Latest in opencode

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

Use Kimi Latest to trace the failing test through this repository, reproduce the failure, and make the smallest repair. Change only code needed for that failure and report the test result.

Kimi Latestopencode
Try asking
  • Use Kimi Latest to map the authentication flow across this project's files. Produce a dependency map and identify three places where error handling needs investigation, with file and line references.

  • Use Kimi Latest to plan a staged refactor of the data-access layer. Read the existing interfaces and tests, preserve public behavior, and give acceptance checks for each stage before editing.

  • Use Kimi Latest to compare the implementation in this repository with the equations in its research notes. List mismatches, propose validation cases, and separate confirmed errors from uncertain interpretations.

  • Use Kimi Latest to investigate this project's slowest benchmark. Profile before proposing changes, modify only the measured bottleneck, and report before-and-after results with correctness checks.

How to set up Kimi Latest 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 Latest

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

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

Kimi Latest providers and prices

Spiral runs Kimi Latest through OpenRouter. Open a card for today's price, with every fee included.

OpenRouterLLM
MoonshotAI: Kimi Latest
~moonshotai/kimi-latest

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
Top p0 to 1
Logprobson or off
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).

Temperature0 to 2
Top logprobs0 to 20
Presence penalty-2 to 2
Reasoning effortnone, low, high, or maxmax

How much the model reasons.

Frequency penalty-2 to 2
Repetition penalty0 to 2

Every API field of MoonshotAI: Kimi Latest is on its tool page: open its card above.

What can you do with Kimi Latest in opencode?

Kimi Latest can help carry an engineering task across a large repository, from tracing dependencies to checking a repair. Define the files and behavior in scope so its current Kimi K3 target has clear boundaries.

Fix bugs across a large repository

Ask Kimi Latest to trace a failure through the relevant code, reproduce it, and propose a focused repair. Specify the permitted scope and require test evidence.

Plan a cross-module refactor

Have Kimi Latest map dependencies and propose a staged refactor with acceptance checks. Define the behavior that each stage must preserve.

Turn research methods into code

Give Kimi Latest a paper's methods and equations as text, then request an implementation plan, executable code, and checks against the reported results.

Compare competing proposals

Supply proposal text and ask Kimi Latest to compare scope, assumptions, exclusions, and unanswered questions. Require supporting passages for each conclusion.

Prepare a research brief

Have Kimi Latest synthesize retrieved sources into a concise brief with dated evidence, disagreements, and open questions. Define the audience and decision the brief must support.

Explain Chinese and English material

Use Kimi Latest to explain supplied Chinese material in English, or English material in Chinese. Provide a terminology list and ask it to flag ambiguous passages.

Review operational incidents

Give Kimi Latest incident timelines, log excerpts, and investigation notes as text. Ask for a causal hypothesis, conflicting evidence, and the next checks to run.

Answer questions from reference material

Supply relevant policy or product documentation as text and ask Kimi Latest to answer with section references. Require it to identify questions the material does not resolve.

Questions about Kimi Latest in opencode

Can opencode use Kimi Latest?

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

How much does Kimi Latest cost in opencode?

Up to $0.058611 per run at the default inputs. $0.23712 per 1M input tokens, $14.30715 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 Latest in opencode?

No. Spiral runs Kimi Latest 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 Latest in opencode?

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

Does opencode wait while Kimi Latest runs?

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

Does Kimi Latest always mean the same model?

No. Its target can change, and the current listing points to Kimi K3. Treat saved prompts as something to recheck when the target changes.

What is Kimi Latest best suited for?

With its current Kimi K3 target, it suits sustained coding tasks, research synthesis, and knowledge work that takes several steps. Give it a concrete deliverable and a clear definition of done.

How much context can Kimi Latest handle?

The alias can reach a 1,048,576-token context window, but the actual limit depends on its target. Use that capacity for relevant evidence, and ask for a bounded answer such as a comparison table or a short decision memo.

Can Kimi Latest answer questions about today's events?

Give it current source material or have the agent retrieve it first. Kimi's training knowledge alone cannot reliably answer time-sensitive questions.

Which languages are a sensible starting point?

Chinese and English are explicitly highlighted in Moonshot's example instructions. For bilingual work, specify the output language and supply a glossary for names and technical terms.

Get started

Start using Kimi Latest 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