Quickstart
Get up a running with your first Steel Session in a few minutes.
Overview
This guide will walk you through setting up your Steel account, creating your first browser session in the cloud, and driving it using TypeScript/Playwright. In just a few minutes, you'll be up and programmatically controlling a Steel browser Session.
Initial Setup
1. Create a Steel Account
- 1
Sign up for a free account at steel.dev
- 2
Launch includes $30 in one-time free usage credits, valid for 90 days. See Pricing/Limits for current rates and limits.
- 3
No credit card required
2. Get Your API Key
- 1
After signing up, navigate to Settings > API Keys
- 2
Create an API key and save it somewhere safe. You will not be able to generate the same key again.
3. Set Up Environment Variables
- 1
Create a
.envfile in your project root (if you don't have one) - 2
Add your Steel API key:
STEEL_API_KEY=ste-your-api-key-here
Make sure to add .env to your .gitignore file to keep your key secure
Installing Dependencies
Install the Steel SDK, Playwright, dotenv to load your .env file, and tsx to run TypeScript:
$npm install steel-sdk playwright dotenv tsx
Using Python? pip install steel-sdk playwright, then playwright install chromium. The PyPI package is steel-sdk, but the import is from steel import Steel.
Create Your First Session
Save the following as steel-client.ts. It creates a session, connects with Playwright, visits a page, and releases the session even if a browser operation fails:
1import Steel from 'steel-sdk';2import { chromium } from 'playwright';3import 'dotenv/config';45async function main() {6const apiKey = process.env.STEEL_API_KEY;7if (!apiKey) {8throw new Error('Set STEEL_API_KEY in your .env file');9}1011const client = new Steel({12steelAPIKey: apiKey,13});1415const session = await client.sessions.create();16console.log('Session created:', session.id);17console.log(`View live session at: ${session.sessionViewerUrl}`);1819try {20const browser = await chromium.connectOverCDP(21`wss://connect.steel.dev?apiKey=${encodeURIComponent(apiKey)}&sessionId=${session.id}`,22);23const page = await browser.contexts()[0].newPage();24await page.goto('https://example.com');25console.log('Page title:', await page.title());26} finally {27// Releasing the session closes its remote browser and connection.28await client.sessions.release(session.id);29console.log('Session released');30}31}3233main().catch((error) => {34console.error(error);35process.exitCode = 1;36});
Run it from the directory containing your .env file:
npx tsx steel-client.ts
Session Features
To configure your session, replace the client.sessions.create() call inside main()
with the following options:
1const session = await client.sessions.create({2useProxy: true, // Use Steel's residential proxy network3solveCaptcha: true, // Enable automatic CAPTCHA solving4timeout: 600000, // Set 10-minute timeout (default is 5 minutes)5inactivityTimeout: 300000, // Release after 5 minutes of inactivity6userAgent: 'custom-ua' // Set a custom user agent7});
You've now created your first Steel session and learned the basics of session management. With these fundamentals, you can start building more complex automations using Steel's cloud browser infrastructure.
Reach out to us on the #help channel on Discord under the ⭐ community section.