Skip to main content
The odyssey package provides an async Python client for interacting with Odyssey’s audio-visual intelligence.
Requires Python 3.12+
FeatureMinimum Version
Core SDK^1.0.0
Recordings^1.0.0
Simulate API^1.0.0

Installation

pip install git+https://github.com/odysseyml/odyssey-python.git

API Summary

Methods

SignatureDescription
connect(**handlers) -> NoneConnect to a streaming session (raises on failure)
disconnect() -> NoneDisconnect and clean up resources
start_stream(prompt, portrait?, image?) -> strStart an interactive stream
interact(prompt) -> strSend a prompt to update the video
end_stream() -> NoneEnd the current stream session
get_recording(stream_id) -> RecordingGet recording URLs for a stream
list_stream_recordings(limit?, offset?) -> StreamRecordingsListList user’s stream recordings
simulate(script) -> SimulationJobInfoCreate an async simulation job (v1.0.0+)
get_simulate_status(id) -> SimulationJobDetailGet simulation job status (v1.0.0+)
list_simulations(limit?, offset?) -> SimulationJobsListList simulation jobs (v1.0.0+)
cancel_simulation(id) -> NoneCancel a simulation job (v1.0.0+)

Properties

PropertyTypeDescription
is_connectedboolWhether connected and ready
current_statusConnectionStatusCurrent connection status
current_session_id`strNone`Current session ID

Event Handlers

HandlerParametersDescription
on_connected-WebRTC connection established
on_disconnected-Connection closed
on_video_frameframe: VideoFrameVideo frame received
on_stream_startedstream_id: strInteractive stream ready (stream_id can be used for recordings)
on_stream_ended-Interactive stream ended
on_interact_acknowledgedprompt: strInteraction processed
on_stream_errorreason, messageStream error occurred
on_errorerror: Exception, fatal: boolGeneral error
on_status_changestatus, message?Connection status changed

Exceptions

ExceptionDescription
OdysseyErrorBase exception for all Odyssey errors
OdysseyAuthErrorAuthentication failed (invalid API key)
OdysseyConnectionErrorConnection failed (no streamers, timeout)
OdysseyStreamErrorStream operation failed

Next Steps