[Integrations](https://spiral.ai/integrations) › [Muse](https://spiral.ai/integrations/muse) › [Gemini 3.1 Pro Preview](https://spiral.ai/integrations/muse/gemini-3-1-pro-preview)

# How to Use Gemini 3.1 Pro Preview in Muse

Gemini 3.1 Pro Preview suits complex coding, document synthesis, and tasks that require several reasoning steps. Its 1,048,576-token input limit makes it useful for examining large bodies of related material together.

|  |  |
| --- | --- |
| Model | Gemini 3.1 Pro Preview |
| Available through | Vertex AI |
| Category | LLM |
| Price | Up to $0.063989 per run at the default inputs. $2.60 per 1M input tokens, $0.26 per 1M cached input tokens, $0.4875 per 1M cache write tokens, $15.60 per 1M output tokens; for a prompt above 200,000 tokens, $5.20 per 1M input tokens, $0.52 per 1M cached input tokens, $0.975 per 1M cache write tokens, $23.40 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, with a Spiral API key |

## Prompts to try with Gemini 3.1 Pro Preview in Muse

- Use Gemini 3.1 Pro Preview to compare the two proposals pasted above. Return a table of requirements met, missing evidence, and unresolved tradeoffs, with a supporting passage for each row.
- Use Gemini 3.1 Pro Preview to synthesize the research excerpts above into a 600-word brief. Separate agreed findings, disagreements, and questions the excerpts cannot answer.
- Use Gemini 3.1 Pro Preview to explain the algorithm described above to a junior developer. Include a worked example, time and memory complexity, and three edge cases.
- Use Gemini 3.1 Pro Preview to extract decisions, owners, and deadlines from the meeting transcript above. Return a table and write 'not stated' wherever the transcript omits a value.
- Use Gemini 3.1 Pro Preview to write an animated SVG showing a cache hit and a cache miss. Label the browser, cache, and server, and make the full sequence last eight seconds.

## How to set up Gemini 3.1 Pro Preview in Muse

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

### Use the Muse connector

1. **Create an API key**: Create one under API keys in the Spiral console.

2. **Send Muse this message**: Muse reads Spiral's skill and asks for an API key.

```text
set up https://spiral.ai/SKILL.md
```

3. **Give Muse the key**: Paste the key when Muse asks for it, never in the chat itself.

### Use the Spiral skill

1. **Send Muse 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 Gemini 3.1 Pro Preview**: 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": "vertex",
    "model": "google/gemini-3.1-pro-preview",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

Then paste one of the prompts above: Muse finds Gemini 3.1 Pro Preview on Spiral, shows the price and runs it.

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

## Gemini 3.1 Pro Preview tools and prices

- [Gemini 3.1 Pro Preview](https://spiral.ai/tools/vertex/google/gemini-3.1-pro-preview) (Vertex AI): Up to $0.063989 per run at the default inputs. $2.60 per 1M input tokens, $0.26 per 1M cached input tokens, $0.4875 per 1M cache write tokens, $15.60 per 1M output tokens; for a prompt above 200,000 tokens, $5.20 per 1M input tokens, $0.52 per 1M cached input tokens, $0.975 per 1M cache write tokens, $23.40 per 1M output tokens.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| seed |  | — |  |
| stop |  | — |  |
| tools |  | — |  |
| top_p | 0 to 1 | — |  |
| reasoning |  | — | Reasoning effort; reasoning tokens count toward max_tokens. |
| max_tokens | 1 to 65536 | — | The most output tokens to generate. |

## What can you do with Gemini 3.1 Pro Preview in Muse?

Gemini 3.1 Pro can turn lengthy source material into a comparison, explanation, or decision brief. Supply the evidence in the conversation and ask for supporting passages alongside the conclusions.

### Trace bugs across a codebase

Use Gemini 3.1 Pro Preview to follow a failing behavior through related modules, propose a focused fix, and identify tests that would confirm it.

### Plan a software migration

Compare existing code with supplied migration documentation. Ask for dependencies, likely breaking changes, and a staged implementation plan.

### Compare lengthy specifications

Review several specifications together to identify conflicting requirements, missing definitions, and decisions that need an owner.

### Build an evidence-based research brief

Synthesize supplied source text into findings, disagreements, and unanswered questions. Require a supporting passage for each finding.

### Extract records from unstructured text

Turn support messages or operational notes into structured records. Define how missing values should appear and validate the extracted values against the source.

### Develop and compare algorithms

Describe the constraints and representative inputs, then ask for candidate algorithms, complexity analysis, and edge cases to test.

### Create animated SVG explanations

Generate an animated SVG that explains a process, such as a queue draining or a request passing through a cache. Specify labels, timing, and the intended audience.

### Summarize recurring operational changes

Compare supplied current and previous reports to produce a brief of new issues, resolved issues, and contradictions that need review.

## Overview

- [Google Vertex AI](https://spiral.ai/providers/vertex)
- [All Muse guides](https://spiral.ai/integrations/muse)

## Gemini 3.1 Pro Preview in other agents

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

## More Muse guides

- [Gemini 3.1 Pro Custom Tools](https://spiral.ai/integrations/muse/gemini-3-1-pro-custom-tools)
- [Gemini 3.5 Flash](https://spiral.ai/integrations/muse/gemini-3-5-flash)
- [Gemini 3.1 Flash-Lite](https://spiral.ai/integrations/muse/gemini-3-1-flash-lite)
- [Gemini 3.5 Flash-Lite](https://spiral.ai/integrations/muse/gemini-3-5-flash-lite)
- [Gemini 3 Flash Preview](https://spiral.ai/integrations/muse/gemini-3-flash-preview)
- [Gemini 3.7 Flash](https://spiral.ai/integrations/muse/gemini-3-7-flash)

## Questions about Gemini 3.1 Pro Preview in Muse

**Can Muse use Gemini 3.1 Pro Preview?**

Yes. Add Spiral to Muse as an MCP server, and Muse can find and run Gemini 3.1 Pro Preview like any built-in tool.

**How much does Gemini 3.1 Pro Preview cost in Muse?**

Up to $0.063989 per run at the default inputs. $2.60 per 1M input tokens, $0.26 per 1M cached input tokens, $0.4875 per 1M cache write tokens, $15.60 per 1M output tokens; for a prompt above 200,000 tokens, $5.20 per 1M input tokens, $0.52 per 1M cached input tokens, $0.975 per 1M cache write tokens, $23.40 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Muse plan is separate.

**Do I need a Vertex AI account to use Gemini 3.1 Pro Preview in Muse?**

You need no Vertex AI account. Muse uses one Spiral API key for every tool, and Spiral runs Gemini 3.1 Pro Preview on its own Vertex AI account.

**How long does it take to set up Gemini 3.1 Pro Preview in Muse?**

About two minutes: create an API key, then send Muse this message, then give Muse the key.

**Does Muse wait while Gemini 3.1 Pro Preview runs?**

Gemini 3.1 Pro Preview runs in the background. Muse starts the run, checks on it and gives you the text, json when it's ready.

**What is Gemini 3.1 Pro best suited for?**

Use it for complex coding, algorithm development, and questions that require comparing substantial supporting material. Give it the relevant evidence and define the result you need.

**How much can Gemini 3.1 Pro read and write?**

Gemini 3.1 Pro Preview accepts up to 1,048,576 input tokens and generates up to 65,536 output tokens. Treat these as token limits, not fixed page or word counts.

**Will Gemini 3.1 Pro find every detail in a long document?**

A large context window does not guarantee complete recall. Google reports lower retrieval accuracy when a request asks for multiple specific details, so ask focused questions and verify the cited passages.

**How should I structure a long prompt?**

Put the supporting material first and your question at the end. Ask for a concrete deliverable, such as a comparison table with evidence for each conclusion.

**Should I lower the temperature for analytical work?**

Start with the default sampling settings. Google warns that changing these defaults on earlier Gemini 3 models can degrade reasoning performance.

