Shunya Labs DocsShunya Labs Docs
🌐 International
🇺🇸 English
🇯🇵 Japanese
🇨🇳 Chinese (Simplified)
🇹🇼 Chinese (Traditional)
🇸🇦 Arabic
🇩🇪 German
🇫🇷 French
🇪🇸 Spanish
🇧🇷 Portuguese
🇷🇺 Russian
🇰🇷 Korean
🇹🇷 Turkish
🇻🇳 Vietnamese
🇮🇩 Indonesian
🇮🇳 Hindi Belt
हिन्दी — Hindi
भोजपुरी — Bhojpuri
मैथिली — Maithili
राजस्थानी — Rajasthani
🇮🇳 South India
தமிழ் — Tamil
తెలుగు — Telugu
ಕನ್ನಡ — Kannada
മലയാളം — Malayalam
🇮🇳 West India
मराठी — Marathi
ગુજરાતી — Gujarati
कोंकणी — Konkani
🇮🇳 East India
বাংলা — Bengali
ଓଡ଼ିଆ — Odia
অসমীয়া — Assamese
🇮🇳 North-East India
মেইতেই — Meitei
नेपाली — Nepali
🇮🇳 North India
ਪੰਜਾਬੀ — Punjabi
اردو — Urdu
کٲشُر — Kashmiri
डोगरी — Dogri
سنڌي — Sindhi

ASR configuration

Every parameter you can pass to POST /v1/audio/transcriptions, in one place. Two are required (file or url, and model); the rest have safe defaults.

First: get an access token

The examples below send Authorization: Bearer $ACCESS_TOKEN. The speech APIs accept only a short-lived access token — never your API key directly.

From the console (recommended). Open the console, click Generate token next to your API key, and copy it — then set it:

export ACCESS_TOKEN="eyJhbGciOiJSUzI1NiIs…paste-here"

Or mint it from your API key — the path for production, where your app refreshes the token as it nears expiry (the response carries expires_in):

export ACCESS_TOKEN=$(curl -s -X POST https://app.shunyalabs.ai/api/auth/token \
  -H "api-key: $SHUNYALABS_API_KEY" | jq -r .token)

Required

FieldTypeDescription
filefile uploadAudio file (WAV, MP3, M4A, OGG, FLAC, WebM). One of file or url required.
urlstringPublic audio URL. Can't be combined with file.
modelstringOne of zero-indic, zero-universal, zero-med, zero-codeswitch.

Language & output

ParameterType, defaultDescription
language_codestring, "auto"Language hint. Prefer an ISO 639-1 code (hi, ta, kn, bn, mr, te, gu, pa, ml, or, ur, en) — the canonical form. Full English names (Hindi, Tamil) are also accepted and mapped to the code, and matching is case-insensitive (hi, HI, Hindi are equivalent). Use auto to detect. The codes above are the primary Indic set — ASR serves 204 languages in total (the Indic tier plus Japanese/Korean and global languages); call GET /languages for the routable set with codes and scripts.
response_formatstring, "verbose_json"verbose_json for full response (segments, NLP, timing, language). json for minimal {"text": "..."}: OpenAI-compatible.
output_scriptstring, "auto"Transliterate to a different script without changing language. Devanagari, Bengali, Telugu, Tamil, Kannada, Latin, ITRANS. Powered by aksharamukha, no LLM, no latency cost.
translationseparate endpointNot a transcription parameter. Transcribe, then POST the transcript text to POST /v1/translate with target_language (it returns { "translation": "..." }). For a script change only, use output_script.
Why setting language_code matters
On clips < 5 seconds, language detection is error-prone and the model can "translate" instead of transcribe. Locking the language avoids both.

Example: transcribe Hindi audio and romanise the script to Latin:

curl -X POST https://asrv2prod.shunyalabs.ai/v1/audio/transcriptions \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -F "file=@hindi-call.wav" \
  -F "model=zero-indic" \
  -F "language_code=hi" \
  -F "output_script=Latin"

Returns: "namaste mohammad ji ye ek zaruri call hai" (Hindi pronunciation, written in Latin letters).

Segmentation & alignment

ParameterType, defaultDescription
response_format=verbose_jsonbool, falseAdds per-word start, end, and score to every segment. Uses CTC forced alignment on an ONNX model, runs on GPU, no external call.
enable_diarizationbool, falseSpeaker-level segmentation. Every segment gets a speaker: SPEAKER_XX label; the top-level transcript is prefixed with speaker tags; speakers array lists all unique speakers detected. Segments are capped at 30 s each for quality.
speaker_id + projectbool, falseResolves anonymous SPEAKER_XX labels to registered names. Requires enable_diarization=true and pre-registered voice profiles. project scopes the speaker library, useful for per-customer isolation. Speaker registration API →
emotionbool, falseDetects the dominant emotion in each segment and adds an emotion field. Works alongside standard diarization.

Intelligence layer

ParameterType, defaultDescription
enable_intent_detection + intent_choicesbool, falseClassifies the overall transcript intent. Optionally constrain to a list of allowed intents with intent_choices (JSON array). Result in nlp_analysis.intent: label, confidence, reasoning.
enable_summarization + summary_max_lengthbool, falseGenerates a concise transcript summary. summary_max_length is an approximate word count (default 150). Result in nlp_analysis.summary.
enable_sentiment_analysisbool, falseReturns nlp_analysis.sentiment with a label (positive/negative/neutral), a numeric score, and a short explanation.
enable_keyterm_normalization + keyterm_keywordsbool, falseNormalises domain-specific terms the ASR model might render informally. Optionally focus on specific terms with keyterm_keywords (JSON array). Output preserves the original language. The corrected terms appear in the transcript itself.

Example: classify the call into one of four intents:

curl -X POST https://asrv2prod.shunyalabs.ai/v1/audio/transcriptions \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -F "file=@call.wav" \
  -F "model=zero-indic" \
  -F "enable_intent_detection=true" \
  -F 'intent_choices=["complaint","inquiry","service_request","compliment"]'

Redaction

ParameterType, defaultDescription
enable_profanity_hashingbool, falseReplaces profane words with **** in-place in both segments[].text and the top-level text. Uses a language model for detection.
hash_keywordsJSON array, noneMasks a specific list of words/phrases using regex (case-insensitive, no LLM). Independent of profanity hashing. Use for account numbers, card numbers, OTP, and any custom sensitive terms.

Example: mask account numbers, card numbers, and OTPs in the transcript:

curl -X POST https://asrv2prod.shunyalabs.ai/v1/audio/transcriptions \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -F "file=@call.wav" \
  -F "model=zero-indic" \
  -F 'hash_keywords=["account number","card number","OTP"]'

Legacy / compatibility

ParameterType, defaultDescription
taskstring, "transcribe"OpenAI-compatible field. Only "transcribe" is supported today.

Putting it all together

curl -X POST https://asrv2prod.shunyalabs.ai/v1/audio/transcriptions \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -F "file=@call.wav" \
  -F "model=zero-indic" \
  -F "language_code=hi" \
  -F "enable_diarization=true" \
  -F "enable_speaker_identification=true" \
  -F "project=support_team" \
  -F "enable_emotion_diarization=true" \
  -F "enable_intent_detection=true" \
  -F 'intent_choices=["complaint","inquiry","service_request"]' \
  -F "enable_summarization=true" \
  -F "enable_sentiment_analysis=true"
A sane default set
For a contact-centre transcription with agent-assist, start with: model=zero-indic, enable_diarization=true, enable_intent_detection=true, enable_sentiment_analysis=true. Add response_format=verbose_json if you need precise search.
ASR configuration | Shunya Labs Docs