Async & persistent sessions
Run many sessions concurrently with the async driver, and keep login state across runs with persistent contexts. One browser maps to one concurrency slot on your plan.
Async
Every entry point has an await-able twin: launch_async, launch_context_async and launch_persistent_context_async. They take the same arguments as the sync versions and return the same shapes.
import asyncio
from capium import launch_context_async
async def main():
browser, ctx, page = await launch_context_async(
seed=200123, platform="linux",
proxy="dataimpulse", geoip=True,
url="https://example.com",
)
print(await page.evaluate("() => navigator.userAgent"))
await browser.close()
asyncio.run(main())Persistent contexts
Bind a seed to a profile directory so a persona keeps its cookies, storage and login state between runs. Reuse the same seed and proxy for that account every time.
from capium import launch_persistent_context
# A profile dir keeps cookies, storage and login state between runs.
# launch_persistent_context returns a BrowserContext (not a tuple).
ctx = launch_persistent_context(
"~/profiles/acct1",
seed=200123, platform="linux",
proxy="http://user:pass@host:port", geoip=True,
)
page = ctx.pages[0] if ctx.pages else ctx.new_page()
page.goto("https://example.com")
ctx.close()Concurrency & plans
Each live browser is one concurrency slot. Your plan's session cap is how many can run at once, see pricing. For a stable set of accounts, keep one seed + one profile dir + one sticky proxy per account.
Pair this with humanized input and geo alignment for the strongest result.