Skip to main content

Create streaming session

Creates a streaming session. This endpoint is recommended for all new integrations.

Initiates a streaming session by creating a unique room at the WebRTC server for audio publishing and registers the connection at the WebSocket translation management API. The JWT access token received in the response should be used for both connecting to the WebRTC server and the WebSocket translation management API.

Notice, the JWT access token contains permissions, which may lead to restriction of several API functionalities.

Streaming session allows publishing RTC stream to the server, receiving translated audio stream, and managing translation options through WebSocket API.

References

Request Body
data object REQUIRED
subscriber_count Subscriber token count

Possible values: value ≤ 10

Number of subscriber tokens to generate. JWT used to connect to the WebRTC server and Translation management WebSocket API.

intent Intent

Possible values: [api, broadcaster, desktop]

Intent of the session. Used for analytics and debugging purposes.

Responses
201

Session created successfully.

Schema OPTIONAL
ok boolean
data object

Streaming session response data. Notice, address provided in the response example are placeholders and will differ in real response.

publisher List of access token for publishers with RW permissions

JWT used to connect to the WebRTC server and Translation management WebSocket API.

subscriber string[]

JWT used to connect to the WebRTC server and Translation management WebSocket API.

webrtc_room_name Room name

Room name to join WebRTC server.

webrtc_url Stream URL

Streaming API URL to publish a stream.

ws_url Control URL

WebSocket API URL to manage translation options.

intent Intent

Possible values: [api, broadcaster, desktop]

Intent of the session. Used for analytics and debugging purposes.

id Session ID

Publisher session identifier.

default

Default Response

Schema OPTIONAL
ok Ok OPTIONAL

Indicates if the request was successful or not.

errors object[]

List of errors

type uri

Possible values: 1 ≤ length ≤ 2083

A string containing a URI reference that identifies the problem type.

status Status

Possible values: 399 < value < 600

A number indicating the HTTP status code.

title Title

Possible values: 5 ≤ length

A string containing a short, human-readable summary of the problem type.

detail Detail

Possible values: 5 ≤ length

A string containing a human-readable explanation specific to this occurrence of the problem.

instance Instance

Possible values: 1 ≤ length

A string containing a URI reference that identifies the specific occurrence of the problem.

error_code Error Code

A Number that indicates the error type that occurred.