Skip to navigation

Open-Weight Models

View as Markdown

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.

Sarvam 105B, Sarvam 105B Conversations, Sarvam Prism, GLM-5.3, GLM-5.3 Flash, Gemma 4 31B, and DeepSeek V4.1 Flash 1017 are serverless: any API key can call them. DeepSeek V4 Pro, Kimi K3.1 Pro, Qwen 3.8 27B, Clef, and EmbeddingGemma 2 are on Provisioned Throughput and are enabled per organisation.

For classification, routing, or scoring, use Sarvam Prism, or Clef for questions about images, on the Decisions API. They return a calibrated probability for every option instead of generated text. For search and retrieval, EmbeddingGemma 2 returns text embeddings on POST /v2/embeddings.

Choose a model

Pick a use case, or filter by status and input type. Click a model ID to copy it.

I need
Accepts

Showing 12 of 12 models

Introductory pricing
Sarvam 105B Serverless

Sarvam's flagship for Indian-language reasoning, coding, and agents.

Context
128K
Reasoning
On (low), can turn off
Input
Text
₹ per 1M in / out
₹10 / ₹25
Introductory pricing
Sarvam 105B Conversations Serverless

Tuned for real-time dialogue and voice agents in Indian languages.

Context
32K
Reasoning
No
Input
Text
₹ per 1M in / out
₹10 / ₹25
Sarvam Prism Serverless

Calibrated yes/no, choice, and score answers instead of generated text.

Context
32K
Reasoning
No
Input
Text
₹ per 1M in / out
₹4 / ₹0
GLM-5.3 Serverless

Software engineering and long-horizon agents.

Context
1M
Reasoning
On, can't turn off
Input
Text
₹ per 1M in / out
₹126 / ₹390
GLM-5.3 Flash Serverless

Faster GLM-5.3 with image input.

Context
1M
Reasoning
On, can't turn off
Input
TextImage
₹ per 1M in / out
₹13.5 / ₹45
Gemma 4 31B Serverless

Fast direct answers and image understanding.

Context
256K
Reasoning
Off by default
Input
TextImage
₹ per 1M in / out
₹35 / ₹90
Introductory pricing
DeepSeek V4.1 Flash 1017 Serverless

Low-cost reasoning for long documents and agents.

Context
1M
Reasoning
On, can turn off
Input
TextImage
₹ per 1M in / out
₹14 / ₹55
DeepSeek V4 Pro Provisioned

Larger DeepSeek V4 for harder text reasoning.

Context
1M
Reasoning
On, can turn off
Input
Text
₹ per 1M in / out
₹115 / ₹350
Kimi K3.1 Pro Provisioned

Always-on reasoning with image and video input.

Context
1M
Reasoning
On, can't turn off
Input
TextImageVideo
₹ per 1M in / out
₹200 / ₹950
Qwen 3.8 27B Provisioned

Mid-size reasoning model with image input and tool calling.

Context
256K
Reasoning
On, can turn off
Input
TextImage
₹ per 1M in / out
₹18 / ₹230
Clef Provisioned

Calibrated yes/no, choice, and score answers about text and images.

Context
64K
Reasoning
No
Input
TextImage
₹ per 1M in / out
₹20 / ₹0
EmbeddingGemma 2 Provisioned

768-dimension text embeddings for search, retrieval, and clustering.

Context
8K
Reasoning
No
Input
Text
₹ per 1M in / out
₹2 / ₹0

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 chat model supports tool calling, streaming, and structured output (response_format). Every model returns one completion per request: n > 1 returns 400. Support for log probabilities and other parameters varies by model — see each model’s own Supported Parameters table, or V2 feature support for the full matrix.

ModelContextInput₹ per 1M in / out
Sarvam 105B
sarvam-105b
128KText10 / 25 (introductory)
Sarvam 105B Conversations
sarvam-105b-conversations
32KText10 / 25 (introductory)
GLM-5.3
glm5.3
1MText126 / 390
GLM-5.3 Flash
glm5.3-flash
1MText, image13.5 / 45
Gemma 4 31B
gemma4
256KText, image35 / 90
DeepSeek V4.1 Flash 1017
deepseekv4.1-flash-1017
1MText, image14 / 55 (introductory)
DeepSeek V4 Pro (Provisioned Throughput)
deepseekv4-pro
1MText115 / 350
Kimi K3.1 Pro (Provisioned Throughput)
kimi-k3.1-pro
1MText, image, video200 / 950
Qwen 3.8 27B (Provisioned Throughput)
qwen38-27b
256KText, image18 / 230
Clef (Provisioned Throughput, Decisions API)
clef
64KText, image20 / —
EmbeddingGemma 2 (Provisioned Throughput, embeddings)
embeddinggemma-2
8KText2 / —

