Skip to main content

Constructor

Creates a new Odyssey client instance with the provided API key.

Methods

connect()

Connect to a streaming session. The Odyssey API automatically assigns an available session.
Raises:

create_client_credentials()

Added in v1.3.0. See the Client Credentials guide for the full two-phase auth pattern.
Mint short-lived credentials that a client (e.g., browser) can use to connect without an API key. This provisions a session server-side and returns a ClientCredentials object.
Returns: ClientCredentials - Credentials including session token, signaling URL, and streamer capabilities. Raises:

connect_with_credentials()

Added in v1.3.0. See the Client Credentials guide for the full two-phase auth pattern.
Connect using pre-minted credentials (no API key required). Call this on the client side with credentials received from your server.
Raises: OdysseyConnectionError - If the session token is expired or the signaling server rejects the connection.

disconnect()

Disconnect from the session and clean up resources.

start_stream()

Start an interactive stream session. Supports Broadcast mode by passing broadcast=True. When Broadcast is enabled, the stream can be viewed by multiple spectators simultaneously. Playback details are delivered via the on_broadcast_ready callback.
Supported image formats for the image parameter: Returns: str - Stream ID when the stream is ready. Use this ID to retrieve recordings. Raises: OdysseyStreamError - If not connected or stream fails to start.
Image-to-video requirements:
  • SDK version 1.0.0+
  • Max size: 25MB
  • Supported formats: JPEG, PNG, WebP, GIF, BMP, HEIC, HEIF, AVIF
  • Images are resized to 1280x704 (landscape) or 704x1280 (portrait)

connect_to_stream()

Connect to an existing broadcast stream as a spectator. This method is used when joining a broadcast created with start_stream(broadcast=True). The webrtc_url and spectator_token are provided via the on_broadcast_ready callback.
Returns: SpectatorConnection - Handle for managing the playback session. Raises: Example:

interact()

Send an interaction prompt to update the video content.
Returns: str - The acknowledged prompt when processed. Raises: OdysseyStreamError - If not connected or no active stream.

end_stream()

End the current interactive stream session.
Raises: OdysseyStreamError - If not connected.

get_recording()

Get recording data for a stream with presigned URLs.
Returns: Recording - Recording data with presigned URLs valid for ~1 hour.
This method can be called without an active connection. It only requires a valid API key.

list_stream_recordings()

List stream recordings for the authenticated user.
Returns: StreamRecordingsList - Paginated list of stream recordings.
This method can be called without an active connection. It only requires a valid API key.

Simulate API Methods

Simulate API methods were added in v1.0.0
The Simulate API allows you to run scripted interactions asynchronously. Unlike the Interactive API, simulations execute in the background and produce recordings you can retrieve when complete.

simulate()

Create a new simulation job.
Script entry format: Returns: SimulationJobDetail - The created simulation job with ID, status, and streams.

get_simulate_status()

Get the current status of a simulation job.
Returns: SimulationJobDetail - Detailed status including streams created.

list_simulations()

List simulation jobs for the authenticated user.
Returns: SimulationJobsList - Paginated list of simulation jobs.

cancel_simulation()

Cancel a pending or running simulation job.
Returns: SimulationJobInfo - The cancelled job’s summary.
Simulation methods can be called without an active connection. They only require a valid API key.

Properties

is_connected

Whether the client is currently connected and ready.

current_status

Current connection status. Possible values: AUTHENTICATING, CONNECTING, RECONNECTING, CONNECTED, DISCONNECTED, FAILED

current_session_id

Current session ID, or None if not connected.