[Integrations](https://spiral.ai/integrations) › [Cursor](https://spiral.ai/integrations/cursor) › [GLM 4.7 Flash](https://spiral.ai/integrations/cursor/glm-4-7-flash)

# How to Use GLM 4.7 Flash in Cursor

Use GLM 4.7 Flash for frontend and backend coding, Chinese writing, translation, and long-text review. For code repair, the maker's benchmark settings offer a starting point: temperature 0.7 and top-p 1.0.

|  |  |
| --- | --- |
| Model | GLM 4.7 Flash |
| Available through | OpenRouter |
| Category | LLM |
| Price | Up to $0.002134 per run at the default inputs. $0.07865 per 1M input tokens, $0.52 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with GLM 4.7 Flash in Cursor

- Use GLM 4.7 Flash to investigate the failing tests in this project. Reproduce one failure, explain its cause, make the smallest relevant fix, and rerun the affected tests.
- Use GLM 4.7 Flash to add pagination to the existing list endpoint. Follow the project's conventions and test empty results, invalid page sizes, and the final page.
- Use GLM 4.7 Flash to implement the search form described in the project brief. Include keyboard access and loading, empty, and error states using the existing components.
- Use GLM 4.7 Flash with thinking enabled to trace how a submitted form reaches the database. Identify where validation belongs and propose a focused patch before editing.
- Use GLM 4.7 Flash with temperature 0.7 and top_p 1.0 to review the current diff. Report concrete defects with a reproduction or test, and distinguish confirmed bugs from questions.

## How to set up GLM 4.7 Flash in Cursor

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

### Use Spiral's MCP server

1. **Add the hosted server**: Use Add to Cursor on the console's Agents & MCP page, or add this to `.cursor/mcp.json` (one project) or `~/.cursor/mcp.json` (every project):

```json
{
  "mcpServers": {
    "spiral": { "url": "https://api.spiral.ai/mcp" }
  }
}
```

2. **Sign in**: Open Cursor Settings › MCP, click Connect next to spiral, sign in to Spiral and click Authorize. No API key. Spiral then shows as connected, with its tools listed.

### Use the Spiral skill

1. **Send Cursor 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 4.7 Flash**: 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-4.7-flash",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

Then paste one of the prompts above: Cursor finds GLM 4.7 Flash on Spiral, shows the price and runs it.

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

## GLM 4.7 Flash tools and prices

- [Z.ai: GLM 4.7 Flash](https://spiral.ai/tools/openrouter/z-ai/glm-4.7-flash) (OpenRouter): Up to $0.002134 per run at the default inputs. $0.07865 per 1M input tokens, $0.52 per 1M output tokens.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| seed |  | — |  |
| stop |  | — |  |
| min_p | 0 to 1 | — |  |
| tools |  | — |  |
| top_k | 0 to … | — |  |
| top_p | 0 to 1 | — |  |

## What can you do with GLM 4.7 Flash in Cursor?

Turn project requirements into frontend and backend changes with GLM 4.7 Flash. Pair each change with relevant tests and inspect the resulting patch.

### Repair a reproducible bug

Give GLM 4.7 Flash the failing behavior, relevant code, and expected result. Request a focused patch and verify it with the failing test.

### Build a frontend from written requirements

Ask GLM 4.7 Flash to implement a form or search interface with explicit loading, empty, and error states.

### Draft backend behavior

Use GLM 4.7 Flash to draft request validation, pagination, and error handling from a written endpoint specification.

### Review long documents

Ask GLM 4.7 Flash to extract decisions, unresolved questions, and conflicting requirements from supplied text, with supporting passages.

### Write Chinese support replies

Have GLM 4.7 Flash draft a Chinese response using the customer's message and the supplied support policy.

### Translate with a terminology guide

Give GLM 4.7 Flash source text, a target language, and approved terminology. Request a translation plus notes on ambiguous phrases.

### Practice customer conversations

Use GLM 4.7 Flash to role-play a customer with a defined concern, then review how clearly the response addressed it.

## Overview

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

## GLM 4.7 Flash in other agents

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

## More Cursor guides

- [GLM 4.5 Air](https://spiral.ai/integrations/cursor/glm-4-5-air)
- [GLM 5.2 (batch)](https://spiral.ai/integrations/cursor/glm-5-2-batch)
- [Fugu Ultra v2](https://spiral.ai/integrations/cursor/fugu-ultra-v2)
- [GLM 5.3 Flash](https://spiral.ai/integrations/cursor/glm-5-3-flash)
- [Fugu Ultra](https://spiral.ai/integrations/cursor/fugu-ultra)
- [GLM 5.3 FlashX](https://spiral.ai/integrations/cursor/glm-5-3-flashx)

## Questions about GLM 4.7 Flash in Cursor

**Can Cursor use GLM 4.7 Flash?**

Yes. Add Spiral to Cursor as an MCP server, and Cursor can find and run GLM 4.7 Flash like any built-in tool.

**How much does GLM 4.7 Flash cost in Cursor?**

Up to $0.002134 per run at the default inputs. $0.07865 per 1M input tokens, $0.52 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Cursor plan is separate.

**Do I need an OpenRouter account to use GLM 4.7 Flash in Cursor?**

No. Spiral runs GLM 4.7 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 GLM 4.7 Flash in Cursor?**

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

**Does Cursor wait while GLM 4.7 Flash runs?**

GLM 4.7 Flash runs in the background. Cursor starts the run, checks on it and gives you the text, json when it's ready.

**What is GLM 4.7 Flash good at?**

Z.ai highlights frontend and backend programming, Chinese writing, translation, and long-text processing. Use those strengths for tasks such as code repair, document review, and bilingual drafts.

**How much text can GLM 4.7 Flash handle?**

The maker specifies a 200K-token context and up to 128K output tokens. Treat these as model specifications, not a promise of that output allowance in every application.

**Which settings should I try for code repair?**

Start by testing temperature 0.7 and top-p 1.0, the settings Z.ai used for SWE-bench Verified and Terminal Bench. Those evaluations used a 16,384-token generation cap; they do not establish a universal best setting.

**When should I use thinking?**

Use thinking for debugging, planning, and tasks with several constraints. For a simple wording change, Z.ai recommends disabling thinking to reduce unnecessary reasoning.

**Where does GLM 4.7 Flash need extra checking?**

Difficult knowledge questions and repository repairs need verification. Z.ai reports 14.4 on Humanity's Last Exam and 59.2 on SWE-bench Verified, so check factual claims and run relevant tests before accepting a patch.

