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

# List Inputs With Progress

> Tracked inputs paired with their latest progress entry

<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 tracked inputs for a job, each paired with its most recent `job_progress` row (if any). Use it to drive per-input progress UIs without N+1 fetches against the progress endpoint. Inputs attached to non-tracked ports (e.g. n-shot reference files) are always excluded.

## Request

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

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

<ParamField query="status" type="array">
  Statuses to include. Repeat the param to specify several (`?status=pending&status=processing`). Accepts `pending`, `processing`, `completed`, `failed`. The `reference` status is always excluded.
</ParamField>

<ParamField query="order" type="string">
  Sort direction within each status bucket. `asc` (default) puts the oldest first; `desc` puts the most recently active inputs at the top.
</ParamField>

<ParamField query="offset" type="integer">
  Number of items to skip for pagination (default: 0)
</ParamField>

<ParamField query="limit" type="integer">
  Maximum number of items to return per page
</ParamField>

## Response

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

<ResponseField name="total" type="integer">
  Total number of tracked inputs matching the filter criteria
</ResponseField>

<ResponseField name="offset" type="integer">
  Current pagination offset
</ResponseField>

<ResponseField name="limit" type="integer">
  Maximum number of items returned
</ResponseField>

<ResponseField name="items" type="array">
  Array of `InputWithLatestProgress` objects, each containing:

  * `input` — The `InputResponse` (same shape as [List Inputs](/api-reference/batch/io/list-inputs))
  * `latest_progress` — The most recent `job_progress` row for this input, or `null` if none yet
  * `step` — 1-indexed completion rank across the whole job, ordered by `completed_at`. `null` for inputs still in `pending` or `processing` — assigned only when the input reaches `completed` or `failed`. Ties (same `completed_at`) are broken by input id. **Distinct from `latest_progress.step`**, which is the container-reported training/inference step inside a single input.
</ResponseField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl "https://api.u1.archetypeai.app/v0.5/batch/jobs/job_2abc3def4ghi5jkl6mno7pqr/inputs/progress?status=processing&status=pending&order=desc&limit=20" \
    -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",
      headers={"Authorization": f"Bearer {api_key}"},
      params=[
          ("status", "processing"),
          ("status", "pending"),
          ("order", "desc"),
          ("limit", 20),
      ],
  )

  data = response.json()
  for item in data["items"]:
      inp = item["input"]
      progress = item.get("latest_progress")
      pct = progress["metrics"].get("percent_complete") if progress else None
      print(f"  {inp['id']} [{inp['status']}] step={item.get('step')} progress={pct}")
  ```

  ```javascript JavaScript theme={"system"}
  const jobId = 'job_2abc3def4ghi5jkl6mno7pqr';
  const params = new URLSearchParams();
  params.append('status', 'processing');
  params.append('status', 'pending');
  params.append('order', 'desc');
  params.append('limit', '20');

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

  const data = await response.json();
  data.items.forEach(({ input, latest_progress, step }) => {
    const pct = latest_progress?.metrics?.percent_complete ?? null;
    console.log(`  ${input.id} [${input.status}] step=${step} progress=${pct}`);
  });
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={"system"}
  {
    "job_id": "job_2abc3def4ghi5jkl6mno7pqr",
    "total": 1,
    "offset": 0,
    "limit": 20,
    "items": [
      {
        "input": {
          "id": "inp_abc123def456",
          "job_id": "job_2abc3def4ghi5jkl6mno7pqr",
          "port_name": "worker.inference",
          "file_id": "file_abc123",
          "data": {
            "ref": "https://storage.example.com/files/tep_inference.csv",
            "filename": "tep_inference.csv",
            "file_type": "text/csv",
            "file_extension": ".csv",
            "num_bytes": 245760,
            "metadata": {}
          },
          "status": "processing",
          "error_message": null,
          "created_at": "2026-04-14T10:00:00Z",
          "completed_at": null
        },
        "latest_progress": {
          "id": 502,
          "kind": "inference",
          "step": 5,
          "metrics": {
            "percent_complete": 50,
            "items_processed": 5,
            "items_total": 10
          },
          "payload": {},
          "input_id": "inp_abc123def456",
          "index": 0,
          "message": "Processing input 5 of 10",
          "created_at": "2026-04-14T10:06:00Z"
        },
        "step": null
      }
    ]
  }
  ```

  ```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>
