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

opencode · LLM

How to Use Motif 3 in opencode

Motif 3 suits code fixes, terminal troubleshooting, and questions that connect long documents. Its clearest strengths are multi-step tool use and terminal problem solving; specialized scientific coding is less competitive.

Prompts to try with Motif 3 in opencode

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

Use Motif 3 to investigate the failing tests in this repository. Reproduce the failure, trace its cause, make the smallest justified fix, and run the relevant tests. Report the evidence that the fix works.

Motif 3opencode
Try asking
  • Use Motif 3 to trace the login flow through this project's files. Identify where an expired session could cause repeated redirects, explain the evidence, and add a focused regression test with any fix.

  • Use Motif 3 to compare this repository's API implementation with its specification. List behavior mismatches with file references, then fix the clearest mismatch and verify it.

  • Use Motif 3 to investigate the build failure using terminal output and project configuration. Check one hypothesis at a time, preserve the results, and stop when the build passes or a specific blocker is established.

  • Use Motif 3 to review the current diff against the project's requirements. Focus on incorrect behavior and missing tests, cite the relevant code, and distinguish confirmed defects from questions.

How to set up Motif 3 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 Motif 3

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

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

Motif 3 providers and prices

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

OpenRouterLLM
Motif Technologies: Motif 3
motif-technologies/motif-3

Settings you can ask for

Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Top ka whole number from 0
Top p0 to 1
Logprobson or off
Max tokens1 to 235929

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
Frequency penalty-2 to 2
Repetition penalty0 to 2

Every API field of Motif Technologies: Motif 3 is on its tool page: open its card above.

What can you do with Motif 3 in opencode?

Turn a repository issue into a code change checked by tests with Motif 3. Give the agent the failing behavior, relevant project context, and a clear condition for completion.

Fix a repository issue

Use Motif 3 to trace a reported bug, change the relevant code, and check the result with focused tests.

Investigate terminal failures

Give Motif 3 command output and a clear success condition. Ask for an investigation that checks each hypothesis against subsequent results.

Compare long technical documents

Ask Motif 3 to connect requirements across specifications, identify contradictions, and cite the sections behind each finding.

Answer questions from a policy collection

Provide labeled policy text and ask Motif 3 for evidence-backed answers, with an explicit unknown when the material does not resolve a question.

Prepare English and Korean support drafts

Use Motif 3 to draft responses from supplied support policies. Specify the output language and preserve product names and technical terms.

Review changes across recurring reports

Give Motif 3 the previous and current report text. Request a concise account of changed claims, conflicting evidence, and questions that remain unanswered.

Investigate a support issue with tools

Use Motif 3 to select relevant lookups, interpret returned results, and draft a resolution tied to the supplied policy and evidence.

Questions about Motif 3 in opencode

Can opencode use Motif 3?

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

How much does Motif 3 cost in opencode?

Up to $0.006404 per run at the default inputs. $0.39 per 1M input tokens, $1.56 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 Motif 3 in opencode?

No. Spiral runs Motif 3 on its own OpenRouter account. You sign in to Spiral once and never paste a key.

How long does it take to set up Motif 3 in opencode?

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

Does opencode wait while Motif 3 runs?

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

What is Motif 3 best suited for?

Start with tasks involving several tool calls, code changes with tests, or answers assembled from long documents. The maker highlights multi-step execution and terminal problem solving.

How much context can Motif 3 handle?

Motif 3 has a native context length of 262,144 tokens. Treat that as the context window, rather than a promise that each answer can reach that length.

Which languages does Motif 3 emphasize?

The maker describes Motif 3 as multilingual and specifically highlights English and Korean in its tokenizer design. Specify the response language when your source material mixes languages.

Which sampling settings should I try first?

Temperature 1.0 and top-p 0.95 match the maker's evaluation settings. Use them as a starting point for your own checks; the published evaluation does not establish one best setting for every task.

Where does Motif 3 need closer checking?

The maker reports weaker results than the strongest compared models on scientific coding and specialized scientific reasoning. For those tasks, request executable checks, stated assumptions, and evidence for conclusions.

Get started

Start using Motif 3 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