primer · sarvam

Four Sarvam AI primitives, demystified.

Every idea in this repo leans on one of four Sarvam AI primitives. Each one runs against api.sarvam.ai with a single subscription key, so you ship an Indian-language native demo with zero infra and nothing to host.

The one-key protocol

Add this in your Lovable project (Settings → Secrets) before pasting any mega-prompt:

  • SARVAM_API_KEYSingle api-subscription-key that unlocks Bulbul TTS, Saaras STT, Sarvam-105B chat, and Mayura translation across all 22 Indian languages.open ↗
Indian-language voice

Sarvam Bulbul v2 (TTS)

250 ideas use this
kernel
a POST https://api.sarvam.ai/text-to-speech call (model bulbul:v2, 30+ speakers, 11 Indian languages) sent with the api-subscription-key header; the server returns base64 WAV the client plays
how it drives the UI
a play button (or auto-play) that streams a natural Indian-language voiceover of anything the app writes
Indian speech-to-text

Sarvam Saaras v3 (STT)

250 ideas use this
kernel
Saaras v3 over the REST or WebSocket /speech-to-text endpoint — handles code-mixed Hindi/English, 11 Indian languages, telephony audio, and a speech-to-text-translate mode that returns English
how it drives the UI
a mic button that streams the user's Indian-language speech into live captions or a clean transcript
Indian-language LLM

Sarvam-105B (Chat)

250 ideas use this
kernel
Sarvam-105B via the OpenAI-compatible /v1/chat/completions endpoint at https://api.sarvam.ai/v1 with the api-subscription-key header — supports wiki_grounding for factual Indian-context answers and reasoning_effort for hard problems
how it drives the UI
a conversational surface that thinks and replies in the user's Indian language with culturally fluent reasoning
22-language translation

Mayura / Sarvam-Translate

250 ideas use this
kernel
POST https://api.sarvam.ai/translate (mayura:v1 or sarvam-translate) with source/target language codes across all 22 official Indian languages; transliteration available at /transliterate
how it drives the UI
a one-tap language switcher or dual-pane view that renders the same content across Indian languages and scripts