[Integrations](https://spiral.ai/integrations) › [Codex](https://spiral.ai/integrations/codex) › [Motif 3](https://spiral.ai/integrations/codex/motif-3)

# How to Use Motif 3 in Codex

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.

|  |  |
| --- | --- |
| Model | Motif 3 |
| Available through | OpenRouter |
| Category | LLM |
| Price | Up to $0.006404 per run at the default inputs. $0.39 per 1M input tokens, $1.56 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Motif 3 in Codex

- 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.
- 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 Codex

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

### Use Spiral's MCP server

1. **Add the hosted server**

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

2. **Sign in**: Codex opens the browser: sign in to Spiral and click Authorize. No API key. `codex mcp list` then shows Spiral.

```bash
codex mcp login spiral
```

### Use the Spiral skill

1. **Send Codex 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 Motif 3**: 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": "motif-technologies/motif-3",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

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

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

## Motif 3 tools and prices

- [Motif Technologies: Motif 3](https://spiral.ai/tools/openrouter/motif-technologies/motif-3) (OpenRouter): Up to $0.006404 per run at the default inputs. $0.39 per 1M input tokens, $1.56 per 1M output tokens.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| tools |  | — |  |
| top_k | 0 to … | — |  |
| top_p | 0 to 1 | — |  |
| logprobs |  | — |  |
| reasoning |  | — | Reasoning effort; reasoning tokens count toward max_tokens. |
| max_tokens | 1 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). |

## What can you do with Motif 3 in Codex?

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.

## Overview

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

## Motif 3 in other agents

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

## More Codex guides

- [Morph V3 Large (batch)](https://spiral.ai/integrations/codex/morph-v3-large-batch)
- [Muse Ember](https://spiral.ai/integrations/codex/muse-ember)
- [Morph V3 Large](https://spiral.ai/integrations/codex/morph-v3-large)
- [Muse Glimmer 30B](https://spiral.ai/integrations/codex/muse-glimmer-30b)
- [Morph V3 Fast Batch](https://spiral.ai/integrations/codex/morph-v3-fast-batch)
- [Muse Glimmer 30B (batch)](https://spiral.ai/integrations/codex/muse-glimmer-30b-batch)

## Questions about Motif 3 in Codex

**Can Codex use Motif 3?**

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

**How much does Motif 3 cost in Codex?**

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 Codex plan is separate.

**Do I need an OpenRouter account to use Motif 3 in Codex?**

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 Codex?**

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

**Does Codex wait while Motif 3 runs?**

Motif 3 runs in the background. Codex 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.

