API Reference
API Reference
Complete HTTP endpoint reference for the ShunyaLabs platform. All endpoints accept multipart/form-data or JSON and use Bearer token authentication.
Choose a product
Speech to Text API
Batch transcription via HTTP POST, real-time streaming via WebSocket, speaker APIs, and health check endpoints.
POST /v1/audio/transcriptionsWSS /wsSpeaker APIs
View endpoints โText to Speech API
Batch synthesis via HTTP POST, real-time streaming via WebSocket, and health check endpoints.
POST /v1/audio/speechWSS /wsHealth Check
View endpoints โBase URLs
| Service | Base URL |
|---|---|
| Speech to Text (HTTP) | https://asr.shunyalabs.ai |
| Speech to Text (WebSocket) | wss://asr.shunyalabs.ai/ws |
| Text to Speech (HTTP) | https://tts.shunyalabs.ai |
| Text to Speech (WebSocket) | wss://tts.shunyalabs.ai/ws |
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.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."
}
}