Best suited for
- 01
Document-intensive agents
Reason over extensive source material while keeping the tool definitions and conversation history in the same request.
- 02
Visual + text workflows
Send inline images alongside instructions for extraction, layout understanding and multimodal tool use.
- 03
Multi-step automation
Connect reasoning to application tools for tasks that require decisions, external results and follow-up actions.
Build with the Sarvam SDK
pip install --upgrade sarvamaiV2 · Sarvam SDK · Streamingimport osfrom sarvamai import SarvamAIclient = SarvamAI(api_subscription_key=os.environ["SARVAM_API_KEY"])stream = client.chat.completions_v2(model="deepseekv4.1-flash-1017",messages=[{"role": "user", "content": "Explain why time to first token matters for a chat application briefly."}],max_tokens=8000,stream=True,)for chunk in stream:if not chunk.choices:continuetext = chunk.choices[0].delta.contentif text:print(text, end="", flush=True)
- 01 Install the Sarvam SDK
Install
sarvamaifor Python or JavaScript. Store your key inSARVAM_API_KEY. - 02 Choose your model
Use model ID
deepseekv4.1-flash-1017. The SDK callshttps://api.sarvam.ai/v2for this example.V2 Chat Completions. High reasoning is the default. Reasoning tokens count toward the 8,000-token output budget.
- 03 Validate your application
Check output quality, supported parameters and tool behaviour on representative requests before moving production traffic.
Frequently Asked
Questions
Explore other models
View catalogueGLM 5.3
- Z.ai
- Reasoning and coding
- 1M context
Large-scale reasoning model built for complex software engineering and long-horizon agent tasks.
GLM 5.3 Flash
- Z.ai
- Reasoning and coding
- 1M context
Faster open-weight reasoning model for agents and image understanding.
Gemma 4 31B
- Google DeepMind
- Vision
- 256K context
31B-parameter instruction-tuned model for text and image understanding, with tool calling and optional reasoning.
From model choice to production. Bring your workload, traffic expectations and latency targets. Build on Sarvam’s serving stack in India.
From model choice to production.
Bring your workload, traffic expectations and latency targets. Build on Sarvam’s serving stack in India.