Skip to main content

Initialize Real-time Service

Initialize the real-time transcription service before establishing WebSocket connections.

Endpoint

POST /api/v4/realtime/initialize

Request

Headers

HeaderValueRequired
AuthorizationBearer tokenYes

Request Body

No request body required.

Response

{
"status": "string",
"message": "string",
"ready": boolean,
"endpoint": "string"
}
FieldTypeDescription
statusstringService status after initialization
messagestringHuman-readable status message
readybooleanWhether service is ready to accept connections
endpointstringWebSocket endpoint URL

TypeScript Type

type RealtimeInitializeResponse = {
status: string;
message: string;
ready: boolean;
endpoint: string;
};

Notes

  • This endpoint initializes the real-time service infrastructure
  • After calling this endpoint, poll /api/v4/realtime/status until ready: true
  • When status is starting, poll every 5 seconds
  • The endpoint field contains the WebSocket base URL
  • No session-specific parameters are required for initialization
  • WebSocket connections are established directly to wss://realtime.scriptix.io

WebSocket Connection

After the service is ready, connect to the WebSocket using:

For Microphone Input:

wss://realtime.scriptix.io/v2/realtime?token={token}&type={modelType}&language={language}

For Stream Input:

wss://realtime.scriptix.io/v2/client/{token}?url={streamUrl}&language={language}&type={modelType}

Parameters:

  • token - Authentication token
  • type - Model type: "fast" or "quality"
  • language - Language code (optional)
  • url - Stream URL (required for stream mode)