---
title: Translation with Cloud API Key
description: How to use Jodit Cloud API key as a translation provider for the translate plugin.
keywords: jodit cloud, translate, translation, cloud provider, api key
---

# Translation

You can use your Jodit Cloud API key as a translation provider for the `translate` plugin. The Cloud service translates text using the Yandex Translate engine and supports auto-detection of the source language.

> **Important:** The translation endpoint validates the HTTP `Referer` header against your key's allowed domains. You must add your website domain to the **Referrers** list in the [Cloud Settings](/jodit/pro/cab/) for your API key, otherwise requests will be rejected with 403 Forbidden. See [API Key Settings](./settings.md) for details.

> **Note:** Translation requests are billed per character of source text. For details on rate limits, see [Translation Usage Limits](./translate-limits.md).

## Quick Start

The simplest way to use Cloud translation is with the built-in `'cloud'` provider:

```javascript
Jodit.make('#editor', {
	extraPlugins: ['translate'],
	translate: {
		provider: 'cloud',
		cloudProviderOptions: {
			key: 'YOUR_CLOUD_API_KEY'
		},
		defaultSourceLang: 'auto',
		defaultTargetLang: 'en'
	}
});
```

This configures the translate plugin to use the Jodit Cloud translation service with automatic source language detection and English as the default target language.

## Configuration Options

### translate.provider

Set to `'cloud'` to use the Jodit Cloud translation service.

```javascript
Jodit.make('#editor', {
	extraPlugins: ['translate'],
	translate: {
		provider: 'cloud'
	}
});
```

### translate.cloudProviderOptions

| Option | Type   | Default                      | Description                         |
| ------ | ------ | ---------------------------- | ----------------------------------- |
| `key`  | string | `''`                         | Your Jodit Cloud API key (required) |
| `url`  | string | `'https://cloud.xdsoft.net'` | Cloud API base URL                  |

```javascript
Jodit.make('#editor', {
	extraPlugins: ['translate'],
	translate: {
		provider: 'cloud',
		cloudProviderOptions: {
			key: 'YOUR_CLOUD_API_KEY',
			url: 'https://cloud.xdsoft.net' // default, usually no need to change
		}
	}
});
```

### translate.defaultSourceLang

- Type: `string`
- Default: `''` (auto-detect)

Source language code ([ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)). Leave empty or set to `'auto'` for automatic detection.

### translate.defaultTargetLang

- Type: `string`
- Default: `'de'`

Target language code ([ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)).

## Full Example

```javascript
Jodit.make('#editor', {
	extraPlugins: ['translate'],
	translate: {
		provider: 'cloud',
		cloudProviderOptions: {
			key: 'YOUR_CLOUD_API_KEY'
		},
		defaultSourceLang: 'auto',
		defaultTargetLang: 'en',
		hotkeys: {
			translateSelection: ['ctrl+shift+o', 'cmd+shift+o'],
			translateOptions: ['ctrl+shift+p', 'cmd+shift+p']
		}
	}
});
```

## Full Example with File Browser

```javascript
Jodit.make('#editor', {
	extraPlugins: ['translate'],
	translate: {
		provider: 'cloud',
		cloudProviderOptions: {
			key: 'YOUR_CLOUD_API_KEY'
		},
		defaultSourceLang: 'auto',
		defaultTargetLang: 'en'
	}
});
```

## How It Works

1. Select text in the editor
2. Click the **Translate** toolbar button or press `Cmd+Shift+O` / `Ctrl+Shift+O`
3. The plugin sends the selected text to the Cloud translation API
4. The translated text replaces the selection

To change the source or target language, press `Cmd+Shift+P` / `Ctrl+Shift+P` to open translation options.

## Live Demo

A working example is available at [https://xdsoft.net/jodit/pro/docs/plugin/translate/#demo](https://xdsoft.net/jodit/pro/docs/plugin/translate/#demo).
