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

opencode · LLMReleased 2026-10-19

How to Use MiniMax M3.1 Flash in opencode

MiniMax M3.1 Flash is built for coding, code security reviews, and tasks that need several tool calls. It combines a context window of up to 1 million tokens with adjustable thinking depth for long documents and complex work.

Prompts to try with MiniMax M3.1 Flash in opencode

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

Use MiniMax M3.1 Flash to investigate the failing tests in this project. Trace the failure to its cause, make the smallest justified fix, and run the relevant tests. Report what passed and what remains unresolved.

MiniMax M3.1 Flashopencode
Try asking
  • Use MiniMax M3.1 Flash with high thinking depth to review this project's authentication code. For each security finding, show the affected code path, explain the impact, and propose a patch with a focused verification check.

  • Use MiniMax M3.1 Flash to compare the README, API specification, and implementation in this repository. List contradictions with file locations, then propose corrections supported by the code.

  • Use MiniMax M3.1 Flash to implement pagination for the existing list endpoint. Follow the project's conventions, cover empty and final pages, and verify that existing callers still work.

  • Use MiniMax M3.1 Flash with high thinking depth to plan a refactor of this project's duplicated validation logic. Map callers first, identify behavior to preserve, and implement one reviewable change with relevant checks.

How to set up MiniMax M3.1 Flash 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 MiniMax M3.1 Flash

    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": "minimax/minimax-m3.1-flash",
        "input": {
          "messages": [
            {
              "role": "system"
            }
          ]
        }
      }'

Then paste one of the prompts above: opencode finds MiniMax M3.1 Flash on Spiral, shows the price and runs it.

MiniMax M3.1 Flash providers and prices

Spiral runs MiniMax M3.1 Flash through OpenRouter. Open a card for today's price, with every fee included.

OpenRouterLLM
MiniMax: MiniMax M3.1 Flash
minimax/minimax-m3.1-flash

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 524288

The most output tokens to generate.

Temperature0 to 2
Top logprobs0 to 20
Presence penalty-2 to 2
Reasoning effortlow, medium, high, xhigh, or maxmax

How much the model reasons.

Frequency penalty-2 to 2
Repetition penalty0 to 2

Every API field of MiniMax: MiniMax M3.1 Flash is on its tool page: open its card above.

What can you do with MiniMax M3.1 Flash in opencode?

Turn a bug report or feature specification into code changes with MiniMax M3.1 Flash. Give the agent the relevant project context, acceptance criteria, and a concrete way to verify the result.

Investigate and fix a bug

Use MiniMax M3.1 Flash to trace a reported failure through the relevant code, propose a focused patch, and check it against the reproduction steps.

Implement a feature from acceptance criteria

Give MiniMax M3.1 Flash a concrete feature specification and ask for an implementation with checks tied to each requirement.

Plan a code refactor

Ask MiniMax M3.1 Flash to map dependencies, identify behavior that must stay consistent, and divide the refactor into reviewable changes.

Review code for security issues

Have MiniMax M3.1 Flash inspect application code for vulnerabilities and propose patches. Require a concrete code path and a verification step for each finding.

Reconcile conflicting documents

Use MiniMax M3.1 Flash to compare long specifications or procedures, locate contradictory requirements, and draft a decision list with supporting passages.

Build an evidence-based research brief

Ask MiniMax M3.1 Flash to work through supplied material or available research tools, connect relevant findings, and separate supported conclusions from open questions.

Prepare an operations handoff

Have MiniMax M3.1 Flash gather task status through available tools, reconcile conflicting updates, and produce a handoff with owners, blockers, and next actions.

Questions about MiniMax M3.1 Flash in opencode

Can opencode use MiniMax M3.1 Flash?

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run MiniMax M3.1 Flash like any built-in tool.

How much does MiniMax M3.1 Flash cost in opencode?

Up to $0.003202 per run at the default inputs. $0.195 per 1M input tokens, $0.78 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 MiniMax M3.1 Flash in opencode?

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

How long does it take to set up MiniMax M3.1 Flash in opencode?

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

Does opencode wait while MiniMax M3.1 Flash runs?

MiniMax M3.1 Flash runs in the background. opencode starts the run, checks on it and gives you the text, json when it's ready.

What is MiniMax M3.1 Flash good at?

Its documented focus is coding, code security reviews, and work that takes several tool calls. Practical uses include investigating bugs, checking documents for contradictions, and carrying a task through several steps.

How much context can MiniMax M3.1 Flash handle?

MiniMax documents a context window of up to 1 million tokens. That is useful for reviewing long documents or substantial code context, but it is separate from the maximum answer length.

How long can an answer be?

MiniMax documents a maximum generation limit of 524,288 tokens and recommends 131,072 tokens. Thinking also consumes the output budget, so those figures do not mean an equally long final answer.

Can MiniMax M3.1 Flash answer without thinking?

Thinking cannot be disabled. Use a lower thinking depth for straightforward work and reserve deeper thinking for tasks that need more investigation.

What limitations matter during long tasks?

Deeper thinking produces more tokens and increases latency. An output budget that is too small can be consumed by thinking before a final answer appears.

Get started

Start using MiniMax M3.1 Flash 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