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.
| Endpoint | URL |
|---|---|
| Batch Transcription | POST https://asr.shunyalabs.ai/v1/audio/transcriptions |
| Streaming (WebSocket) | wss://asr.shunyalabs.ai/ws |
| Health Check | GET https://asr.shunyalabs.ai/health |
| Supported Languages | GET https://asr.shunyalabs.ai/languages |
| Register Speaker | POST https://asr.shunyalabs.ai/v1/speakers/register |
| List Speakers | GET https://asr.shunyalabs.ai/v1/speakers/list |
| Identify Speaker | POST https://asr.shunyalabs.ai/v1/speakers/identify |
| Delete Speaker | DELETE 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 type | Content-Type | Body format |
|---|---|---|
| Batch transcription — file upload | multipart/form-data | Form fields: model, file, language_code, etc. |
| Batch transcription — URL input | application/json | JSON body: {"model": "zero-indic", "url": "..."} |
| Streaming WebSocket | Binary frames | Raw PCM audio after initial JSON handshake |
| Speaker APIs | multipart/form-data | Form 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."
}
}