Create Your Account

First, you need to sign up for a Skylight account. The free plan includes $5 in credit that can be used for instance runtime, built-in agent steps, and file downloads.

Code Quickstart

1

Fetch API key

Sign in to your Dashboard to get your auto-generated API key.

2

Install SDK

Install the Python SDK.

pip install skylight-sdk
3

Configure Skylight client

Configure the client with your API key.

from skylight_sdk import Skylight

skylight = Skylight(apikey="your_api_key")
4

Start a Windows instance

Launch an instance. You can define a timeout to prevent unintended billing. (default is 60 minutes)

instance = skylight.windows.start()

instance = skylight.windows.start(timeout=60)

This returns:

{
    "id": "i-123456",          # Unique identifier of the created instance
    "message": "Instance ready to use",  # Human-readable status message
    "livestream_url": "launchskylight.com/embed/i-123456",  # URL to livestream the instance
    "state": "running"         # State of the instance (running, pending, hibernated, terminated)
}
5

Interact with the Windows desktop

Control the Windows desktop programatically with built-in tools. Available actions are listed in Interactions.

# Move the mouse
skylight.interact.move(instance_id="<id>", x=100, y=200)

# Left single click
skylight.interact.click(instance_id="<id>", x=100, y=200, interval=0)

# Type text
skylight.interact.type(instance_id="<id>", text="Hello, world!", interval=0.05)

# Take screenshot
skylight.interact.screenshot(instance_id="<id>")
6

Take actions with the built-in agent

Control the Windows desktop programmatically using the agent.

# Run a workflow
result = skylight.agent.run(instance_id="<id>", query="Open PowerPoint and make a 3 slide presentation about San Francisco, include a diagram")

Structured outputs are coming soon!

7

Terminate the instance

Stop the instance when you’re done.

skylight.windows.terminate(instance_id="<id>")