Open a metered Sarvam streaming session (live transcription, live speech or a Voice Agent)
Mints a single-use relay ticket valid for 60 seconds. Connect a WebSocket to the returned wsUrl and speak Sarvam's streaming protocol; the session configuration is fixed here and client config / config.update messages are dropped. transcribe relays streaming speech-to-text: send {"event":"audio_input","audio":"<base64 raw PCM in the chosen encoding>"}, plus flush, speech_start, speech_end, ping and end events; receive session.begin, vad.*, transcript.partial, transcript.final and session.end. Billed per second of audio sent (₹30/hour). speech relays streaming text-to-speech: send {"type":"text","data":{"text":"..."}}, {"type":"flush"} and {"type":"ping"}; receive audio chunks and a final event per flush. Billed per character (₹30 per 10,000) as Sarvam returns audio for it; text is at most 2,500 characters per message. agent relays a Sarvam Voice Agents (Samvaad) conversation with an agent authored in Sarvam's dashboard and allow-listed in SARVAM_AGENTS_APP_IDS. The backend mints Sarvam's signed session URL and sends client.action.interaction_start itself; send client.media.audio_chunk (audio_base64: 16-bit mono PCM at input_sample_rate), client.media.text / client.media.text_chunk, and answer server.system.ping with client.system.pong; receive Sarvam's server.* messages verbatim. Billed per second connected (from server.action.interaction_connected) at SARVAM_AGENTS_INR_PER_MINUTE; 503 until that rate is configured. All bill at Sarvam's list price (converted at SARVAM_INR_PER_USD) plus AGENT_INTEGRATION_SARVAM_MARGIN. Each open session reserves a minimum balance; the relay closes with 4402 when the balance no longer covers it, 4401 for a bad ticket and 4408 on idle or max-duration timeout.
Request
- Base URL: https://api.tinyhumans.ai
- URL: https://api.tinyhumans.ai/agent-integrations/sarvam/live/sessions
- Auth: HTTP bearer
Request body
Response
Relay ticket (sessionId, ticket, wsUrl, ticketExpiresAt, model, mode, maxMinutes, reserveUsd)
Changes
No recorded changes to this operation across all 1 revision of this API.