--- id: sarvamai version: "0.1.30" license: unclear license_treatment: unclear maintenance: active --- # sarvamai License: unclear · Maintenance: active · Downloads: 177.5K/mo ## What it is and what it does Sarvamai is a Python SDK that wraps the Sarvam API, a cloud service for text translation and speech processing focused on Indian languages. It provides both synchronous and asynchronous clients, allowing developers to translate text between supported Indian language pairs (including Bengali, Hindi, Tamil, Telugu, Kannada, Malayalam, Marathi, Gujarati, Punjabi, Odia, and newer additions like Assamese, Bodo, Dogri, Konkani, Kashmiri, Maithili, Manipuri, Nepali, Sanskrit, Santali, Sindhi, and Urdu) with optional tone/style modes and transliteration output. The SDK handles HTTP communication via httpx, includes automatic retry logic with exponential backoff for transient failures (408, 429, 5xx status codes), configurable timeouts (default 60 seconds), and exception handling for API errors. It is typed with pydantic validation and supports custom httpx clients for proxy or transport customization. The library is generated programmatically and requires an active API subscription key for all requests. Use it for: - Translate user-generated text between Indian languages in a web or mobile application backend - Build a multilingual chatbot or customer support system that handles conversations in regional Indian languages - Process and transliterate text to different scripts (e.g., Hindi to Roman script) for accessibility or display purposes - Integrate speech-to-text transcription into a Python application using the Sarvam API - Batch translate content with automatic language detection and optional preprocessing for complex vocabulary ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Python SDK for the Sarvam API, providing access to text translation and speech-to-text services across Indian languages with both synchronous and asynchronous clients. Yes, with conditions. The package is actively maintained, has low install friction, and provides a clean async-capable interface to a specialized translation service. However, install only if you have a Sarvam API subscription and can verify the license terms independently—the package metadata does not declare a license, creating uncertainty about redistribution and commercial use. No known vulnerabilities as of the query date. ## Install pip install sarvamai uv add sarvamai poetry add sarvamai ## Installing sarvamai Before you install: Low install friction with a pure-Python wheel distribution. Actively maintained with a recent release 11 days ago. Depends on standard libraries (httpx, pydantic, websockets) with no compiled dependencies. License in practice: License treatment is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms before using in proprietary or restricted contexts. Quickstart: pip install sarvamai from sarvamai import SarvamAI client = SarvamAI(api_subscription_key="YOUR_API_SUBSCRIPTION_KEY") client.text.translate( input="input", source_language_code="auto", target_language_code="bn-IN" ) Requires a valid Sarvam API subscription key to authenticate requests. Verify before relying: - Actual license terms and restrictions—metadata shows no SPDX or raw license field - Rate limits and quota behavior for the translation API beyond the default retry configuration - Whether speech-to-text functionality is fully implemented or still in development ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 177.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags sarvam api python client, indian language translation sdk, text translation python library, speech to text api wrapper, async language translation client, multilingual text processing, sarvam ai integration, language-translation, indian-languages, api-client [View on SkillFed](https://skillfed.io/packages/sarvamai) · [View on PyPI](https://pypi.org/project/sarvamai/)