Skip to content
PluginStats

sarvam-ai-sdk weekly downloads statistics

By sarvamai · npm · AI SDKs

Sarvam provider support for Vercel's AI-SDK

View on npm Fresh · Oct 18, 2026

sarvam-ai-sdk has 984 recorded weekly downloads on npm, an increase of 92.2% over the past 30 days, ranking #1450 of 2,322 tracked listings.

Weekly downloads
984
Official API · Oct 18, 2026
7-day growth
-49.4%
-962 weekly downloads
30-day growth
+92.2%
+472 weekly downloads
90-day growth
+441%
+802 weekly downloads
Rank
#1450
Among tracked npm listings

About sarvam-ai-sdk

<a href="https://github.com/sarvamai/sarvam-ai-sdk"> <img alt="cover" src="https://github.com/sarvamai/sarvam-ai-sdk/blob/master/cover.png?raw=true" /> </a>

AI SDK - Sarvam Provider

The Sarvam provider for the AI SDK contains language model support for the Sarvam chat completion, Text-to-Speech and Speech-to-Text APIs.

Setup

The Sarvam provider is available in the sarvam-ai-sdk module. You can install it with

npm i sarvam-ai-sdk ai@7

[!WARNING] This package only works with Vercel AI-SDK v7, not v8. Make sure to install ai@7 in your project.

Version Compatibility
Sarvam AI SDK VersionVercel AI SDK Version
0.5.x (beta)8.x.x (beta)
0.4.x (current)7.x.x (current)
0.3.x6.x.x
0.2.x5.x.x
0.1.x4.x.x

Provider Instance

You can import the default provider instance sarvam from sarvam-ai-sdk:

import { sarvam } from "sarvam-ai-sdk";

Create .env file with API key from Sarvam Dashboard

SARVAM_API_KEY="your_api_key"

Example

import { sarvam } from "sarvam-ai-sdk";
import { generateText } from "ai";

const { text } = await generateText({
	model: sarvam("sarvam-105b", {
		reasoning_effort: "low",
	}),
	prompt: "Translate this to malayalam: 'Keep cooking, guys'",
});

console.log(text); // പാചകം തുടരൂ, സുഹൃത്തുക്കളേ

Text-to-Speech

import { sarvam } from "sarvam-ai-sdk";
import { generateSpeech } from "ai";
import { writeFile } from "fs/promises";

const { audio } = await generateSpeech({
	model: sarvam.speech("bulbul:v3", "ml-IN"),
	text: "പാചകം തുടരൂ, സുഹൃത്തുക്കളേ",
});

const audioBuffer = Buffer.from(audio.base64, "base64");
await writeFile("./src/transcript-test.wav", audioBuffer);

Speech-to-Text

import { sarvam } from "sarvam-ai-sdk";
import { transcribe } from "ai";
import { readFile } from "fs/promises";

const { text } = await transcribe({
	model: sarvam.transcription("saaras:v4", "en-IN"),
	audio: await readFile("./src/transcript-test.wav"),
});

console.log(text); // Pachakam thudaroo, suhruthukkale.

Translation

NB: Only translates prompt and role:user messages, not role:system not role:assistant.

import { sarvam } from "sarvam-ai-sdk";
import { generateText } from "ai";

const result = await generateText({
	model: sarvam.translation("mayura:v1", {
		from: "ml-IN",
		to: "en-IN",
	}),
	prompt: "ഇതൊക്കെ ശ്രദ്ധിക്കണ്ടേ അംബാനെ?",
});

console.log(result.text); // Shouldn't we be careful about this, Ambane?

Transliterate

NB: Only transliterates prompt and role:user messages, not role:system not role:assistant.

import { sarvam } from "sarvam-ai-sdk";
import { generateText } from "ai";

const result = await generateText({
	model: sarvam.transliterate({
		to: "ml-IN",
		from: "en-IN", // optional
	}),
	prompt: "eda mone, happy alle?",
});

console.log(result.text); // എടാ മോനെ, ഹാപ്പി അല്ലേ?

Language Identification

NB: Only identifies prompt and role:user messages, not role:system not role:assistant.

import { sarvam } from "sarvam-ai-sdk";
import { generateText } from "ai";

const result = await generateText({
	model: sarvam.languageIdentification(),
	prompt: "ബുദ്ധിയാണ് സാറേ ഇവൻ്റെ മെയിൻ",
});

console.log(result.text); // ml-IN

Tool Calling

import { z } from "zod";
import { generateText, tool } from "ai";
import { sarvam } from "sarvam-ai-sdk";

