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 programatically controlling a Steel browser Session.
Initial Setup
1. Create a Steel Account
- 1
Sign up for a free account at steel.dev
- 2
The free plan includes 100 browser hours to get you started
- 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
.env
file in your project root (if you don't have one) - 2
Add your Steel API key:
Make sure to add .env
to your .gitignore
file to keep your key secure
Installing Dependencies
Install the Steel SDK and Playwright:
$npm install steel-sdk playwright
Create Your First Session
Let's create a simple script that launches and then releases a Steel session:
1import Steel from 'steel-sdk';2import dotenv from 'dotenv';34dotenv.config();56const client = new Steel({7steelAPIKey: process.env.STEEL_API_KEY,8});910async function main() {11// Create a session12const session = await client.sessions.create();13console.log('Session created:', session.id);14console.log(`View live session at: ${session.sessionViewerUrl}`);1516// Your session is now ready to use!17// When done, release the session18await client.sessions.release(session.id);19console.log('Session released');20}2122main().catch(console.error);
Connecting to Your Session
Now that you have a session, you can connect to it using your preferred automation tool.
1import puppeteer from 'puppeteer';23const browser = await puppeteer.connect({4browserWSEndpoint: `wss://connect.steel.dev?apiKey=${process.env.STEEL_API_KEY}&sessionId=${session.id}`,5});67const page = await browser.newPage();8await page.goto('https://example.com');
Session Features
Want to do more with your session? Here are some common options you can add when creating:
1const session = await client.sessions.create({2useProxy: true, // Use Steel's residential proxy network3solveCaptcha: true, // Enable automatic CAPTCHA solving4apiTimeout: 1800000, // Set 30-minute timeout (default is 5 minutes)5userAgent: 'custom-ua' // Set a custom user agent6});
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.