API Reference

Overview & Base URLs

Complete HTTP endpoint reference. No SDK required — all endpoints accept multipart/form-data or JSON.


All endpoints

The Shunyalabs ASR API is hosted at https://asr.shunyalabs.ai. All REST endpoints use HTTPS; the streaming endpoint uses WSS.

EndpointURL
Batch TranscriptionPOST https://asr.shunyalabs.ai/v1/audio/transcriptions
Streaming (WebSocket)wss://asr.shunyalabs.ai/ws
Health CheckGET https://asr.shunyalabs.ai/health
Supported LanguagesGET https://asr.shunyalabs.ai/languages
Register SpeakerPOST https://asr.shunyalabs.ai/v1/speakers/register
List SpeakersGET https://asr.shunyalabs.ai/v1/speakers/list
Identify SpeakerPOST https://asr.shunyalabs.ai/v1/speakers/identify
Delete SpeakerDELETE https://asr.shunyalabs.ai/v1/speakers/delete

Authentication

All endpoints except /health require a Bearer token in the Authorization header:

http
Authorization: Bearer <API_KEY>
Environment variable:
Set SHUNYALABS_API_KEY in your environment. The Python SDK reads it automatically — no need to pass api_key= explicitly.

Versioning

The current API version is v1, reflected in the path prefix /v1/. Breaking changes will be introduced under a new version prefix (e.g. /v2/) with advance notice. Current endpoints will remain supported during any transition period.


Request formats

Endpoint typeContent-TypeBody format
Batch transcription — file uploadmultipart/form-dataForm fields: model, file, language_code, etc.
Batch transcription — URL inputapplication/jsonJSON body: {"model": "zero-indic", "url": "..."}
Streaming WebSocketBinary framesRaw PCM audio after initial JSON handshake
Speaker APIsmultipart/form-dataForm fields: name, file, project

All responses are JSON with Content-Type: application/json.


Common response shape

Successful responses always include "success": true. Error responses use standard HTTP status codes with a JSON body:

json
{
  "success": false,
  "error": {
    "code": "authentication_error",
    "message": "Missing or invalid API key."
  }
}