An open API service indexing awesome lists of open source software.

https://github.com/codewithsushil/sarvam.ai

Sarvam.AI for India AI ecosystem.
https://github.com/codewithsushil/sarvam.ai

ai api curl javascript python sarvam sarvamai typescript

Last synced: 6 months ago
JSON representation

Sarvam.AI for India AI ecosystem.

Awesome Lists containing this project

README

          

# ๐Ÿ‡ฎ๐Ÿ‡ณ Sarvam AI: Indiaโ€™s Indigenous LLM Platform for Multilingual Intelligence

India has taken a significant leap in the AI domain with the launch of **Sarvam AI**, a homegrown platform offering cutting-edge large language model (LLM) capabilities tailored for Indian languages and use cases. Sarvam AI stands out not only for its LLM capabilities but also for its comprehensive suite of multilingual and multimodal tools, designed to bridge the language divide across digital India.

---

## โœจ Key Features of Sarvam AI

Sarvam AI offers a wide range of AI-powered capabilities, making it a versatile platform for developers, enterprises, and public services:

- **๐Ÿง  Large Language Model (LLM)**
A robust model optimized for Indian linguistic contexts, capable of understanding, generating, and reasoning in multiple Indic languages.

- **๐Ÿ—ฃ๏ธ Text-to-Speech (TTS)**
Converts text into natural-sounding speech in various Indian languages for voice interfaces and accessibility.

- **๐ŸŽ™๏ธ Speech-to-Text (STT)**
Accurately transcribes audio into text, handling diverse accents and dialects.

- **๐Ÿ”„ Speech Translation (ST)**
Real-time translation of spoken languageโ€”ideal for conversations, learning, and customer support.

- **๐ŸŒ Text Translation**
Seamlessly translate between English and Indian languages to support content localization.

- **โœ๏ธ Transliteration**
Convert text between scripts (e.g., Roman โ†”๏ธ Devanagari) for regional communication.

- **๐Ÿ—ƒ๏ธ Indic Language Support**
Deep support for major Indian languages like Hindi, Tamil, Telugu, Bengali, Kannada, Malayalam, Marathi, Gujarati, and more.

---

## โš™๏ธ Developer-Friendly API Access

Sarvam AI provides flexible and easy-to-use APIs with support for multiple programming environments:

- **๐Ÿ Python** โ€“ Perfect for backend, data science, and ML applications.
- **๐ŸŸจ JavaScript/TypeScript** โ€“ Great for web, frontend, and Node.js projects.
- **๐ŸŒ€ cURL** โ€“ Simple command-line integration for quick tests and automation.

---

## โœ… Conclusion

Sarvam AI is a transformative step forward in Indiaโ€™s AI journey. By focusing on multilingual intelligence and developer-friendly APIs, it enables the creation of inclusive, accessible, and intelligent applications for a diverse user base.

> **Built in India, for India โ€“ powering the next billion users.**
> ๐Ÿ‡ฎ๐Ÿ‡ณ **Sarvam AI** is shaping the future of AI with Indic excellence.

---
### cURL
```bash
curl -X POST https://api.sarvam.ai/v1/chat/completions \
-H "Authorization: Authorization" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"role": "system",
"content": "content"
}
],
"model": "sarvam-m"
}'
```
### JavaScript/TypeScript
```ts
// Chat Completions (POST /v1/chat/completions)
const response = await fetch("https://api.sarvam.ai/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Authorization",
"Content-Type": "application/json"
},
body: JSON.stringify({
"messages": [
{
"role": "assistant"
}
],
"model": "sarvam-m"
}),
});

const body = await response.json();
console.log(body);
```

### Python
```py
import requests

# Chat Completions (POST /v1/chat/completions)
response = requests.post(
"https://api.sarvam.ai/v1/chat/completions",
headers={
"Authorization": "Authorization"
},
json={
"messages": [
{
"role": "system",
"content": "content"
}
],
"model": "sarvam-m"
},
)

print(response.json())
```