Dedicated IPs
A dedicated IP is an IP address that Steel leases to your organization alone. Every session that uses it reaches sites from the same address. Use one when a site allows only known addresses, or when a site asks for a new login each time an account appears from a new network. What each plan includes shows which plans have them.
A dedicated IP keeps the network address the same. It does not keep cookies or logins. To keep both, use it with a profile. For an address that changes with each session, use Steel proxies.
Before you begin
Put your Steel API key in the STEEL_API_KEY environment variable. Then install the Steel SDK and Playwright.
npm install steel-sdk playwrightpython3 -m venv .venv
source .venv/bin/activate
pip install steel-sdk playwrightIn Go and Rust, install only the SDK, as the Go and Rust SDK pages show. The code that drives the browser uses Playwright, so it is in TypeScript and Python only.
Get a dedicated IP
An organization admin leases dedicated IPs in the Steel dashboard.
- Open Dedicated IPs in the sidebar, under Browsers. The page is called Network (direct link).
- Click Lease dedicated IPs.
- Choose a Location and a Quantity. One checkout leases up to 25 dedicated IPs. For more, contact Support.
- Click Continue to checkout, and complete the checkout.
The Network page then lists each dedicated IP with its public address, such as 203.0.113.42, and its ID, such as fixed:8SdfYs77me. The API uses the ID, not the address.
To give up a dedicated IP, click the unsubscribe button at the end of its row on the Network page, and click Unsubscribe. The address keeps working until the end of the current billing period. Then the lease ends. To keep it after all, click the resubscribe button on the same row before that date, and click Undo unsubscribe.
Use a dedicated IP in a session
Set useProxy to { type: "fixed" } when you create the session. Steel routes the browser through one of your organization's active dedicated IPs.
This program creates a session on a dedicated IP, prints the session's public IP address, and releases the session.
import Steel from "steel-sdk";
import { chromium } from "playwright";
const client = new Steel();
const session = await client.sessions.create({
useProxy: { type: "fixed" },
});
try {
const browser = await chromium.connectOverCDP(session.websocketUrl);
const context = browser.contexts()[0];
const page = context.pages()[0] ?? (await context.newPage());
await page.goto("https://steel.dev/practice/ip");
console.log(await page.textContent("body"));
await browser.close();
} finally {
await client.sessions.release(session.id);
}from playwright.sync_api import sync_playwright
from steel import Steel
client = Steel()
session = client.sessions.create(use_proxy={"type": "fixed"})
try:
with sync_playwright() as playwright:
browser = playwright.chromium.connect_over_cdp(session.websocket_url)
context = browser.contexts[0]
page = context.pages[0] if context.pages else context.new_page()
page.goto("https://steel.dev/practice/ip")
print(page.text_content("body"))
browser.close()
finally:
client.sessions.release(session.id)Run the program:
npx tsx dedicated-ip.mtspython dedicated_ip.pyThe program prints one of the addresses on your Network page.
{"ip":"203.0.113.42"}Pin one dedicated IP
If you lease more than one dedicated IP, a session can use any of them. To choose one, set id in useProxy to its ID. Use this when one account, customer or workflow must always use the same address.
const session = await client.sessions.create({
useProxy: { type: "fixed", id: "fixed:8SdfYs77me" },
});session = client.sessions.create(
use_proxy={"type": "fixed", "id": "fixed:8SdfYs77me"},
)session, err := client.Sessions.New(ctx, steel.SessionNewParams{
UseProxy: steel.F[any](map[string]any{"type": "fixed", "id": "fixed:8SdfYs77me"}),
})
if err != nil {
return err
}let session = client
.sessions()
.create(steel_rs::SessionCreateParams {
use_proxy: Some(serde_json::json!({ "type": "fixed", "id": "fixed:8SdfYs77me" })),
..Default::default()
})
.await?;In Rust, this code needs cargo add serde_json.
Use a dedicated IP with a profile
A profile saves a session's browser state and its proxy setting. Create a session with persistProfile and a dedicated IP. If you do not pass an id, Steel picks a dedicated IP and saves that address in the profile when the session starts. Each later session that starts from the profile uses the same address and the same browser state.
This program creates a session on a dedicated IP with persistProfile, and releases it. It reads the profile every 2 seconds until Steel has saved it, for up to 60 seconds, then starts a second session from the profile. Both sessions print their address.
import Steel from "steel-sdk";
import { chromium } from "playwright";
const client = new Steel();
async function printAddress(websocketUrl: string) {
const browser = await chromium.connectOverCDP(websocketUrl);
const context = browser.contexts()[0];
const page = context.pages()[0] ?? (await context.newPage());
await page.goto("https://steel.dev/practice/ip");
console.log(await page.textContent("body"));
await browser.close();
}
async function waitUntilReady(profileId: string) {
const deadline = Date.now() + 60_000;
for (;;) {
const profile = await client.profiles.get(profileId);
if (profile.status === "READY") return profile;
if (profile.status === "FAILED") throw new Error(`Steel could not save profile ${profileId}.`);
if (Date.now() > deadline) throw new Error(`Profile ${profileId} is not ready after 60 seconds.`);
await new Promise((resolve) => setTimeout(resolve, 2000));
}
}
const first = await client.sessions.create({
persistProfile: true,
useProxy: { type: "fixed" },
});
try {
await printAddress(first.websocketUrl);
} finally {
await client.sessions.release(first.id);
}
const profileId = first.profileId!;
await waitUntilReady(profileId);
const second = await client.sessions.create({ profileId });
try {
await printAddress(second.websocketUrl);
} finally {
await client.sessions.release(second.id);
}import time
from playwright.sync_api import sync_playwright
from steel import Steel
client = Steel()
def print_address(websocket_url):
with sync_playwright() as playwright:
browser = playwright.chromium.connect_over_cdp(websocket_url)
context = browser.contexts[0]
page = context.pages[0] if context.pages else context.new_page()
page.goto("https://steel.dev/practice/ip")
print(page.text_content("body"))
browser.close()
def wait_until_ready(profile_id):
deadline = time.monotonic() + 60
while True:
profile = client.profiles.get(profile_id)
if profile.status == "READY":
return profile
if profile.status == "FAILED":
raise RuntimeError(f"Steel could not save profile {profile_id}.")
if time.monotonic() > deadline:
raise RuntimeError(f"Profile {profile_id} is not ready after 60 seconds.")
time.sleep(2)
first = client.sessions.create(persist_profile=True, use_proxy={"type": "fixed"})
try:
print_address(first.websocket_url)
finally:
client.sessions.release(first.id)
profile_id = first.profile_id
wait_until_ready(profile_id)
second = client.sessions.create(profile_id=profile_id)
try:
print_address(second.websocket_url)
finally:
client.sessions.release(second.id)Run the program:
npx tsx dedicated-ip-profile.mtspython dedicated_ip_profile.pyBoth sessions print the same address.
{"ip":"203.0.113.42"}
{"ip":"203.0.113.42"}To save a chosen address in the profile, pass its id with persistProfile. If a later request has its own useProxy, that session uses the request's setting instead of the profile's.
When you work with several accounts, use one profile and one dedicated IP for each account. The profile keeps the browser state, and the dedicated IP keeps the address.
Check that it worked
Compare the address that https://steel.dev/practice/ip shows in the session with the Network page. It is one of your dedicated IPs. With an id in useProxy, it is the address that the Network page lists for that ID. Sessions that start from the same profile all show the address that the profile saved.
Plans and pricing
Each dedicated IP is a monthly subscription of $5, or a custom price on Enterprise. The traffic through a dedicated IP counts as Steel proxy bandwidth, and the session's browser time counts as usual. Pricing has the rates for each plan.
Troubleshooting
No active fixed IP proxies are available
{
"error": "Bad Request",
"message": "No active fixed IP proxies are available for this organization",
"retryable": false
}Cause: The request asks for a dedicated IP, but your organization has no active dedicated IP.
Fix: Lease a dedicated IP on the Network page. If you leased one, check its status there.
Verify: Create the session again. The response has a session id and no error.
Fixed IP proxy was not found or is not active
{
"error": "Bad Request",
"message": "Fixed IP proxy was not found or is not active for this organization",
"retryable": false
}Cause: The id in useProxy does not match any of your organization's active dedicated IPs. The same message appears when a profile saved a dedicated IP that is no longer active.
Fix: Copy the ID from the Network page, in the form fixed:8SdfYs77me. To let Steel choose, remove id.
Verify: Run the program in Use a dedicated IP in a session. It prints the address that the Network page shows for that ID.
Next steps
- Get past bot detection: Find out why a site still blocks a session on a dedicated IP.