Constructor
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.
ClientCredentials object.
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.
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 passingbroadcast=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 withstart_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.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
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
current_status
AUTHENTICATING, CONNECTING, RECONNECTING, CONNECTED, DISCONNECTED, FAILED
current_session_id
None if not connected.