---
title: "Translate Text"
method: POST
path: "/translate"
tags: ["text"]
---

# Translate Text

`POST /translate`

**Translation** converts text from one language to another while preserving its meaning.
For Example: **'मैं ऑफिस जा रहा हूँ'** translates to **'I am going to the office'** in English, where the script and language change, but the original meaning remains the same.

Available languages:
- **`bn-IN`**: Bengali
- **`en-IN`**: English
- **`gu-IN`**: Gujarati
- **`hi-IN`**: Hindi
- **`kn-IN`**: Kannada
- **`ml-IN`**: Malayalam
- **`mr-IN`**: Marathi
- **`od-IN`**: Odia
- **`pa-IN`**: Punjabi
- **`ta-IN`**: Tamil
- **`te-IN`**: Telugu

### Newly added languages:
- **`as-IN`**: Assamese
- **`brx-IN`**: Bodo
- **`doi-IN`**: Dogri
- **`kok-IN`**: Konkani
- **`ks-IN`**: Kashmiri
- **`mai-IN`**: Maithili
- **`mni-IN`**: Manipuri (Meiteilon)
- **`ne-IN`**: Nepali
- **`sa-IN`**: Sanskrit
- **`sat-IN`**: Santali
- **`sd-IN`**: Sindhi
- **`ur-IN`**: Urdu

For hands-on practice, you can explore the notebook tutorial on [Translate API Tutorial](https://github.com/sarvamai/sarvam-ai-cookbook/blob/main/notebooks/translate/Translate_API_Tutorial.ipynb).

## Headers

- `api-subscription-key` string, required

## Request body

- SarvamModelAPITranslationRequest
  - `input` string, required — The text you want to translate is the input text that will be processed by the translation model. The maximum is 1000 characters for Mayura:v1 and 2000 characters for Sarvam-Translate:v1.
  - `source_language_code` 'auto' | 'bn-IN' | 'en-IN' | 'gu-IN' | 'hi-IN' | 'kn-IN' | 'ml-IN' | 'mr-IN' | 'od-IN' | 'pa-IN' | 'ta-IN' | 'te-IN' | 'as-IN' | 'brx-IN' | 'doi-IN' | 'kok-IN' | 'ks-IN' | 'mai-IN' | 'mni-IN' | 'ne-IN' | 'sa-IN' | 'sat-IN' | 'sd-IN' | 'ur-IN', required
  - `target_language_code` 'bn-IN' | 'en-IN' | 'gu-IN' | 'hi-IN' | 'kn-IN' | 'ml-IN' | 'mr-IN' | 'od-IN' | 'pa-IN' | 'ta-IN' | 'te-IN' | 'as-IN' | 'brx-IN' | 'doi-IN' | 'kok-IN' | 'ks-IN' | 'mai-IN' | 'mni-IN' | 'ne-IN' | 'sa-IN' | 'sat-IN' | 'sd-IN' | 'ur-IN', required
  - `speaker_gender` 'Male' | 'Female'
  - `mode` 'formal' | 'modern-colloquial' | 'classic-colloquial' | 'code-mixed'
  - `model` 'mayura:v1' | 'sarvam-translate:v1'
  - `output_script` 'roman' | 'fully-native' | 'spoken-form-in-native'
  - `numerals_format` 'international' | 'native'

## Response `200`

Successful Response

- SarvamModelAPITranslationResponse
  - `request_id` string, nullable, required
  - `translated_text` string, required — Translated text result in the requested target language.
  - `source_language_code` string, required — Detected or provided source language of the input text.

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `422` — Unprocessable Entity
- `429` — Quota Exceeded
- `500` — Internal Server Error

---

[API](https://skmtc.dev/sarvam/apis/endpoints.md) · [All operations](https://skmtc.dev/sarvam/apis/endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sarvam/endpoints/revisions/2b7f7955b147/schema)
