[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [GLM 5.3 FlashX Legal](https://spiral.ai/integrations/opencode/glm-5-3-flashx-legal)

# How to Use GLM 5.3 FlashX Legal in opencode

Use GLM 5.3 FlashX Legal to review contracts, compare documents, and prepare legal drafts. It specializes GLM 5.3 FlashX for legal work, including research and clause revisions.

|  |  |
| --- | --- |
| Model | GLM 5.3 FlashX Legal |
| Available through | OpenRouter |
| Category | LLM |
| Price | Up to $0.006673 per run at the default inputs. $0.481 per 1M input tokens, $1.625 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with GLM 5.3 FlashX Legal in opencode

- Use GLM 5.3 FlashX Legal to review the agreement text in this project's legal directory from the customer's position. Return clause references, source quotations, concerns, and proposed wording; list missing context separately.
- Use GLM 5.3 FlashX Legal to compare the two contract drafts in this project. Create a Markdown table of substantive changes, their practical effect, and questions for counsel, citing both versions.
- Use GLM 5.3 FlashX Legal to check the agreement, amendments, and schedules in this repository for inconsistent definitions and dates. Report both source locations for each conflict.
- Use GLM 5.3 FlashX Legal with maximum reasoning effort to prepare a research memo from this project's supplied legal authorities. Separate quoted authority, analysis, and unresolved questions; do not add uncited authorities.
- Use GLM 5.3 FlashX Legal to review the contract text in this project and return JSON containing a clause reference, source quotation, issue, proposed revision, and unanswered questions for each finding. Use null for missing information.

## How to set up GLM 5.3 FlashX Legal 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.

```bash
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.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
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.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run GLM 5.3 FlashX Legal**: 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": "z-ai/glm-5.3-flashx-legal",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

Then paste one of the prompts above: opencode finds GLM 5.3 FlashX Legal on Spiral, shows the price and runs it.

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

## GLM 5.3 FlashX Legal tools and prices

- [Z.ai: GLM 5.3 FlashX Legal](https://spiral.ai/tools/openrouter/z-ai/glm-5.3-flashx-legal) (OpenRouter): Up to $0.006673 per run at the default inputs. $0.481 per 1M input tokens, $1.625 per 1M output tokens.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| tools |  | — |  |
| top_k | 0 to … | — |  |
| top_p | 0 to 1 | — |  |
| reasoning |  | — | Reasoning effort; reasoning tokens count toward max_tokens. |
| max_tokens | 1 to 131072 | — | The most output tokens to generate. |
| temperature | 0 to 2 | — |  |

## What can you do with GLM 5.3 FlashX Legal in opencode?

Turn project contracts and legal reference text into review tables and proposed revisions with GLM 5.3 FlashX Legal. Use explicit source references and structured findings to make each proposed change easier to inspect.

### Contract risk review

Ask GLM 5.3 FlashX Legal to review an agreement from a stated negotiating position and return clause references, concerns, and proposed revisions.

### Negotiation revision comparison

Compare two contract drafts with GLM 5.3 FlashX Legal. Request a table of changed wording, its practical effect, and questions for the next negotiation round.

### Agreement and amendment checks

Use GLM 5.3 FlashX Legal to compare an agreement with its amendments and schedules. Ask it to flag conflicting definitions, dates, and obligations with supporting passages.

### Source-based research memo

Give GLM 5.3 FlashX Legal a legal question and retrieved authorities. Request a memo that separates source statements, analysis, and unanswered questions.

### First draft of a legal document

Ask GLM 5.3 FlashX Legal to draft from supplied facts, instructions, and reference language. Require explicit gaps wherever the materials lack necessary information.

### Clause revision proposals

Use GLM 5.3 FlashX Legal to propose revised clauses against a supplied negotiation checklist, with an explanation connecting each change to the stated objective.

## Overview

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

## GLM 5.3 FlashX Legal in other agents

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

## More opencode guides

- [GLM 5.3 FlashX](https://spiral.ai/integrations/opencode/glm-5-3-flashx)
- [GLM 5.3 Prime](https://spiral.ai/integrations/opencode/glm-5-3-prime)
- [GLM 5.3 Flash](https://spiral.ai/integrations/opencode/glm-5-3-flash)
- [GLM Flash Latest](https://spiral.ai/integrations/opencode/glm-flash-latest)
- [GLM 5.2 (batch)](https://spiral.ai/integrations/opencode/glm-5-2-batch)
- [GLM Latest](https://spiral.ai/integrations/opencode/glm-latest)

## Questions about GLM 5.3 FlashX Legal in opencode

**Can opencode use GLM 5.3 FlashX Legal?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run GLM 5.3 FlashX Legal like any built-in tool.

**How much does GLM 5.3 FlashX Legal cost in opencode?**

Up to $0.006673 per run at the default inputs. $0.481 per 1M input tokens, $1.625 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 GLM 5.3 FlashX Legal in opencode?**

No. Spiral runs GLM 5.3 FlashX Legal on its own OpenRouter account. You sign in to Spiral once and never paste a key.

**How long does it take to set up GLM 5.3 FlashX Legal in opencode?**

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

**Does opencode wait while GLM 5.3 FlashX Legal runs?**

GLM 5.3 FlashX Legal runs in the background. opencode starts the run, checks on it and gives you the text, json when it's ready.

**What is GLM 5.3 FlashX Legal best suited for?**

Use it for contract review, legal research, document consistency checks, and legal drafting. Give it the relevant source material and a concrete deliverable, such as a clause comparison or draft revision.

**How does it differ from GLM 5.3 FlashX?**

GLM 5.3 FlashX Legal specializes the base model for legal work. Its stated focus includes reviewing contracts and drafting or revising legal documents.

**How much material can it handle?**

Z.ai documents a 1M-token context window and up to 128K output tokens. Ask for a focused deliverable even when supplying a large document collection.

**Does it supply current laws and court decisions by itself?**

Z.ai's recommended workflow uses external services to supply laws and cases. Provide authoritative sources or retrieved passages, and request citations that you can check against the originals.

**Which settings are a useful starting point?**

Z.ai recommends temperature 1, top-p 0.95, and maximum reasoning effort. Thinking cannot be turned off.

