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

# Switch from Steel

> Point the Steel SDK at Styne by changing its base URL and key. Playwright or Puppeteer then connects to the session's websocketUrl as before.

The unmodified `steel-sdk` 0.22.0, Python and JavaScript, creates a session, connects Playwright over CDP, loads a page and releases it. This page shows the change you make.

## The one line

```text theme={"theme":"css-variables"}
STEEL_BASE_URL=https://api.styne.ai/steel
STEEL_API_KEY=<your Styne API key>
```

Steel's cloud default is `https://api.steel.dev` (source: the `steel-sdk` 0.22.0 client, read 2026-11-09). In code the SDKs take it as
`Steel(base_url=...)` in Python and `new Steel({ baseURL: ... })` in JavaScript.

```python theme={"theme":"css-variables"}
import os
from steel import Steel
from playwright.sync_api import sync_playwright

client = Steel()  # reads STEEL_BASE_URL and STEEL_API_KEY
session = client.sessions.create()
with sync_playwright() as p:
    browser = p.chromium.connect_over_cdp(f"{session.websocket_url}&apiKey={os.environ['STEEL_API_KEY']}")
    page = browser.contexts[0].pages[0]
    page.goto("https://example.com")
    print(page.title())
    browser.close()
client.sessions.release(session.id)
```

## What maps

* `sessions.create`, `retrieve`, `list` (auto-paginated) and `release`.
* `websocketUrl` already carries its token; the documented `${websocketUrl}&apiKey=<key>` pattern works too.
* `credentials.create`, `update`, `list` and `delete`: each credential is a [login vault](https://docs.styne.ai/vault.md) item for its origin's host,
  sealed like every vault item; `value.username`, `value.password` and `value.totpSecret` are its fields and no answer carries them.
  A namespace other than `default` shows in the vault item's label as `[namespace] label`.
* `sessions.captchas.solve` switches the session to the solve mode: every challenge it meets from then on is answered by the
  session's solver. `sessions.captchas.status` lists what the session's challenge watcher did on its page.
* `sessions.files.upload`, `list`, `download`, `delete`, `deleteAll` and `downloadArchive`: the files of the session's download
  folder, where the browser saves downloads and where an upload lands at its `path`.
* `computers.create`, `retrieve`, `list`, `delete`, `pause`, `resume`, `exec`, `transitions` and `quota`: a computer is a
  [sandbox](https://docs.styne.ai/sandboxes.md) of the account (`template` names a catalog template, `base` when none; `vcpu` and `memoryMib` size
  it; `autoPause` pauses it at `timeoutSeconds` instead of ending it). `exec` runs `command` through `/bin/sh -c` or `argv` as
  given, with `cwd`, `env` and `timeoutSeconds` (at most 3600); output past 8 MiB is cut and marked `truncated`.
  `quota` counts the account's computers, running computers and checkpoints against its plan.
* `computers.createCheckpoint` and `checkpoints.retrieve`, `list`, `delete` and `restore`: a checkpoint is one of the
  sandbox's [checkpoints](https://docs.styne.ai/checkpoints.md) (memory and disk), `ready` when the call returns; `restore` starts a new computer
  from it.

## What is different

* Connect through `session.websocketUrl`. A hard-coded `wss://connect.steel.dev?apiKey=...&sessionId=...` line does not reach
  Run.
* Options Styne does not serve (Steel proxies, for example) are refused with a clear error instead of being ignored.
* After release the session is gone: `retrieve` returns 404 instead of a `released` status.

Styne's own browser API is described on [browsers](https://docs.styne.ai/browsers.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.