const result = await generateText({
	model: sarvam("sarvam-105b"),
	tools: {
		weather: tool({
			description: "Get the weather in a location",
			inputSchema: z.object({
				location: z.string(),
			}),
			execute: async ({ location }) => ({
				location,
				temperature: 72 + Math.floor(Math.random() * 21) - 10,
			}),
		}),
	},
	instructions: "Your are a helpful AI",
	prompt: "കൊച്ചിയിലെ കാലാവസ്ഥ എന്താണ്?",
});

console.log(result.toolResults);

Generating Structured Outputs

import { z } from "zod";
import { sarvam } from "sarvam-ai-sdk";
import { generateText, Output } from "ai";

const { output } = await generateText({
	model: sarvam("sarvam-105b", {
		experimental_json_mode: true, // to enable direct JSON mode
		reasoning_effort: "none", // to reduce inference time
	}),
	output: Output.object({
		name: "Recipe",
		description: "A recipe with a name, ingredients and steps",
		schema: z.object({
			recipe: z.object({
				name: z.string(),
				ingredients: z.array(z.string()),
				steps: z.array(z.string()),
			}),
		}),
	}),
	prompt: "Generate a South Indian recipe, in Malayalam",
});

console.log(output);

EVE Agents

Build durable agents with Vercel's Eve Framework.

import { simulateStreamingMiddleware, wrapLanguageModel } from "ai";
import { defineAgent } from "eve";
import { sarvam } from "sarvam-ai-sdk";
import { SarvamChatModelInfo } from "sarvam-ai-sdk/info";

const model = wrapLanguageModel({
	model: sarvam("sarvam-105b"),
	middleware: simulateStreamingMiddleware(),
});

export default defineAgent({
	model,
	modelContextWindowTokens: SarvamChatModelInfo["sarvam-105b"].context_window,
});

All APIs

import { sarvam, createSarvam } from "sarvam-ai-sdk";

// Override `SARVAM_API_KEY` using
createSarvam({ apiKey: "your_api_key" })

// Text-to-Text + Chat Completion
sarvam("sarvam-105b-conversations");
sarvam.languageModel("sarvam-105b", {
	version: "v2",
});

// Text-to-Text + Transliteration
sarvam.transliterate({ to: "ml-IN", from: "en-IN" });

// Text-to-Text + Translation
sarvam.translation("mayura:v1", { from: "en-IN", to: "ml-IN" });

// Text-to-Text + Language identification
sarvam.languageIdentification();…

Description from the npm listing.

  • ai
  • ai-sdk
  • eve
  • vercel
  • sarvam
  • india
  • bharat

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

sarvam-ai-sdk weekly downloads on npm, last 90 days: 984 weekly downloads as of Oct 18, 2026, +441% over 90 days.sarvam-ai-sdkWeekly downloads on npm · Last 90 days984downloads / week+441% over 90 days010K20K30K40K50K60KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
sarvam-ai-sdk weekly downloads on npm, last 90 days: 984 weekly downloads as of Oct 18, 2026, +441% over 90 days.

7/30/90-day growth

sarvam-ai-sdk weekly downloads growth on npm: -49.4% over 7 days, +92.2% over 30 days, +441% over 90 days.sarvam-ai-sdkWeekly downloads growth on npm984downloads / week now7-day growth-962 weekly downloads-49.4%30-day growth+472 weekly downloads+92.2%90-day growth+802 weekly downloads+441%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
sarvam-ai-sdk weekly downloads growth on npm: -49.4% over 7 days, +92.2% over 30 days, +441% over 90 days.

Ranking history

sarvam-ai-sdk npm ranking history: currently #1450 (by weekly downloads).sarvam-ai-sdknpm ranking · by weekly downloads · Last 90 days#1450current rank#400#600#800#1000#1200#1400#1600Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 17, 2026 – Oct 20, 2026 · 4 observations · Updated Oct 18, 2026pluginstats.com
sarvam-ai-sdk npm ranking history: currently #1450 (by weekly downloads).

Listing placement

All npm2,320 listings · 116 pages · 1,161 shown · page 73, #13 (overall #1,453)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs259 listings · 13 pages · page 7, #19 (overall #139)
AI SDKs: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (544)
Recent weekly downloads observations for sarvam-ai-sdk
Date (UTC)Weekly downloadsChange vs. previous
984+252
732-223
955-65
1,020-506
1,526-348
1,8740
1,874-72
1,946-51
1,997+69
1,928+193
1,735-2.3K
4,058-11.3K
15,397-12.8K
28,149—

Similar npm AI SDKs plugins

All 20 sarvam-ai-sdk alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/sarvam-ai-sdk. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.