Text Translation API
Translating a file (PDF, Word, Excel, PowerPoint, or HTML) with layout preserved? Use the Document Translation API instead of sending file text through this endpoint.
Translation Types
Translation Modes
Code Examples
Basic Translation
Advanced Options
Advanced Translation Features
Explore different parameters to customize your translation output:
Speaker Gender
Translation Mode
Output Script
Numerals Format
All Parameters
Choose between Male and Female voice characteristics for gender-specific translations.
Select the tone and style of translation - formal, modern-colloquial, classic-colloquial, or code-mixed for different use cases (mayura:v1 only; sarvam-translate:v1 supports formal mode only).
Choose between different script options (roman/fully-native/spoken-form-in-native) for the translated text output.
Specify the format for numbers in the output - choose between international (1,2,3) or native numerals (१,२,३).
Example using all available parameters together for maximum customization.
API Features
API Response Format
Supported languages:
- mayura:v1:
bn-IN,en-IN,gu-IN,hi-IN,kn-IN,ml-IN,mr-IN,od-IN,pa-IN,ta-IN,te-IN - sarvam-translate:v1: All mayura languages +
as-IN,brx-IN,doi-IN,kok-IN,ks-IN,mai-IN,mni-IN,ne-IN,sa-IN,sat-IN,sd-IN,ur-IN
More Response Examples
With Roman Script Output:
With Native Numerals:
Auto-Detected Source Language:
Error Responses
All errors return a JSON object with an error field (message, code, request_id). The full error-code table, retry guidance, and SDK exception reference live on the central Errors & Troubleshooting page.
Errors specific to this endpoint:
Error Handling Code Example
Check out our detailed API Reference to explore Translation and all available options.
Need help with translation? Contact us on discord for guidance.