[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [Hy-MT2-1.8B](https://spiral.ai/integrations/opencode/hy-mt2-1-8b)

# How to Use Hy-MT2-1.8B in opencode

Hy-MT2-1.8B translates text with instructions for terminology, tone, and formatting. It uses 1.8 billion parameters compared with 7 billion in Hy-MT2-7B, but scores lower on Tencent's complex translation instruction tests.

|  |  |
| --- | --- |
| Model | Hy-MT2-1.8B |
| Available through | OpenRouter |
| Category | LLM |
| Price | Up to $0.000946 per run at the default inputs. $0.0572 per 1M input tokens, $0.2301 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Hy-MT2-1.8B in opencode

- Use Hy-MT2-1.8B to translate the project's English interface strings into German. Translate visible values only, preserve keys and interpolation placeholders, and check that the resulting JSON parses.
- Use Hy-MT2-1.8B to translate the README introduction into Japanese. Protect commands, URLs, and code blocks, and show the proposed documentation diff.
- Use Hy-MT2-1.8B to translate the checkout page's visible HTML text into French. Preserve tags and attributes, then check that the markup structure matches the original.
- Use Hy-MT2-1.8B to translate the latest release notes into Spanish in a formal style. Preserve version numbers and code identifiers, and return the proposed translated section.
- Use Hy-MT2-1.8B to translate one help article into Chinese. Read the project's terminology guide first, supply the relevant approved translations, and process the article section by section.

## How to set up Hy-MT2-1.8B 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 Hy-MT2-1.8B**: 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/hy-mt2-1.8b",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

Then paste one of the prompts above: opencode finds Hy-MT2-1.8B on Spiral, shows the price and runs it.

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

## Hy-MT2-1.8B tools and prices

- [Tencent: Hy-MT2-1.8B](https://spiral.ai/tools/openrouter/tencent/hy-mt2-1.8b) (OpenRouter): Up to $0.000946 per run at the default inputs. $0.0572 per 1M input tokens, $0.2301 per 1M output tokens.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| stop |  | — |  |
| max_tokens | 1 to 4096 | — | The most output tokens to generate. |
| temperature | 0 to 2 | — |  |

## What can you do with Hy-MT2-1.8B in opencode?

Translate application copy and documentation directly from the project with Hy-MT2. Have the coding agent extract the text, protect code and identifiers, and validate the translated result.

### Localize interface strings

Translate visible JSON values while protecting keys, nesting, and interpolation placeholders. Validate the translated data before adding it to an application.

### Translate support replies

Prepare replies in the customer's language with an explicit tone instruction and approved translations for product terms.

### Translate product descriptions

Translate catalog copy with a supplied glossary. Identify brand names and product identifiers that must remain unchanged.

### Localize website text

Translate visible HTML text while asking for tags and attributes to remain intact. Check the resulting markup before publication.

### Translate technical documentation

Work through documentation section by section, supplying approved technical terms and protecting code examples.

### Translate meeting excerpts

Supply a short description of the discussion before translating an excerpt, so ambiguous words have context.

### Adapt announcement tone

Translate announcements with a stated style, such as formal business language or friendly customer communication.

## Overview

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

## Hy-MT2-1.8B in other agents

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

## More opencode guides

- [Hermes 4 405B](https://spiral.ai/integrations/opencode/hermes-4-405b)
- [Hy-MT2-30B-A3B](https://spiral.ai/integrations/opencode/hy-mt2-30b-a3b)
- [Grok Latest](https://spiral.ai/integrations/opencode/grok-latest)
- [Hy-MT2-7B](https://spiral.ai/integrations/opencode/hy-mt2-7b)
- [Grok 4.7](https://spiral.ai/integrations/opencode/grok-4-7)
- [Hy3](https://spiral.ai/integrations/opencode/hy3)

## Questions about Hy-MT2-1.8B in opencode

**Can opencode use Hy-MT2-1.8B?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Hy-MT2-1.8B like any built-in tool.

**How much does Hy-MT2-1.8B cost in opencode?**

Up to $0.000946 per run at the default inputs. $0.0572 per 1M input tokens, $0.2301 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 Hy-MT2-1.8B in opencode?**

No. Spiral runs Hy-MT2-1.8B on its own OpenRouter account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Hy-MT2-1.8B in opencode?**

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

**Does opencode wait while Hy-MT2-1.8B runs?**

Hy-MT2-1.8B runs in the background. opencode starts the run, checks on it and gives you the text, json when it's ready.

**What is Hy-MT2 best used for?**

Use Hy-MT2 for translation with specific terminology, tone, or formatting requirements. Useful tasks include product text, support replies, documentation, and structured localization content.

**Which languages does Hy-MT2 support?**

Tencent reports translation among 33 languages, including English, Chinese, French, Spanish, Japanese, and German. Write language names in full in your instructions.

**How do I keep technical terms consistent?**

Put a short glossary of source terms and approved translations before the text. Explicitly identify product names or terms that should stay unchanged.

**Can Hy-MT2 preserve JSON and HTML during translation?**

Tencent provides prompts for translating visible text while preserving structure, keys, tags, and placeholders. Request those protections explicitly, then validate the result before using it.

**How should I handle long documents and generation settings?**

Tencent documents an 8,192-token context and recommends temperature 0.7 with a 4,096-token output budget for Hy-MT2-1.8B. Translate long documents section by section, leaving room for instructions, context, and the translation.

