> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://murf.ai/api/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://murf.ai/api/docs/_mcp/server.

Murf provides a robust [Translation API](/api/docs/api-reference/translation/translate) that enables you to seamlessly convert text from one language to another. It supports high-quality translations across major global languages.

Whether you're localizing product descriptions, articles or scripts, our Translation API is designed to scale with your needs.

## Quickstart

The Translate Text endpoint allows you to convert input text into your desired target language. You can use the Python SDK or the REST API directly to integrate the API into your app.

You can [Generate your API key](https://murf.ai/api/dashboard?utm_source=murf_api_docs) from the Murf API Dashboard and optionally set it as an environment variable.

#### Install the SDK

If you're using Python, you can install Murf's Python SDK using the following command:

```bash
pip install murf
```

#### Using the Translation API

**`Python SDK`**

```python title="Python SDK"
from murf import Murf

client = Murf(
    api_key="YOUR_API_KEY", # Not required if you have set the MURF_API_KEY environment variable
)
client.text.translate(
    target_language="es-ES",
    texts=["Hello, world!", "How are you?"],
)
```

```js
import axios from "axios";

const options = {
  method: "POST",
  url: "https://api.murf.ai/v1/text/translate",
  headers: {
    "api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  data: {
    targetLanguage: "es-ES",
    texts: ["Hello, world!", "How are you?"],
  },
};

axios
  .request(options)
  .then(function (response) {
    console.log(response.data);
  })
  .catch(function (error) {
    console.error(error);
  });
```

```curl

curl -X POST https://api.murf.ai/v1/text/translate \
     -H "api-key: YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
  "targetLanguage": "es-ES",
  "texts": [
    "Hello, world!",
    "How are you?"
  ]
}'

```

The translated text will be returned in the response.

### Response (200)

```json
{
  "metadata": {
    "character_count": {
      "total_source_text_length": 1,
      "total_translated_text_length": 1
    },
    "credits_used": 1.1,
    "target_language": "es_ES"
  },
  "translations": [
    {
      "source_text": "Hello, world.",
      "translated_text": "Hola, mundo."
    },
    {
      "source_text": "How are you?",
      "translated_text": "¿Cómo estás?"
    }
  ]
}
```

## Supported Languages

The Translation API supports a wide range of languages. Below is a list of supported languages:

| Locale   | Language & Accent     |
| -------- | --------------------- |
| en-US    | English - US & Canada |
| en-UK    | English - UK          |
| en-IN    | English - India       |
| en-AU    | English - Australia   |
| en-SCOTT | English - Scotland    |
| es-MX    | Spanish - Mexico      |
| es-ES    | Spanish - Spain       |
| fr-FR    | French - France       |
| de-DE    | German - Germany      |
| it-IT    | Italian - Italy       |
| nl-NL    | Dutch - Netherlands   |
| pt-BR    | Portuguese - Brazil   |
| zh-CN    | Mandarin - China      |
| ja-JP    | Japanese - Japan      |
| ko-KR    | Korean - Korea        |
| hi-IN    | Hindi - India         |
| ta-IN    | Tamil - India         |
| bn-IN    | Bangla - India        |
| hr-HR    | Croatian - Croatia    |
| sk-SK    | Slovak - Slovakia     |
| pl-PL    | Polish - Poland       |
| el-GR    | Greek - Greece        |

## API Limits

| Plan                        | Free              | Pay-as-you-go      | Enterprise |
| --------------------------- | ----------------- | ------------------ | ---------- |
| **Rate Limit**              | 1,000 requests/hr | 10,000 requests/hr | Custom     |
| **Concurrency Limit**       | Up to 5           | Up to 5            | Custom     |
| **Characters per Sentence** | 4,000             | 4,000              | 4,000      |
| **Sentences per Request**   | 10                | 10                 | 10         |

## FAQs

#### What languages does the Translation API support?

We support 23 languages and are constantly expanding our language coverage.
A full list of supported `target_language` codes can be found in the
[Supported Languages](#supported-languages) section.

#### Do I need to specify the source\_language?

No, the `source_language` can be automatically detected by the API. You only
need to provide the target\_language.

#### How is credit usage calculated?

Funds are consumed based on the number of output characters. You’ll see both
values (`characters_input` and `characters_output`) in the API response and
your dashboard.

#### Is there a limit to how much text I can translate at once?

Yes, the Translation API allows up to 10 sentences per request, with each
sentence being up to 4,000 characters long.