> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryflavia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Deploy your first Skylight Windows desktop in seconds

## Create Your Account

First, you need to [sign up for a Skylight account]("https://www.launchskylight.com/sign-in?redirect_url=https%3A%2F%2Fwww.launchskylight.com%2Fapp%2Fplayground"). The free plan includes \$5 in credit that can be used for instance runtime, built-in agent steps, and file downloads.

## Code Quickstart

<Tabs>
  <Tab title="Python">
    <Steps>
      <Step title="Fetch API key">
        Sign in to your **[Dashboard](https://www.launchskylight.com/app/dashboard)** to get your auto-generated API key.
      </Step>

      <Step title="Install SDK">
        Install the Python SDK.

        ```bash theme={null}
        pip install skylight-sdk
        ```
      </Step>

      <Step title="Configure Skylight client">
        Configure the client with your API key.

        ```python theme={null}
        from skylight_sdk import Skylight

        skylight = Skylight(apikey="your_api_key")
        ```
      </Step>

      <Step title="Start a Windows instance">
        Launch an instance. You can define a timeout to prevent unintended billing. (default is 60 minutes)

        ```python theme={null}
        instance = skylight.windows.start()

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

        This returns:

        ```python theme={null}
        {
            "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)
        }
        ```
      </Step>

      <Step title="Interact with the Windows desktop">
        Control the Windows desktop programatically with built-in tools. Available actions are listed in [Interactions](/features/interactions).

        ```python theme={null}
        # 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>")
        ```
      </Step>

      <Step title="Take actions with the built-in agent">
        Control the Windows desktop programmatically using the agent.

        ```python theme={null}
        # 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!
      </Step>

      <Step title="Terminate the instance">
        Stop the instance when you're done.

        ```python theme={null}
        skylight.windows.terminate(instance_id="<id>")
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="TypeScript">
    <Steps>
      <Step title="Fetch API key">
        Sign in to your **[Dashboard](https://www.launchskylight.com/app/dashboard)** to get your auto-generated API key.
      </Step>

      <Step title="Install SDK">
        Install the TypeScript SDK.

        <CodeGroup>
          ```bash npm theme={null}
          npm install skylight-sdk
          ```

          ```bash pnpm theme={null}
          pnpm add skylight-sdk
          ```

          ```bash yarn theme={null}
          yarn add skylight-sdk
          ```

          ```bash bun theme={null}
          bun add skylight-sdk
          ```
        </CodeGroup>
      </Step>

      <Step title="Configure Skylight client">
        Configure the client with your API key.

        ```typescript theme={null}
        import { Skylight } from "skylight-sdk";

        const skylight = new Skylight(apikey: 'your_api_key');
        ```
      </Step>

      <Step title="Start a Windows instance">
        ```typescript theme={null}
        const instance = await skylight.windows.start({});
        ```

        This returns:

        ```typescript theme={null}
        {
          id: string;        // Unique identifier of the created instance
          message: string;   // Human-readable status message (e.g. "Instance ready to use")
          livestream_url: string;  // URL to livestream the instance (e.g. "launchskylight.com/embed/i-123456")
          state: string;     // State of the instance (running, pending, hibernated, terminated)
        }
        ```
      </Step>

      <Step title="Interact with the Windows desktop">
        Control the Windows desktop programatically with built-in tools. Available actions are listed in [Interactions](/features/interactions).

        ```typescript theme={null}
        // Move the mouse
        await skylight.interact.move("<id>", {x: 100, y: 200,});

        // Left single click
        await skylight.interact.click("<id>", {x: 100, y: 200, interval: 0,});

        // Type text
        await skylight.interact.type("<id>", {text: "Hello, world!", interval: 0.05,});

        // Take a screenshot
        await skylight.interact.screenshot("<id>");
        ```
      </Step>

      <Step title="Take actions with the built-in agent">
        Control the Windows desktop programmatically using the agent.

        ```typescript theme={null}
        // Run a workflow
        const result = await skylight.agent.run("<id>", {
        query: "Open PowerPoint and make a 3 slide presentation about San Francisco, include a diagram",
        });

        ```

        Structured outputs are coming soon!
      </Step>

      <Step title="Terminate the instance">
        Stop the instance when you're done.

        ```typescript theme={null}
        await skylight.windows.terminate("<id>");
        ```
      </Step>
    </Steps>
  </Tab>
</Tabs>
