Text Preprocessing Quickstart

Sarvam AI offers a powerful text preprocessing model:

View our pricing page for detailed information about model-specific pricing and usage tiers.

Mayura: Our Text Preprocessing Model

Mayura is our state-of-the-art text preprocessing model that excels in handling Indian languages with features like translation, transliteration, and script conversion.

Text Preprocessing Features

Basic Text Translation

Translate text between Indian languages with high accuracy. Features include:

  • Support for multiple Indian languages
  • Automatic language detection
  • Natural and fluent translations
  • Context-aware processing
1from sarvamai import SarvamAI
2
3client = SarvamAI(api_subscription_key="YOUR_API_SUBSCRIPTION_KEY")
4
5response = client.text.translate(
6input="Welcome to Sarvam AI!",
7source_language_code="en-IN",
8target_language_code="hi-IN",
9model="mayura:v1",
10)
11
12print(response.translated_text)
Key Considerations
  • Maximum text length: 1000 characters per request
  • Supports 10 Indic Langagues and English
  • Automatic language detection available
  • Translation modes: formal (default), modern-colloquial, classic-colloquial, code-mixed