[Integrations](https://spiral.ai/integrations) › [Cline](https://spiral.ai/integrations/cline) › [Hy4 Preview](https://spiral.ai/integrations/cline/hy4-preview)

# How to Use Hy4 Preview in Cline

Hy4 Preview handles long-context coding, office analysis, and scientific research. Its output ceiling is 64,000 tokens versus Hy4's 65,536, and Tencent documents a tendency to over-check its work.

|  |  |
| --- | --- |
| Model | Hy4 Preview |
| Available through | OpenRouter |
| Category | LLM |
| Price | Up to $0.013357 per run at the default inputs. $1.0842 per 1M input tokens, $3.2513 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Hy4 Preview in Cline

- Use Hy4 Preview to map this project's authentication flow across files. Identify where session expiration is handled and propose a migration plan with acceptance checks.
- Use Hy4 Preview to build a small browser game in this repository with arrow-key movement, collectible coins, and a restart button. Test the scoring and restart behavior.
- Use Hy4 Preview to review this project's numerical solver with temperature=0.9 and top_p=1.0. Check the equations against the implementation and add a meaningful convergence check.
- Ask Hy4 Preview through Spiral to review the diff on this branch and list the three riskiest changes. Save the result in ./assets.
- Get a second opinion from Hy4 Preview on this function, then tell me what the call cost.

## How to set up Hy4 Preview in Cline

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

### Use Spiral's MCP server

1. **Add the server**: In the Cline panel, click the MCP Servers icon and open the Remote Servers tab. Enter:

```bash
cline mcp add spiral https://api.spiral.ai/mcp --transport http --yes
```

2. **Sign in**: Open the Configure tab and click Authenticate on the Spiral server. Sign in to Spiral, pick the organization and click Authorize. No API key.

3. **Check it**: Spiral shows as connected on the Configure tab. In the CLI:

```bash
cline config mcp
```

### Use the Spiral skill

1. **Send Cline 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 Hy4 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": "openrouter",
    "model": "tencent/hy4-preview",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

Then paste one of the prompts above: Cline finds Hy4 Preview on Spiral, shows the price and runs it.

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

## Hy4 Preview tools and prices

- [Tencent: Hy4 preview](https://spiral.ai/tools/openrouter/tencent/hy4-preview) (OpenRouter): Up to $0.013357 per run at the default inputs. $1.0842 per 1M input tokens, $3.2513 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 Hy4 Preview in Cline?

Tencent Hy4 can help carry code changes from investigation through implementation and testing. Give it the relevant project context and concrete acceptance checks.

### Fix a bug across several files

Trace a failing behavior through the relevant code, propose a focused patch, and check it against the reported failure.

### Plan a code migration

Compare existing code with the target requirements, identify dependencies, and break the migration into changes with acceptance checks.

### Turn working notes into a report

Combine supplied notes into a report with decisions, unresolved questions, and evidence attached to each conclusion.

### Review a financial model

Examine supplied assumptions and tables, explain the calculations, and flag inconsistencies for review.

### Prototype a small game

Build a playable loop from a written brief, then refine controls, rules, and failure states through testing.

### Develop a research computation

Translate a mathematical or scientific question into a computational approach with explicit assumptions and validation checks.

## Overview

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

## Hy4 Preview in other agents

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

## More Cline guides

- [Hy4 Flash](https://spiral.ai/integrations/cline/hy4-flash)
- [Inkling](https://spiral.ai/integrations/cline/inkling)
- [Hy4](https://spiral.ai/integrations/cline/hy4)
- [Inkling 2 Mini](https://spiral.ai/integrations/cline/inkling-2-mini)
- [Hy3](https://spiral.ai/integrations/cline/hy3)
- [Inkling 2 Small](https://spiral.ai/integrations/cline/inkling-2-small)

## Questions about Hy4 Preview in Cline

**Can Cline use Hy4 Preview?**

Yes. Add Spiral to Cline as an MCP server, and Cline can find and run Hy4 Preview like any built-in tool.

**How much does Hy4 Preview cost in Cline?**

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

**Do I need an OpenRouter account to use Hy4 Preview in Cline?**

No. Spiral runs Hy4 Preview on its own OpenRouter account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Hy4 Preview in Cline?**

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

**Does Cline wait while Hy4 Preview runs?**

Hy4 Preview runs in the background. Cline starts the run, checks on it and gives you the text, json when it's ready.

**What is Tencent Hy4 useful for?**

Coding, office analysis, and scientific research are documented uses. Give it work that requires connecting evidence and completing several related steps.

**How much context can Tencent Hy4 handle?**

Hy4 and Hy4 Preview each have a 1,048,576-token context window. For a large request, identify the relevant sections and state the exact question you need answered.

**How long can a Tencent Hy4 response be?**

Hy4 supports up to 65,536 completion tokens; Hy4 Preview supports up to 64,000. Specify the deliverable's length instead of requesting the maximum by default.

**Can Tencent Hy4 make factual mistakes?**

Yes. Tencent reported lower hallucination rates for Hy4 than Hy4 Preview in an internal evaluation, but errors remained. Ask for supporting passages and verify consequential claims against the original evidence.

**Can Tencent Hy4 help build a game?**

Game prototyping is a documented use. Start with a small playable loop, define the controls and win condition, and refine it after testing.

