[Integrations](https://spiral.ai/integrations) › [Codex](https://spiral.ai/integrations/codex) › [GLM-5V-Turbo](https://spiral.ai/integrations/codex/glm-5v-turbo)

# How to Use GLM-5V-Turbo in Codex

GLM-5V-Turbo turns screenshots and designs into frontend code and helps diagnose visual bugs. It adds visual understanding to the text-based coding capabilities of GLM-5-Turbo.

|  |  |
| --- | --- |
| Model | GLM-5V-Turbo |
| Available through | OpenRouter |
| Category | LLM |
| Price | Up to $0.021354 per run at the default inputs. $1.56 per 1M input tokens, $5.20 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with GLM-5V-Turbo in Codex

- Use GLM-5V-Turbo to implement the supplied checkout design in this project. Reuse existing components, match the visible layout, and list any interactions the image does not specify.
- Use GLM-5V-Turbo to compare the reference screenshot with the current page screenshot. Inspect the relevant styles, fix the three largest visible differences, and check the rendered result again.
- Use GLM-5V-Turbo to investigate the overlapping navigation in this screenshot. Inspect the layout code, explain the cause, and make the smallest fix that preserves the intended mobile behavior.
- Use GLM-5V-Turbo to turn the supplied wireframe into a working settings page using this project's components. Identify assumptions about behavior before implementing them.
- Use GLM-5V-Turbo to review this screen recording alongside the relevant UI code. List visible state changes, investigate the reported flicker, and propose a way to verify the fix.

## How to set up GLM-5V-Turbo 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 GLM-5V-Turbo**: 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-5v-turbo",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

Then paste one of the prompts above: Codex finds GLM-5V-Turbo on Spiral, shows the price and runs it.

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

## GLM-5V-Turbo tools and prices

- [Z.ai: GLM 5V Turbo](https://spiral.ai/tools/openrouter/z-ai/glm-5v-turbo) (OpenRouter): Up to $0.021354 per run at the default inputs. $1.56 per 1M input tokens, $5.20 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-5V-Turbo in Codex?

Turn design references into frontend changes and use screenshots to diagnose rendering defects with GLM-5V-Turbo. Give the agent the relevant project files, expected behavior, and a visual reference to check the result.

### Implement a design reference

Use GLM-5V-Turbo to turn a screen design into frontend code. Specify which layout details must match and which interactions need implementation.

### Diagnose visual interface bugs

Give GLM-5V-Turbo a broken screen and the expected appearance. Ask for visible defects, likely causes, and a focused repair plan.

### Review a dashboard

Ask GLM-5V-Turbo to explain a dashboard screenshot, identify visible trends, and separate readable values from estimates.

### Draft a document brief

Use GLM-5V-Turbo to turn a supplied report into a brief organized around a specific question. Request supporting page references and a list of unanswered questions.

### Locate objects in visual evidence

Ask GLM-5V-Turbo to identify a described object in an image and return its bounding box. State the coordinate convention and ask it to flag ambiguous matches.

### Compare a prototype with its design

Have GLM-5V-Turbo compare reference and implementation screenshots. Request a prioritized list of differences in spacing, alignment, colors, and component placement.

### Summarize a recorded interface walkthrough

Use GLM-5V-Turbo to analyze a supplied screen recording and describe visible interface states. Request a concise sequence of observations and questions for further testing.

## Overview

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

## GLM-5V-Turbo in other agents

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

## More Codex guides

- [GLM-5.3](https://spiral.ai/integrations/codex/glm-5-3)
- [GPT Astra](https://spiral.ai/integrations/codex/gpt-astra)
- [GLM-5.2](https://spiral.ai/integrations/codex/glm-5-2)
- [GPT Chat Latest](https://spiral.ai/integrations/codex/gpt-chat-latest)
- [GLM-5 Turbo](https://spiral.ai/integrations/codex/glm-5-turbo)
- [GPT Luna Latest](https://spiral.ai/integrations/codex/gpt-luna-latest)

## Questions about GLM-5V-Turbo in Codex

**Can Codex use GLM-5V-Turbo?**

Yes. Add Spiral to Codex as an MCP server, and Codex can find and run GLM-5V-Turbo like any built-in tool.

**How much does GLM-5V-Turbo cost in Codex?**

Up to $0.021354 per run at the default inputs. $1.56 per 1M input tokens, $5.20 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 GLM-5V-Turbo in Codex?**

No. Spiral runs GLM-5V-Turbo 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-5V-Turbo in Codex?**

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

**Does Codex wait while GLM-5V-Turbo runs?**

GLM-5V-Turbo runs in the background. Codex starts the run, checks on it and gives you the text, json when it's ready.

**What is GLM-5V-Turbo best suited for?**

Start with work that connects visual evidence to a concrete result: implementing a design, diagnosing a broken interface, or explaining a chart. Z.ai also identifies document analysis as a use.

**Does GLM-5V-Turbo generate images or video?**

Its documented output modality is text. It can analyze visual inputs and return explanations or code.

**How much context and output does GLM-5V-Turbo support?**

Z.ai documents a 200K context window and up to 128K output tokens. For practical tasks, request the specific deliverable you need instead of aiming for the maximum length.

**What should I watch for during long visual tasks?**

Images and video consume context more aggressively than text, and retaining visual details remains a challenge in long workflows. As a practical precaution, keep the key reference images available at verification checkpoints.

**How should I prompt GLM-5V-Turbo for visual debugging?**

Provide the broken screen, describe the expected behavior, and ask for observed defects before proposed causes. Request a separate check of the corrected screen against the reference.

