skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
sarvamai/skills136 installs

translate

Write correct Sarvam translation code (sarvam-translate:v1, mayura:v1) — mode/script/numeral options and silent parameter failures. Use this skill when building translation or localization features in Python or JS/TS. For live translate/localize in chat via MCP, use sarvam-mcp instead.

How do I install this agent skill?

npx skills add https://github.com/sarvamai/skills --skill translate
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    This skill provides documentation and code examples for using Sarvam AI's translation SDKs. It is a benign educational resource with no security risks detected.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

  • Runlayerpass

    1/2 files flagged

What does this agent skill do?

Translation — Sarvam AI

Live in-chat translate/localize → sarvam-mcp (sarvam_tools_translate / _localize). This skill = SDK code.

[!IMPORTANT] Auth: api-subscription-key header — NOT Authorization: Bearer. Base URL: https://api.sarvam.ai (NOT /v1 — that prefix is only for the OpenAI-compatible chat endpoint)

Models

ModelMax InputLanguagesFeatures
sarvam-translate:v12,000 chars23 (22 Indian + English)mode (formal only), speaker_gender, numerals_format
mayura:v11,000 chars11 (10 Indian + English)All mode values, output_script, speaker_gender, numerals_format, auto source detection

Quick Start (Python)

from sarvamai import SarvamAI
client = SarvamAI()

response = client.text.translate(
    input="Hello, how are you?",
    source_language_code="en-IN",
    target_language_code="hi-IN",
    model="sarvam-translate:v1"
)
print(response.translated_text)

Quick Start (JavaScript/TypeScript)

import { SarvamAIClient } from "sarvamai";

const client = new SarvamAIClient({ apiSubscriptionKey: "YOUR_SARVAM_API_KEY" });

const response = await client.text.translate({
    input: "Hello, how are you?",
    source_language_code: "en-IN",
    target_language_code: "hi-IN",
    model: "sarvam-translate:v1"
});
console.log(response.translated_text);

Gotchas

GotchaDetail
Method nameBoth Python & JS: client.text.translate({...}) — NOT client.translate.translate(). Same text namespace in both SDKs.
output_script on sarvam-translateNOT supported — only works with mayura:v1 (roman, fully-native, spoken-form-in-native). Silently ignored on sarvam-translate:v1.
mode valuessarvam-translate:v1 supports formal only. Colloquial modes (modern-colloquial, classic-colloquial, code-mixed) are mayura:v1 only. speaker_gender works on BOTH models.
Auto language detectionsource_language_code="auto" only works with mayura:v1. sarvam-translate:v1 requires an explicit source language.
Odia language codeod-IN — NOT or-IN.
Character limitsExceeding returns 422. Split long text at sentence boundaries.

Full Docs

Fetch language codes, mode examples, script options, and numeral formats from:

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/sarvamai/skills/translate">View translate on skillZs</a>