from gravixlayer import GravixLayer
client = GravixLayer() # reads GRAVIXLAYER_API_KEY
sandbox = client.runtime.create(template="browser-small")
bid = sandbox.browser.open(url="https://app.example.com/login")["browser_id"]
# …log in here…
r = sandbox.browser.profile_export(bid, dest_path="/workspace/profile.tar")
print(r["path"])
# Later — same or another runtime: upload the tar, then import
bid2 = sandbox.browser.open()["browser_id"]
sandbox.browser.profile_import(bid2, "/workspace/profile.tar")
sandbox.kill()