Skip to main content
With an installed host and an eligible rig, you’re ready to run a full session.

Full example

What happens

1

create_session

The gateway checks rig ownership and consent, then the host starts a desktop session and shows the on-screen “API session active” indicator.
2

screenshot

The host captures a fresh native-resolution JPEG (works with or without a live WebRTC stream).
3

click / type_text / key_press

Input is injected as native Win32 events on the real machine.
4

end_session

The host runs safety_restore and tears the session down. Always end sessions — they meter usage.
Wrap actions in try/finally and always call end_session. Sessions meter usage and hold the host’s pipeline. safety_restore also runs automatically on disconnect, launch failure, and END_SESSION.

Watch it live

Open Console → Sessions → Eye to watch at 60fps while your code runs. See Live View. Next: ground your clicks and build an agent loop.