Skip to main content
Custom proxies must be enabled for your account. Set your Tilion API key and proxy credentials in the terminal where you run the example:
Use an HTTP or HTTPS proxy with a public hostname or IP address and an explicit port. Put credentials in the separate fields, with no path or credentials in PROXY_SERVER.

Create the session

Generate an idempotency key separately with uuidgen. Run this once for each new session:
The request examples below read this key from your environment. To retry the same creation request, rerun only the request example with the same key and body. Keep the original value if you switch terminals. Generate a new key when you want a new session. The Python example requires requests. Run the Node.js example as an .mjs file with Node 20 or later. The curl example requires jq.
Tilion tests the proxy before starting the browser. A successful request returns the standard session object. These examples leave the session running. Set TILION_SESSION_ID to its session_id, then read a page or connect Playwright. The server retains the idempotency-key association for about an hour. See session creation for retry behavior.

Keep the proxy for the session

All browser traffic goes through your proxy. Tilion’s recovery does not switch it to another exit, and /rotate-ip returns 409 customer_proxy_session. Manage IP changes through your proxy provider. Omit residential: false, proxy_type, geo, exit_id, exit_region, site_check: true, full_browser, and kiosk when using a custom proxy. SOCKS5 is not supported. Traffic through your proxy does not use your Tilion premium proxy allowance. Browser time is billed until the session ends.

Close the session

See the custom proxy reference for validation, authentication, and connection errors.