# Immersive Translate

Immersive Translate can add custom AI translation services. Enter the address, key and model to translate web pages and PDFs with NezhaGate models.

> https://nezhagate.com/en/docs/integrations/immersive-translate

Written against Immersive Translate 1.33

## Add the translation service

1. Open the extension's **Settings** → **Translation Services**, scroll to the bottom and click **Add Custom Translation Service**.

2. Choose **Custom AI** (not Custom API, which speaks another protocol).

3. Fill in the fields as below and save.

| Field | Value |
| --- | --- |
| **Custom API interface address** | `https://nezhagate.com/v1/chat/completions` |
| **APIKEY** | Your NezhaGate API key |
| **Model** | Click **Set up more models**, enter model ids in **Custom Model List** (comma-separated), then select one. |
| **Max requests per second** | 3–5 is a good start (default 5). Translating a page sends many requests at once, and too high a value can trigger rate limits. |

## Which model to use

Page translation is many short requests, so a model that answers quickly without long thinking suits it best; a thinking model thinks before every paragraph, which is slower and spends more output tokens. For example:

`gemini-3.6-flash-low` · `claude-sonnet-4-6`

## Claude (optional)

You can also use the extension's built-in **Claude** service with your own key, with the API address set to `https://nezhagate.com/anthropic/v1/messages`.

## Test

Click **Verify service**; once it shows **Successful**, translate any page to try it.

## Troubleshooting

**429, or a translation that fails halfway**

Lower **Max requests per second**, for example to 3.

**401 / 404**

401 means the key is wrong; 404 means the address is wrong. It should be `https://nezhagate.com/v1/chat/completions`.

**The service test keeps failing**

Make sure the type is **Custom AI**, not Custom API, and that the model id is in the custom model list and selected.

**The userscript version cannot send requests**

The script header must declare the NezhaGate domain with `// @connect`.
