> ## Documentation Index
> Fetch the complete documentation index at: https://docs.archetypeai.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Sessions Info

> Get summary information about all lens sessions in your organization

## Overview

This endpoint returns high-level information about lens sessions across your organization, including counts of active and total sessions.

## Response

<ResponseField name="num_active_sessions" type="integer">
  Number of currently active (running) sessions
</ResponseField>

<ResponseField name="num_sessions" type="integer">
  Total number of sessions created (including destroyed ones)
</ResponseField>

<ResponseField name="last_updated" type="float">
  Unix timestamp of the last update to session information
</ResponseField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl https://api.u1.archetypeai.app/v0.5/lens/sessions/info \
    -H "Authorization: Bearer $ATAI_API_KEY"
  ```

  ```python Python theme={"system"}
  import requests
  import os

  api_key = os.environ.get("ATAI_API_KEY")

  response = requests.get(
      "https://api.u1.archetypeai.app/v0.5/lens/sessions/info",
      headers={"Authorization": f"Bearer {api_key}"}
  )

  info = response.json()
  print(f"Active sessions: {info['num_active_sessions']}")
  print(f"Total sessions: {info['num_sessions']}")
  ```

  ```javascript JavaScript theme={"system"}
  const response = await fetch('https://api.u1.archetypeai.app/v0.5/lens/sessions/info', {
    headers: {
      'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
    }
  });

  const info = await response.json();
  console.log(`Active sessions: ${info.num_active_sessions}`);
  console.log(`Total sessions: ${info.num_sessions}`);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={"system"}
  {
    "num_active_sessions": 0,
    "num_sessions": 0,
    "last_updated": 1765201367.1255276
  }
  ```

  ```json 401 - Unauthorized theme={"system"}
  {
    "errors": [
      {
        "code": "unauthorized_request",
        "message": "Unauthorized or invalid access.",
        "suggestion": "Provide valid authentication credentials and ensure they have the required permissions.",
        "error_uid": "err-xxxxxxxx"
      }
    ]
  }
  ```
</ResponseExample>
