> 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. # How it works > The architecture of a Sarvam self-hosted deployment: AWS Marketplace entitlement, a SageMaker model package, and an inference endpoint running in your own VPC. Plus how to choose real-time, async, or batch. A self-hosted deployment has three pieces: an **AWS Marketplace subscription** (entitlement), the **Sarvam model package** (the pre-built container Sarvam publishes), and a **SageMaker endpoint** you create from it inside your own account. ```mermaid flowchart LR subgraph MP["AWS Marketplace"] L["Sarvam listing — model package
Saaras v3 STT · Bulbul v3 TTS · Sarvam Vision"] end subgraph ACC["Your AWS account and VPC — network-isolated"] subgraph SM["Amazon SageMaker"] C["Sarvam model container
GPU instance"] end APP["Your application"] end L -->|"subscribe (entitlement)"| C APP <-->|"InvokeEndpoint · your data stays in-account"| C ``` * **The model package** is a versioned container Sarvam maintains. You never build or patch it — you subscribe to a version and deploy it. * **The endpoint** runs on GPU instances you choose, in your region and VPC. It is network-isolated: no outbound internet from the container. * **Your data** (audio, documents) is sent only to your own endpoint and stays in your cloud. ## Deployment modes #### Real-time An always-on endpoint that returns results in the API response. For interactive and synchronous workloads. #### Async Submit a job, get results from S3 when ready. Supports large payloads and **scale-to-zero** when idle. #### Batch transform Process a whole S3 prefix of files in one job, then shut the instances down. For bulk/offline processing. Not every model supports every mode: * **Saaras v3 (STT):** **real-time** (audio ≤ 30 s) and **streaming** (bidirectional SigV4 HTTP/2, for longer or continuous audio). Batch is not supported. * **Bulbul v3 (TTS):** **real-time**, **server-side streaming (SSE)**, **bidirectional** (SigV4 HTTP/2), and **batch transform**. * **Sarvam Vision:** **real-time** (sync), **async**, and **batch transform**. ### Which mode should I use? | Your workload | Use | | ------------------------------------------------------------- | ------------------------------------------------ | | Live captions, interactive transcription, short audio clips | **Real-time** (Saaras v3) | | Long or continuous audio | **Streaming** (Saaras v3) | | Short text prompts, interactive speech | **Real-time** (Bulbul v3) | | Low-latency playback or long text (≤ 3500 chars) | **Streaming — SSE or bidirectional** (Bulbul v3) | | A small document that finishes within 60 s, interactively | **Real-time** (Vision) | | Large documents, occasional or bursty traffic, cost-sensitive | **Async** (Vision — scale-to-zero) | | Bulk/offline processing of many documents in S3 | **Batch transform** (Vision) | > **Note** > > For Saaras v3, the real-time path accepts audio up to **30 seconds**; for longer or continuous audio use the **streaming** endpoint. See [Deploy Speech-to-Text](/api/self-hosted/sagemaker/deploy-saaras). > The architecture of a Sarvam self-hosted deployment: AWS Marketplace entitlement, a SageMaker model package, and an inference endpoint running in your own VPC. Plus how to choose real-time, async, or batch.