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

# Quickstart

> Go from zero to a live Windows session in minutes.

By the end of this guide, your code will start a session on a real Windows
machine, capture a native-resolution frame, and send native input — all through
the Glasswarp API.

## Prerequisites

<Steps>
  <Step title="A Windows host, online and API-enabled">
    Install the host agent on a Windows machine, pair it, and turn on **API
    access** for that rig. See [Install the host](/get-started/install-host).
  </Step>

  <Step title="An API key">
    Create one in the [Console](https://www.glasswarp.com/console/keys). Keys
    look like `gw_live_sk_...`.
  </Step>

  <Step title="Python 3.9+">
    The SDK is Python. REST works from any language — see the
    [API reference](/api-reference/overview).
  </Step>
</Steps>

## 1. Install the SDK

<CodeGroup>
  ```bash pip theme={null}
  python -m pip install glasswarp
  ```

  ```bash uv theme={null}
  uv add glasswarp
  ```

  ```bash poetry theme={null}
  poetry add glasswarp
  ```
</CodeGroup>

<Tip>
  Add the grounding extra (`glasswarp[grounding]`) only when you need the
  Set-of-Mark and ROI image helpers, which pull in Pillow.
</Tip>

## 2. Set your API key

```bash theme={null}
export GLASSWARP_API_KEY=gw_live_sk_...
```

The client reads `GLASSWARP_API_KEY` automatically. Never hardcode or commit it.

## 3. Run your first session

```python theme={null}
import os
from glasswarp import GlasswarpClient

gw = GlasswarpClient(api_key=os.environ["GLASSWARP_API_KEY"])

# Pick an online rig with API access enabled.
rig = next(
    (r for r in gw.list_rigs() if r.online and r.api_access_enabled),
    None,
)
if rig is None:
    raise RuntimeError("No online rig with API access enabled")

session = gw.create_session(rig_id=rig.id, mode="desktop")
sid = session.session_id

try:
    # Eyes: native-resolution JPEG bytes.
    frame = gw.screenshot(sid)
    with open("first_frame.jpg", "wb") as f:
        f.write(frame.jpeg)

    # Hands: native Win32 input.
    gw.click(sid, x=500, y=400)
    gw.type_text(sid, "Hello from an agent")
    gw.key_press(sid, "Enter")
finally:
    # Always end metered sessions.
    gw.end_session(sid)
```

## 4. Watch it live

Open **Console → Sessions → Eye** to watch the session at 60fps while your code
runs. You'll see the on-screen "API session active" indicator on the host — that
is the owner-consent guardrail, always on.

## Next steps

<CardGroup cols={2}>
  <Card title="Ground your clicks" icon="crosshairs" href="/concepts/grounding">
    Click UIA targets instead of guessing pixels.
  </Card>

  <Card title="Build an agent loop" icon="arrows-rotate" href="/guides/agent-loop">
    observe → model → act, efficiently.
  </Card>

  <Card title="Launch apps" icon="window-maximize" href="/guides/launch-apps">
    Spawn and drive Windows applications.
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/overview">
    Every endpoint, with a request builder.
  </Card>
</CardGroup>
