chat
Chat Completions — Sarvam AI
[!IMPORTANT] Auth:
api-subscription-keyheader — NOTAuthorization: Bearer. Base URL:https://api.sarvam.ai/v1
Models
| Model | Context | Best For |
|---|---|---|
sarvam-105b |
128K | Complex reasoning, coding, agentic workflows |
sarvam-30b |
64K | Real-time chat, voice agents, conversational AI |
sarvam-105b-32k |
32K | Cost-efficient 105B |
sarvam-30b-16k |
16K | Cost-efficient 30B |
Quick Start (Python)
from sarvamai import SarvamAI
client = SarvamAI()
More from sarvamai/skills
speech-to-text
Transcribe audio to text using Sarvam AI's Saaras model. Handles speech recognition, transcription, and voice interfaces for 23 Indian languages. Supports 5 output modes, auto language detection, WebSocket streaming, and batch diarization. Use when converting speech to text or building voice-enabled apps.
170translate
Translate text between English and Indian languages using Sarvam AI (Sarvam-Translate, Mayura). Handles content translation and app localization across 22+ languages with mode control, script options, and numeral formats. Use when translating or localizing content for Indian users.
61text-to-speech
Convert text to natural speech using Sarvam AI's Bulbul v3 model. Handles audio generation, voiceovers, and voice interfaces for 11 Indian languages with 30+ voices. Supports REST, HTTP streaming, WebSocket, and pronunciation dictionaries. Use when generating spoken audio from text.
58voice-agents
Build conversational voice agents using Sarvam AI with LiveKit or Pipecat. Handles voice assistants, phone bots, IVR, and real-time conversational AI for Indian languages. Integrates Sarvam STT (Saaras v3), TTS (Bulbul v3), and LLM (Sarvam-30B) with low-latency streaming. Use when creating voice-enabled applications or real-time speech pipelines.
45