> ## 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.

> ## Agent Instructions
> Start with /introduction/getting-started. Use the Direct Query API (POST /query) with the Newton Fusion model (text, image, and video reasoning) or the Newton Omega encoder (time-series embeddings). ATAI_API_ENDPOINT must include the version path: /v0.5 for most APIs, /v0.6 for the Fine-Tuning Service. Pages whose descriptions are marked (Archived) document the legacy Lens runtime — do not use them for new projects.

# Get Queue Depths

> Retrieve global queue depths grouped by pipeline type

<Callout icon="clock" color="#3064E3" iconType="solid">
  Requires [version 1.1.0](/release-notes/1.1.x#v1-1-0) or later of the Archetype platform.
</Callout>

## Overview

This endpoint returns the current queue depths for all pipeline types. Use this to monitor how many jobs are waiting to be processed.

## Response

<ResponseField name="queues" type="array">
  Array of queue depth entries, each containing:

  * `pipeline_type` — Pipeline type (`batch` or `training`)
  * `depth` — Number of jobs currently in the queue for this pipeline type
</ResponseField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl https://api.u1.archetypeai.app/v0.5/batch/jobs/queue \
    -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/batch/jobs/queue",
      headers={"Authorization": f"Bearer {api_key}"}
  )

  data = response.json()
  for queue in data["queues"]:
      print(f"{queue['pipeline_type']}: {queue['depth']} jobs queued")
  ```

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

  const data = await response.json();
  data.queues.forEach(queue => {
    console.log(`${queue.pipeline_type}: ${queue.depth} jobs queued`);
  });
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={"system"}
  {
    "queues": [
      {
        "pipeline_type": "batch",
        "depth": 12
      },
      {
        "pipeline_type": "training",
        "depth": 3
      }
    ]
  }
  ```

  ```json 401 - Unauthorized theme={"system"}
  {
    "detail": "Invalid access with key: api_key_not_found"
  }
  ```
</ResponseExample>
