Open-Weight Models
Run leading open-weight models on Sarvam infrastructure through the same OpenAI-compatible
/v2 API, with your existing Sarvam API key and credits. Switching models is a one-line
change to the model field.
GLM-5.3, GLM-5.3 Flash, and Gemma 4 31B are generally available. DeepSeek V4.1 Flash 1017, DeepSeek V4 Pro, Kimi K3, MiMo V2.6 Flash, and MiMo V2.6 Pro are in beta.
Choose a model
Pick a use case, or filter by status and input type. Click a model ID to copy it.
Software engineering and long-horizon agents.
- Context
- 1M
- Reasoning
- On, can't turn off
- Input
- Text
- ₹ per 1M in / out
- ₹126 / ₹390
Faster GLM-5.3 with image input.
- Context
- 1M
- Reasoning
- On, can't turn off
- Input
- TextImage
- ₹ per 1M in / out
- ₹13.5 / ₹45
Fast direct answers and image understanding.
- Context
- 256K
- Reasoning
- Off by default
- Input
- TextImage
- ₹ per 1M in / out
- ₹35 / ₹90
Low-cost reasoning for long documents and agents.
- Context
- 1M
- Reasoning
- On, can turn off
- Input
- TextImage
- ₹ per 1M in / out
- ₹25 / ₹105
Larger DeepSeek V4 for harder text reasoning.
- Context
- 1M
- Reasoning
- On, can turn off
- Input
- Text
- ₹ per 1M in / out
- ₹115 / ₹350
Always-on reasoning with image and video input.
- Context
- 1M
- Reasoning
- On, can't turn off
- Input
- TextImageVideo
- ₹ per 1M in / out
- ₹270 / ₹1,350
Lowest-cost reasoning across text, image, audio, and video.
- Context
- 1M
- Reasoning
- On, can turn off
- Input
- TextImageAudioVideo
- ₹ per 1M in / out
- ₹12.5 / ₹25
Larger MiMo V2.6 for harder multimodal tasks.
- Context
- 1M
- Reasoning
- On, can turn off
- Input
- TextImageAudioVideo
- ₹ per 1M in / out
- ₹40 / ₹80
Prices are in ₹ per 1M tokens; reasoning is billed as output. See Pricing. Each model’s reasoning default, and how to turn it off, is under Reasoning.
Every model supports tool calling, streaming, and structured output (response_format).
Support for log probabilities, multiple choices (n > 1), and other parameters varies by
model — see each model’s own Supported Parameters table, or
V2 feature support
for the full matrix.
All models as a table
- Coding and agents:
glm5.3, the strongest reasoning - Lowest cost:
mimo-v2.6-flash, the lowest per-token price - Fastest answers, with image input:
gemma4, which skips reasoning by default - Reasoning on images:
glm5.3-flashorkimi-k3
Quickstart
Already use the OpenAI SDK? Point base_url at https://api.sarvam.ai/v2 and pass your
Sarvam key as api_key. The endpoint also accepts Authorization: Bearer <key>. Native
Sarvam clients use the api-subscription-key header. See Authentication.
Common patterns
Streaming
Reasoning
Tool calling
Images (Gemma)
Set stream=True to receive server-sent events. Reasoning models stream
reasoning_content deltas first, then the final content.
Reasoning
Most models think before answering; Gemma 4 does only when you set an effort. Defaults, and whether thinking can be turned off, differ by model:
Send thinking and chat_template_kwargs through extra_body in the SDKs. Accepted effort values
are listed on each model page.
On the Responses API, do not send the string "max" to glm5.3 or glm5.3-flash. It returns 400.
Omit reasoning.effort instead: that gives max on glm5.3 and high on glm5.3-flash.
Reasoning tokens count toward max_tokens and are billed as output. If you see empty
content with finish_reason: "length", the model spent the whole budget thinking. Raise
max_tokens or lower the effort. On glm5.3, max_tokens defaults to 2048.
Troubleshooting
Production tips
Retry on 429 and 503
Rate limits and temporary overload are retryable. The OpenAI SDK retries these automatically
with backoff when you raise max_retries:
Budget tokens for reasoning
Set max_tokens well above your expected answer length, at least a few thousand for
high or max effort, because thinking tokens share the same budget.
Match effort to the task
Use low for extraction, classification and chat. Reserve high and max for math,
debugging and multi-step planning, where extra thinking improves quality at higher latency and cost.
Switch models without code changes
Read the model ID from configuration, for example model=os.environ.get("SARVAM_MODEL", "glm5.3"),
so you can compare models on your own prompts. Only change parameters the target model supports,
see the comparison table above.
Platform details
Endpoints and model discovery
- Chat:
POST https://api.sarvam.ai/v2/chat/completions, see the API reference. - Responses:
POST https://api.sarvam.ai/v2/responses, see the API reference. - Models:
GET /v2/modelslists the models enabled for your key. Beta models appear only for keys that have beta access.
Billing and rate limits
Usage is metered per token against your Sarvam credits, see Pricing. Reasoning is billed as output. Limits apply per API key, see Credits & Rate Limits.
Beta models
DeepSeek V4.1 Flash 1017, DeepSeek V4 Pro, Kimi K3, MiMo V2.6 Flash, and MiMo V2.6 Pro are in beta. See Beta models.