> ## 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 Inputs Progress Counts

> Per-status counts of tracked inputs for a job

<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

Returns per-status counts across the job's tracked (non-`reference`) inputs. Mirrors the `input_progress` field embedded on `GET /batch/jobs/{id}` but lets you scope by port. Cheaper than walking the input list to compute badges.

## Request

<ParamField path="id" type="string" required>
  The unique job identifier
</ParamField>

<ParamField query="port_name" type="string">
  Scope the counts to a single input port (e.g. `worker.inference`)
</ParamField>

## Response

<ResponseField name="job_id" type="string">
  The job identifier
</ResponseField>

<ResponseField name="pending" type="integer">
  Inputs not yet picked up by a worker
</ResponseField>

<ResponseField name="processing" type="integer">
  Inputs currently being processed
</ResponseField>

<ResponseField name="completed" type="integer">
  Inputs that finished successfully
</ResponseField>

<ResponseField name="failed" type="integer">
  Inputs that finished with an error
</ResponseField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl "https://api.u1.archetypeai.app/v0.5/batch/jobs/job_2abc3def4ghi5jkl6mno7pqr/inputs/progress/counts?port_name=worker.inference" \
    -H "Authorization: Bearer $ATAI_API_KEY"
  ```

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

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

  response = requests.get(
      f"https://api.u1.archetypeai.app/v0.5/batch/jobs/{job_id}/inputs/progress/counts",
      headers={"Authorization": f"Bearer {api_key}"},
      params={"port_name": "worker.inference"},
  )

  counts = response.json()
  print(f"  pending={counts['pending']} processing={counts['processing']} "
        f"completed={counts['completed']} failed={counts['failed']}")
  ```

  ```javascript JavaScript theme={"system"}
  const jobId = 'job_2abc3def4ghi5jkl6mno7pqr';
  const params = new URLSearchParams({ port_name: 'worker.inference' });

  const response = await fetch(`https://api.u1.archetypeai.app/v0.5/batch/jobs/${jobId}/inputs/progress/counts?${params}`, {
    headers: { 'Authorization': `Bearer ${process.env.ATAI_API_KEY}` }
  });

  const counts = await response.json();
  console.log(`pending=${counts.pending} processing=${counts.processing} completed=${counts.completed} failed=${counts.failed}`);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={"system"}
  {
    "job_id": "job_2abc3def4ghi5jkl6mno7pqr",
    "pending": 0,
    "processing": 1,
    "completed": 8,
    "failed": 1
  }
  ```

  ```json 404 - Not Found theme={"system"}
  {
    "code": "NOT_FOUND",
    "message": "Job not found",
    "error_uid": "err_abc123"
  }
  ```

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