---
title: "Long sessions"
description: "Session lifetimes."
---

> Documentation Index
> Fetch the complete documentation index at: https://help.tooluse.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Long sessions

<p>Set a finite top-level <code>timeout</code> in seconds at creation. It defaults to 3600 and must be between 60 and 21600. A session cannot extend beyond its admitted lifetime.</p>
<pre><code class="language-bash">curl -X POST "https://api.tooluse.net/v1/browsers/sessions" \
  -H "Authorization: Bearer $TOOLUSE_API_KEY" \
  -H "Idempotency-Key: tooluse-example-001" \
  -H "Content-Type: application/json" \
  -d '{"timeout":600,"keepAlive":true}'
</code></pre>
<p><code>keepAlive</code> permits a supported session to survive CDP disconnects; it does not make a session unlimited or free. Read state before reconnecting and release when finished.</p>
<pre><code class="language-bash">curl -X POST "https://api.tooluse.net/v1/browsers/sessions/$SESSION_ID" \
  -H "Authorization: Bearer $TOOLUSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"REQUEST_RELEASE"}'
</code></pre>

Source: https://help.tooluse.net/browsers/long-sessions/overview/index.mdx
