Quickstart
Install the SDK, point it at your license key, drive the page, and verify the persona took effect. If you have used Playwright, you already know Capium.
Prerequisites
- Python 3.9+. The Capium SDK is a Python package driven by stock Playwright.
- Linux, Windows, or macOS. On a headless Linux server, run the browser headed under a virtual display (
Xvfb :99+DISPLAY=:99), which is the recommended mode. - A license key from your Capium dashboard on capzy.ai (the free tier works).
1. Install
Capium is driven by stock Playwright, so Playwright installs alongside it. The stealth binary itself auto-downloads on your first launch, there is no separate Chrome to install.
pip install capium
python -m playwright install-deps # Chromium's OS libraries (once)2. Add your license key
Create an account on Capzy, open the Capium dashboard, and copy your key. The SDK reads it from the CAPIUM_LICENSE_KEY environment variable or ~/.capium/license, or you can pass license_key= to any launch call.
# Pass it programmatically...
export CAPIUM_LICENSE_KEY="your-key-from-capzy.ai"
# ...or store it once in ~/.capium/license
# KEY=your-key-from-capzy.ai3. Run your first session
launch_context() returns a (browser, context, page) tuple. Turn on humanize for human-like input and timing:
from capium import launch_context
# launch_context returns (browser, context, page). The stealth binary
# auto-downloads on first launch; the license is read from the env
# (or pass license_key="...").
browser, ctx, page = launch_context(
seed=200123, # a coherent, repeatable device
headless=False, # headed is recommended
humanize=True, # human-like mouse / typing / scroll
url="https://fingerprint.com/demo/",
)
print(page.title())
browser.close()4. Verify it worked
Confirm the persona actually took effect before you build on it. Launch a Windows persona and read back the values a site would see, they should describe Windows, not your real host, and navigator.webdriver should be False:
browser, ctx, page = launch_context(seed=200123, platform="windows",
url="https://fingerprint.com/demo/")
# Confirm the persona took effect: platform + UA should match Windows,
# and navigator.webdriver should be false.
print(page.evaluate("() => navigator.platform")) # Win32
print(page.evaluate("() => navigator.userAgent")) # ...Windows... Chrome/151...
print(page.evaluate("() => navigator.webdriver")) # False
browser.close()For a fuller check, drive a fingerprint or bot-detection test page and inspect the result. See What Capium patches for the surfaces involved.
Next
Add a seed and persona for a coherent, repeatable device, then wire up a proxy with geo alignment.