Initialize Real-time Service
Initialize the real-time transcription service before establishing WebSocket connections.
Endpoint
POST /api/v4/realtime/initialize
Request
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer token | Yes |
Request Body
No request body required.
Response
{
"status": "string",
"message": "string",
"ready": boolean,
"endpoint": "string"
}
| Field | Type | Description |
|---|---|---|
status | string | Service status after initialization |
message | string | Human-readable status message |
ready | boolean | Whether service is ready to accept connections |
endpoint | string | WebSocket 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/statusuntilready: true - When status is
starting, poll every 5 seconds - The
endpointfield 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 tokentype- Model type: "fast" or "quality"language- Language code (optional)url- Stream URL (required for stream mode)
Related Endpoints
- Check Service Status - Check if service is ready
- Real-time Streaming - WebSocket connection details
- Message Protocol - Protocols