Introductory pricing on sarvam-105b, sarvam-105b-conversations, and deepseekv4.1-flash-1017 runs through the end of 2026.

  • Indian languages: sarvam-105b, or sarvam-105b-conversations for voice agents
  • Coding and agents: glm5.3, the strongest reasoning
  • Lowest cost: glm5.3-flash, the lowest per-token price for open-weight chat
  • Fastest answers, with image input: gemma4, which skips reasoning by default
  • Reasoning on images: glm5.3-flash or kimi-k3.1-pro

Provisioned Throughput

Token Factory models are offered in two ways:

  • Serverless: any Sarvam API key can call the model, billed per token. Sarvam 105B, Sarvam 105B Conversations, Sarvam Prism, GLM-5.3, GLM-5.3 Flash, Gemma 4 31B, and DeepSeek V4.1 Flash 1017 (including its high-throughput interactive variant) are serverless.
  • Provisioned Throughput: capacity for the model is set up for your workload and enabled for your organisation, so every API key in it can call the model.

These models are on Provisioned Throughput:

ModelAPIPricing
DeepSeek V4 ProChat Completion V2 and ResponsesPer token, on Pricing
Kimi K3.1 ProChat Completion V2 and ResponsesPer token, on Pricing
Qwen 3.8 27BChat Completion V2 and ResponsesPer token, on Pricing
ClefDecisions APIPer input token, on Pricing
EmbeddingGemma 2POST /v2/embeddingsPer input token, on Pricing

To get access, contact us with the model you need and your expected volume. Without access:

  • DeepSeek V4 Pro returns 400 invalid_request_error: “This model runs on Provisioned Throughput and is not enabled for your organisation”. It is listed in GET /v2/models for every key.
  • The other Provisioned Throughput models return 404 not_found_error, the same as an unknown model, and aren’t listed in GET /v2/models until access is enabled.

In GET /v2/models, each model has an access field: "provisioned" for Provisioned Throughput models and "standard" for serverless ones.

Quickstart

1

Get an API key

Create an API key in the dashboard.

2

Set your key

export SARVAM_API_KEY="your-api-key"
3

Make your first call

Open-weight models are served on POST /v2/chat/completions. Pick your SDK:

import os
from sarvamai import SarvamAI
client = SarvamAI(api_subscription_key=os.environ["SARVAM_API_KEY"])
response = client.chat.completions_v2(
model="glm5.3", # or "gemma4", "deepseekv4.1-flash-1017", "kimi-k3.1-pro", ...
messages=[
{"role": "user", "content": "Summarise the causes of the 2008 financial crisis."}
],
max_tokens=4000,
)
print(response.choices[0].message.content)

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

Set stream=True to receive server-sent events. Reasoning models stream reasoning_content deltas first, then the final content.

stream = client.chat.completions.create(
model="glm5.3",
messages=[{"role": "user", "content": "What is 17 * 23?"}],
reasoning_effort="low",
max_tokens=1000,
stream=True,
)
for chunk in stream:
if not chunk.choices:
continue
delta = chunk.choices[0].delta
if getattr(delta, "reasoning_content", None):
print(delta.reasoning_content, end="", flush=True) # thinking
if delta.content:
print(delta.content, end="", flush=True) # answer

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:

ModelDefault effortTurn thinking off
sarvam-105blowreasoning_effort: "none"
sarvam-105b-conversationsOff; a reasoning_effort level is accepted but ignoredAlways off
glm5.3maxNot supported
glm5.3-flashhighNot supported
gemma4Off; turn it on with reasoning_effort (low or high on Responses)Off by default
deepseekv4.1-flash-1017highreasoning_effort: "none"
deepseekv4-prohighreasoning_effort: "none" or thinking: {"type": "disabled"}
kimi-k3.1-promaxNot supported; thinking is always on
qwen38-27bOnreasoning_effort: "none" or chat_template_kwargs: {"enable_thinking": false}

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

SymptomLikely causeFix
403 invalid_api_key_errorMissing or wrong key headerCheck api-subscription-key or the Bearer token
404 not_found_errorUnknown or wrongly cased model IDIDs are case-sensitive. List the served model IDs with GET /v2/models
400 “…not enabled for your organisation” on deepseekv4-pro, or 404 on another Provisioned Throughput modelYour organisation doesn’t have Provisioned Throughput access for this modelContact us to request access
Empty content, finish_reason: "length"Reasoning used the token budgetRaise max_tokens or lower reasoning_effort
400 invalid_request_error on a specific parameterParameter unsupported by this modelCheck the model’s own Supported Parameters table
402 insufficient_quota_errorNo credits leftAdd credits in the dashboard
429 rate_limit_exceeded_error / model_rate_limit_exceeded_error, or 503 model_overloadedRate limit, model capacity, or overloadRetry with exponential backoff

Production tips

Rate limits and temporary overload are retryable. The OpenAI SDK retries these automatically with backoff when you raise max_retries:

client = OpenAI(
base_url="https://api.sarvam.ai/v2",
api_key=os.environ["SARVAM_API_KEY"],
max_retries=4,
timeout=120, # reasoning at high effort can take a while
)

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.

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.

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

  • 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/models lists the served models, including Provisioned Throughput models your organisation may not have access to yet.

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.

Next steps