Session Management
Learn how NotexAI manages sessions, billing, and timeouts.
Session Management
NotexAI uses sessions to maintain browser states and manage interactions. Each session is uniquely identified and must be explicitly started and closed using the SDK or REST API.
Key Points
Session Lifecycle:
Start a session using
client.start()
.Close a session using
client.close()
.
Reusing Sessions:
By default, sessions are set to
keep_alive=False
, allowing them to be reused within their timeout period.
Session Limits:
Only one session can be active per client instance when using the SDK.
Example
Billing Management
Billing is based on API usage and session activity. Each API call contributes to usage metrics, which are billed according to your selected plan.
Key Points
Billing Units:
Actions like
observe
,scrape
, andstep
consume API credits.Credits are deducted based on the complexity of the operation.
Plan Details:
Billing rates and limits are available on the Billing Dashboard.
Usage Tracking:
Monitor usage and remaining credits in real-time on the Usage Dashboard.
Example
Observe usage metrics on the NotexAI dashboard.
Ensure you have sufficient API credits for operations.
Timeout Management
Timeouts ensure sessions are terminated after a predefined period of inactivity to optimize resource usage and cost.
Key Points
Default Timeout:
The default session timeout is 5 minutes.
Configurable during session start using the
session_timeout
parameter.
Timeout Behavior:
Sessions are automatically terminated after the timeout period unless
keep_alive=True
.
Example
Important Notes
Ensure sessions are explicitly closed to avoid unnecessary billing.
Monitor timeout settings to prevent premature session termination.
Last updated