> For clean Markdown of any page, append `.md` to the page URL. > For a complete documentation index, see https://docs.sarvam.ai/llms.txt. > For full documentation content in one file, see https://docs.sarvam.ai/llms-full.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server. # Sarvam Translate > Sarvam Translate - Comprehensive translation model supporting all 22 official Indian languages with formal translation style and structured text optimization. Sarvam Translate enables high-quality translation between English and 22 Indian languages. It provides comprehensive coverage of all scheduled Indian languages with formal translation style, making it ideal for official and professional communication needs. ## At a Glance | | | | --------------------- | -------------------------------------------------------------------------------------------------------------- | | **Model ID** | `sarvam-translate:v1` | | **What it does** | Formal-style translation across all 22 scheduled Indian languages | | **Languages** | 23 (22 Indian + English), [full list](#language-support) | | **APIs** | [Translation REST API](/api/api-guides-tutorials/text-processing/translation) (`/translate`) | | **Input limits** | 2,000 characters per request, [all limits](#limits) | | **Benchmarks** | [Corpus BLEU](#corpus-bleu-bilingual-evaluation-understudy-benchmark) | | **Pricing** | [Pricing page](/api/getting-started/pricing) | | **Best for** | Official and professional documents, structured long-form text, full 22-language coverage | | **Known limitations** | Formal style only. Use [Mayura](/api/getting-started/models/mayura) for colloquial or code-mixed output styles | ## Key Features #### Wide Language Support Support for all 22 scheduled Indian languages and English for comprehensive translation coverage. #### Formal Style Translation Default translation mode is formal to ensure clarity and consistency in professional communications. #### Numeral Format Control Option to choose between international and native numeral systems for culturally appropriate translations. #### Comprehensive Coverage Complete support for all official Indian languages as per the Constitution of India. #### High Quality Translation Formal translation style optimized for professional and official communication needs. ## Language Support Sarvam Translate supports all 22 scheduled Indian languages as per the Constitution of India: | Language | Code | | --------- | ------ | | Assamese | as-IN | | Bengali | bn-IN | | Bodo | brx-IN | | Dogri | doi-IN | | English | en-IN | | Gujarati | gu-IN | | Hindi | hi-IN | | Kannada | kn-IN | | Kashmiri | ks-IN | | Konkani | kok-IN | | Maithili | mai-IN | | Malayalam | ml-IN | | Manipuri | mni-IN | | Marathi | mr-IN | | Nepali | ne-IN | | Odia | od-IN | | Punjabi | pa-IN | | Sanskrit | sa-IN | | Santali | sat-IN | | Sindhi | sd-IN | | Tamil | ta-IN | | Telugu | te-IN | | Urdu | ur-IN | Supports bidirectional translation for all listed languages. > **Note** > > All languages support bidirectional translation. Specify the exact source language code for optimal translation quality. ## Corpus BLEU (Bilingual Evaluation Understudy) Benchmark Corpus BLEU score is a metric that evaluates the overall quality of machine translation by comparing it to reference translations across an entire dataset. Higher scores (closer to 100) indicate better performance. ## Key Capabilities #### Basic Usage Simple translation between any of the 22 supported Indian languages and English. #### Python ```python from sarvamai import SarvamAI client = SarvamAI(api_subscription_key="YOUR_SARVAM_API_KEY") response = client.text.translate( input="भारत एक महान देश है। इसकी संस्कृति बहुत पुरानी और समृद्ध है।", source_language_code="hi-IN", target_language_code="gu-IN", model="sarvam-translate:v1" ) print(response) ``` #### JavaScript ```javascript import { SarvamAIClient } from "sarvamai"; const client = new SarvamAIClient({ apiSubscriptionKey: "YOUR_SARVAM_API_KEY" }); async function main() { const response = await client.text.translate({ input: "भारत एक महान देश है। इसकी संस्कृति बहुत पुरानी और समृद्ध है।", source_language_code: "hi-IN", target_language_code: "gu-IN", model: "sarvam-translate:v1" }); console.log(response); } main(); ``` #### cURL ```bash curl -X POST https://api.sarvam.ai/translate \ -H "Content-Type: application/json" \ -H "api-subscription-key: YOUR_SARVAM_API_KEY" \ -d '{ "input": "भारत एक महान देश है। इसकी संस्कृति बहुत पुरानी और समृद्ध है।", "source_language_code": "hi-IN", "target_language_code": "gu-IN", "model": "sarvam-translate:v1" }' ``` #### Advanced Options Customize numeral formats for enhanced translation quality and cultural appropriateness. #### Python ```python from sarvamai import SarvamAI client = SarvamAI(api_subscription_key="YOUR_SARVAM_API_KEY") # With advanced options response = client.text.translate( input="The meeting is scheduled for 15th March, 2024 at 10:30 AM", source_language_code="en-IN", target_language_code="hi-IN", model="sarvam-translate:v1", numerals_format="native" # Options: international, native ) print(response) ``` #### JavaScript ```javascript import { SarvamAIClient } from "sarvamai"; const client = new SarvamAIClient({ apiSubscriptionKey: "YOUR_SARVAM_API_KEY" }); async function main() { // With advanced options const response = await client.text.translate({ input: "The meeting is scheduled for 15th March, 2024 at 10:30 AM", source_language_code: "en-IN", target_language_code: "hi-IN", model: "sarvam-translate:v1", numerals_format: "native" // Options: international, native }); console.log(response); } main(); ``` #### cURL ```bash curl -X POST https://api.sarvam.ai/translate \ -H "Content-Type: application/json" \ -H "api-subscription-key: YOUR_SARVAM_API_KEY" \ -d '{ "input": "The meeting is scheduled for 15th March, 2024 at 10:30 AM", "source_language_code": "en-IN", "target_language_code": "hi-IN", "model": "sarvam-translate:v1", "numerals_format": "native" }' ``` > **Note** > > The `output_script` option is not supported in Sarvam Translate. For script control, use the [Mayura](/api/getting-started/models/mayura) model. ## Limits | Limit | Value | | ---------------------------- | ------------------------------------------------------------- | | Max input length per request | 2,000 characters (`sarvam-translate:v1`) | | Longer texts | Split into chunks of ≤2,000 characters at sentence boundaries | | Rate limits | See [Rate Limits](/api/getting-started/ratelimits) | ## Next Steps #### [Developer quickstart](/api/api-guides-tutorials/text-processing/overview) Learn how to integrate translation into your application. #### [API Reference](/api-reference/text/translate-text) Complete API documentation for translation endpoints. #### [Cookbook](/api/api-guides-tutorials/text-processing/translation) Step-by-step tutorial for translation implementation. > Sarvam Translate - Comprehensive translation model supporting all 22 official Indian languages with formal translation style and structured text optimization.